@lovrabet/rabetbase-cli 2.0.4-beta.3 → 2.0.4-beta.4
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/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.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/build.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/create.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.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.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/preview.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run.js +1 -1
- package/lib/commands/skill.js +1 -1
- package/lib/commands/smart-init.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/commands/start.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/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.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/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.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/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 +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56282f,_0x3232c8){const _0x364d86=a98_0x2dd1,_0x494de9=_0x56282f();while(!![]){try{const _0x22a36c=parseInt(_0x364d86(0xd5))/0x1+-parseInt(_0x364d86(0xff))/0x2*(-parseInt(_0x364d86(0xce))/0x3)+-parseInt(_0x364d86(0xfa))/0x4*(-parseInt(_0x364d86(0xe6))/0x5)+-parseInt(_0x364d86(0xf4))/0x6+-parseInt(_0x364d86(0xcd))/0x7+parseInt(_0x364d86(0xef))/0x8*(-parseInt(_0x364d86(0xd6))/0x9)+-parseInt(_0x364d86(0xf3))/0xa*(parseInt(_0x364d86(0xfe))/0xb);if(_0x22a36c===_0x3232c8)break;else _0x494de9['push'](_0x494de9['shift']());}catch(_0xb278fb){_0x494de9['push'](_0x494de9['shift']());}}}(a98_0x517f,0xea2ff));import a98_0x20c313 from'path';import{fileURLToPath}from'url';import a98_0x20d6e7 from'fs/promises';import{existsSync}from'fs';import{exec,execSync}from'child_process';function a98_0x2dd1(_0x9cedb6,_0x31d49f){_0x9cedb6=_0x9cedb6-0xca;const _0x517fe4=a98_0x517f();let _0x2dd1a1=_0x517fe4[_0x9cedb6];return _0x2dd1a1;}import{copyDirectory}from'../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a98_0x517f(){const _0x40b7cf=['\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','trim','\x20\x20rabetbase\x20run\x20start\x0a','Project\x20name\x20cannot\x20be\x20empty.','writeFile','\x20\x20Installing\x20dependencies...','needsUpgrade','341605GiBmLt','utf-8','\x20\x20√\x20Configuration\x20file\x20created','parse','\x0a√\x20Project\x20','bun\x20run\x20format','\x20\x20√\x20Project\x20template\x20created','name','chdir','1928JezRVr','join','Check\x20directory\x20permissions.','Project\x20name\x20contains\x20invalid\x20characters.','20ZHInie','7574106xuIiFb','\x20\x20√\x20package.json\x20updated','cwd','dirname','resolve','\x20created\x20successfully!','4unPTCm','./src/api/','validation','\x0a\x20\x20cd\x20','695761jmuJOE','180950PBAJmW','toLocaleString','log','string','access','../../templates/projects/sub-app-react-demo','\x20\x20√\x20Code\x20formatted','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`rabetbase\x20api\x20pull`\x20manually\x20later.','1664299vLsSNx','42bSsGjW','\x20\x20√\x20Pulled\x20','stringify','env','length','package.json','...','1380528JNToag','4842KCvcOG','\x20dataset(s),\x20generated\x20','bun','description','\x20model(s)','\x20\x20Pulling\x20API\x20configuration...','Use\x20a\x20different\x20project\x20name.','bun\x20--version','production'];a98_0x517f=function(){return _0x40b7cf;};return a98_0x517f();}import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{readConfig}from'../utils/config.js';import{getCliVersion}from'../utils/version.js';import{CliErrors}from'../errors.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x424c8c=a98_0x2dd1,_0x2922bb=fileURLToPath(import.meta.url),_0x1ef818=a98_0x20c313[_0x424c8c(0xf7)](_0x2922bb);return a98_0x20c313[_0x424c8c(0xf8)](_0x1ef818,_0x424c8c(0xca));}export async function createProjectNonInteractive(_0x443fec,_0x5652ef,_0x41c9a9,_0x596143){const _0x1a7593=a98_0x2dd1,_0x3ddfc2=await checkCliVersion();_0x3ddfc2[_0x1a7593(0xe5)]&&printCliUpgradeWarning(_0x3ddfc2);if(!_0x443fec||_0x443fec[_0x1a7593(0xe0)]()==='')throw CliErrors[_0x1a7593(0xfc)](_0x1a7593(0xe2));const _0x24c9c4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x24c9c4['test'](_0x443fec))throw CliErrors[_0x1a7593(0xfc)](_0x1a7593(0xf2),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x443fec[_0x1a7593(0xd2)]>0x64)throw CliErrors['validation']('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x1fb2b4=a98_0x20c313[_0x1a7593(0xf8)](process[_0x1a7593(0xf6)](),_0x443fec);if(existsSync(_0x1fb2b4))throw CliErrors[_0x1a7593(0xfc)]('Project\x20directory\x20\x22'+_0x443fec+'\x22\x20already\x20exists.',_0x1a7593(0xdc));try{const _0x3249ea=a98_0x20c313[_0x1a7593(0xf7)](_0x1fb2b4);await a98_0x20d6e7[_0x1a7593(0x103)](_0x3249ea,a98_0x20d6e7['constants']['W_OK']);}catch{throw CliErrors[_0x1a7593(0xfc)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x1a7593(0xf1));}try{console[_0x1a7593(0x101)]('*\x20Creating\x20project\x20'+_0x443fec+_0x1a7593(0xd4));const _0x5ac748=getTemplateDir();await copyDirectory(_0x5ac748,_0x1fb2b4),console[_0x1a7593(0x101)](_0x1a7593(0xec)),await updatePackageJsonName(_0x443fec),console[_0x1a7593(0x101)](_0x1a7593(0xf5)),console[_0x1a7593(0x101)](_0x1a7593(0xe4)),console['log'](_0x1a7593(0xdf)),await formatCode(_0x1fb2b4),console[_0x1a7593(0x101)](_0x1a7593(0xcb)),await configureProject(_0x443fec,_0x41c9a9,_0x5652ef),console['log'](_0x1a7593(0xe8)),_0x41c9a9&&await pullApiConfig(_0x1fb2b4,_0x41c9a9,_0x5652ef,_0x596143),console[_0x1a7593(0x101)](_0x1a7593(0xea)+_0x443fec+_0x1a7593(0xf9)),console[_0x1a7593(0x101)](_0x1a7593(0xfd)+_0x443fec),console['log'](_0x1a7593(0xe1));}catch(_0x24128e){try{existsSync(_0x1fb2b4)&&await a98_0x20d6e7['rm'](_0x1fb2b4,{'recursive':!![],'force':!![]});}catch{}throw _0x24128e;}}async function updatePackageJsonName(_0x153600){const _0x2ecbf4=a98_0x2dd1,_0x5e1648=a98_0x20c313[_0x2ecbf4(0xf8)](process[_0x2ecbf4(0xf6)](),_0x153600),_0x52a407=a98_0x20c313['join'](_0x5e1648,_0x2ecbf4(0xd3)),_0x555db4=await a98_0x20d6e7['readFile'](_0x52a407,_0x2ecbf4(0xe7)),_0x232417=JSON[_0x2ecbf4(0xe9)](_0x555db4);_0x232417[_0x2ecbf4(0xed)]=_0x153600,_0x232417[_0x2ecbf4(0xd9)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a98_0x20d6e7[_0x2ecbf4(0xe3)](_0x52a407,JSON[_0x2ecbf4(0xd0)](_0x232417,null,0x2)+'\x0a');}function detectPackageManager(){const _0x19f9d0=a98_0x2dd1;try{return execSync(_0x19f9d0(0xdd),{'stdio':'ignore'}),_0x19f9d0(0xd8);}catch{return'npm';}}async function formatCode(_0x30ec61){const _0xfd1d58=a98_0x2dd1;try{await execAsync(_0xfd1d58(0xeb),{'cwd':_0x30ec61});}catch{}}async function configureProject(_0x5e3094,_0x216fae,_0x22cc8b){const _0xc97362=a98_0x2dd1,_0x3c2442=a98_0x20c313[_0xc97362(0xf8)](process['cwd'](),_0x5e3094),_0x2227a1=a98_0x20c313[_0xc97362(0xf0)](_0x3c2442,NEW_CONFIG_NAME),_0x43afdb=readConfig(),_0x1bdf68=typeof _0x43afdb[_0xc97362(0xd1)]===_0xc97362(0x102)?_0x43afdb[_0xc97362(0xd1)]:undefined,{app:_0xa9f692,appcode:_0x26c60c,..._0x49107f}=_0x43afdb,_0x57d20f={..._0x49107f,'appcode':_0x216fae||'','env':_0x22cc8b||_0x1bdf68||_0xc97362(0xde),'createdAt':new Date()[_0xc97362(0x100)](),'version':getCliVersion()};writeConfigFile(_0x2227a1,_0x57d20f);}async function pullApiConfig(_0x1119f9,_0x31b048,_0x428210,_0x6ca852){const _0xaf3baa=a98_0x2dd1,_0x447e28=process[_0xaf3baa(0xf6)]();try{process['chdir'](_0x1119f9);const _0x6ee22e=_0x428210||_0xaf3baa(0xde);initEnv(_0x6ee22e),console[_0xaf3baa(0x101)](_0xaf3baa(0xdb));const {configArray:_0xd32402}=await fetchModelList(_0x31b048,_0x6ca852||''),_0x31c169=await generateApiFile(_0xd32402,'',_0x31b048,!![],_0x6ee22e,_0xaf3baa(0xfb));console[_0xaf3baa(0x101)](_0xaf3baa(0xcf)+_0xd32402[_0xaf3baa(0xd2)]+_0xaf3baa(0xd7)+_0x31c169['modelCount']+_0xaf3baa(0xda));}catch(_0x382497){console['log'](_0xaf3baa(0xcc));}finally{process[_0xaf3baa(0xee)](_0x447e28);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x48cef1,_0x1f97dc){const _0x352b05=a99_0x4c72,_0x209bb4=_0x48cef1();while(!![]){try{const _0x10c8a3=parseInt(_0x352b05(0x85))/0x1*(-parseInt(_0x352b05(0x8b))/0x2)+parseInt(_0x352b05(0x8d))/0x3*(parseInt(_0x352b05(0x7a))/0x4)+parseInt(_0x352b05(0x82))/0x5*(parseInt(_0x352b05(0x7d))/0x6)+parseInt(_0x352b05(0x90))/0x7*(-parseInt(_0x352b05(0x86))/0x8)+parseInt(_0x352b05(0x83))/0x9+parseInt(_0x352b05(0x87))/0xa*(parseInt(_0x352b05(0x89))/0xb)+parseInt(_0x352b05(0x84))/0xc*(parseInt(_0x352b05(0x88))/0xd);if(_0x10c8a3===_0x1f97dc)break;else _0x209bb4['push'](_0x209bb4['shift']());}catch(_0x315d56){_0x209bb4['push'](_0x209bb4['shift']());}}}(a99_0x5bbc,0x6618d));import a99_0x36523c from'node:path';import{fileURLToPath}from'node:url';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a99_0x36523c['dirname'](fileURLToPath(import.meta.url)),templateDir=a99_0x36523c['resolve'](__dirname,'../../templates/projects/sub-app-react-demo');export async function copyProjectTemplate(_0x5574cf){const _0x5bc5c5=a99_0x4c72,_0xf08416=Date[_0x5bc5c5(0x80)](),_0x702ab8=a99_0x36523c[_0x5bc5c5(0x8f)](process[_0x5bc5c5(0x8e)](),_0x5574cf);try{logger[_0x5bc5c5(0x8c)]('copy',_0x5bc5c5(0x7f),{'projectCode':_0x5574cf,'templateDir':templateDir}),await copyDirectory(templateDir,_0x702ab8);const _0x1ca485=Date[_0x5bc5c5(0x80)]()-_0xf08416;logger[_0x5bc5c5(0x8a)](_0x5bc5c5(0x7b),_0x5bc5c5(0x7c),_0x1ca485,{'projectCode':_0x5574cf});}catch(_0x2f7c26){const _0x593d67=Date['now']()-_0xf08416;logger[_0x5bc5c5(0x81)](_0x5bc5c5(0x7b),'项目模板复制失败',{'projectCode':_0x5574cf,'error':_0x2f7c26 instanceof Error?_0x2f7c26[_0x5bc5c5(0x7e)]:String(_0x2f7c26),'duration':_0x593d67});throw _0x2f7c26;}return formatElapsed(_0xf08416);}function a99_0x4c72(_0x38890d,_0x105e4e){_0x38890d=_0x38890d-0x7a;const _0x5bbc0d=a99_0x5bbc();let _0x4c721e=_0x5bbc0d[_0x38890d];return _0x4c721e;}function a99_0x5bbc(){const _0x53f9cd=['344ZuzUQa','1130hfdGhL','2107027DDPZho','23309cSPVGP','success','1590156WkJHdh','info','546YHFBRX','cwd','resolve','107975JbCyeq','14820ZLiJVj','copy','项目模板复制完成','6kgOtTK','message','开始复制项目模板','now','error','1117855cRHvoq','2276793NEJyMs','36vqswfv','1xiyKAM'];a99_0x5bbc=function(){return _0x53f9cd;};return a99_0x5bbc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x574f38,_0x1d6a8d){const _0x1878d7=a100_0x3c35,_0x1e872b=_0x574f38();while(!![]){try{const _0x30f2e3=parseInt(_0x1878d7(0xac))/0x1+-parseInt(_0x1878d7(0xb5))/0x2*(parseInt(_0x1878d7(0xbe))/0x3)+-parseInt(_0x1878d7(0xb0))/0x4+parseInt(_0x1878d7(0xb1))/0x5+-parseInt(_0x1878d7(0xb9))/0x6*(parseInt(_0x1878d7(0xb7))/0x7)+-parseInt(_0x1878d7(0xae))/0x8+-parseInt(_0x1878d7(0xab))/0x9*(-parseInt(_0x1878d7(0xaf))/0xa);if(_0x30f2e3===_0x1d6a8d)break;else _0x1e872b['push'](_0x1e872b['shift']());}catch(_0x2c3d38){_0x1e872b['push'](_0x1e872b['shift']());}}}(a100_0x430d,0xd5ec0));import a100_0x35e921 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a100_0x3c35(_0x563d27,_0x5187d1){_0x563d27=_0x563d27-0xab;const _0x430d8=a100_0x430d();let _0x3c35ce=_0x430d8[_0x563d27];return _0x3c35ce;}function a100_0x430d(){const _0x5c76b8=['cwd','resolve','363330WpJXHD','218225FKRqWx','format','2222272ImFmob','230rVEIvE','1864564eUSOfq','4891765iIVlPa','npx','error','info','218840AVJjJh','success','470813ytQrlo','代码格式化完成','6WHcdqi','now','开始格式化代码','--write','prettier','12mCSihV','代码格式化失败'];a100_0x430d=function(){return _0x5c76b8;};return a100_0x430d();}import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export async function formatProjectCode(_0x1a4ad6){const _0x3c6f95=a100_0x3c35,_0xa6a996=Date[_0x3c6f95(0xba)](),_0x213f86=a100_0x35e921[_0x3c6f95(0xc1)](process[_0x3c6f95(0xc0)](),_0x1a4ad6);try{logger[_0x3c6f95(0xb4)](_0x3c6f95(0xad),_0x3c6f95(0xbb),{'projectCode':_0x1a4ad6}),await execa(resolveNpmBin(_0x3c6f95(0xb2)),[_0x3c6f95(0xbd),_0x3c6f95(0xbc),'.'],{'cwd':_0x213f86});const _0x7afce1=Date[_0x3c6f95(0xba)]()-_0xa6a996;logger[_0x3c6f95(0xb6)]('format',_0x3c6f95(0xb8),_0x7afce1,{'projectCode':_0x1a4ad6});}catch(_0x2580c0){const _0x970860=Date[_0x3c6f95(0xba)]()-_0xa6a996;logger[_0x3c6f95(0xb3)](_0x3c6f95(0xad),_0x3c6f95(0xbf),{'projectCode':_0x1a4ad6,'error':_0x2580c0 instanceof Error?_0x2580c0['message']:String(_0x2580c0),'duration':_0x970860});throw _0x2580c0;}return formatElapsed(_0xa6a996);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a101_0x18ff(){const _0x429463=['20986UmooyY','8411klwkvV','install','859470daAJZO','依赖安装失败','11312833rEIChy','1092321rPSFtr','error','info','11NtSeBf','依赖安装完成','7492560rsEdVo','9iRSxrp','https://registry.npmmirror.com','resolve','8HEuEBc','--registry','522812jBBkOE','now','40QMWGHC','890eLxAKX','1gpOMQV','15948HfSSSt','success'];a101_0x18ff=function(){return _0x429463;};return a101_0x18ff();}(function(_0x599f09,_0x39c1cd){const _0x340e6f=a101_0x5178,_0x4bb36d=_0x599f09();while(!![]){try{const _0x67f673=parseInt(_0x340e6f(0x8a))/0x1*(parseInt(_0x340e6f(0x90))/0x2)+-parseInt(_0x340e6f(0x81))/0x3*(parseInt(_0x340e6f(0x86))/0x4)+-parseInt(_0x340e6f(0x89))/0x5*(-parseInt(_0x340e6f(0x8b))/0x6)+-parseInt(_0x340e6f(0x92))/0x7*(parseInt(_0x340e6f(0x84))/0x8)+parseInt(_0x340e6f(0x93))/0x9*(parseInt(_0x340e6f(0x88))/0xa)+-parseInt(_0x340e6f(0x7e))/0xb*(-parseInt(_0x340e6f(0x80))/0xc)+parseInt(_0x340e6f(0x8e))/0xd*(parseInt(_0x340e6f(0x8d))/0xe);if(_0x67f673===_0x39c1cd)break;else _0x4bb36d['push'](_0x4bb36d['shift']());}catch(_0x172990){_0x4bb36d['push'](_0x4bb36d['shift']());}}}(a101_0x18ff,0xede04));import a101_0x5b99de from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a101_0x5178(_0xfd328d,_0x4d85d8){_0xfd328d=_0xfd328d-0x7e;const _0x18ff85=a101_0x18ff();let _0x51789c=_0x18ff85[_0xfd328d];return _0x51789c;}import{resolveNpmBin}from'../utils/platform.js';export async function installDependencies(_0x53e2aa){const _0x13ab10=a101_0x5178,_0xd33429=Date['now'](),_0x14655c=a101_0x5b99de[_0x13ab10(0x83)](process['cwd'](),_0x53e2aa);try{logger[_0x13ab10(0x95)](_0x13ab10(0x8f),'开始安装依赖',{'projectCode':_0x53e2aa,'registry':_0x13ab10(0x82)}),await execa(resolveNpmBin('npm'),[_0x13ab10(0x8f),_0x13ab10(0x85),_0x13ab10(0x82)],{'cwd':_0x14655c});const _0x877c34=Date[_0x13ab10(0x87)]()-_0xd33429;logger[_0x13ab10(0x8c)](_0x13ab10(0x8f),_0x13ab10(0x7f),_0x877c34,{'projectCode':_0x53e2aa});}catch(_0x41a15d){const _0x47255e=Date[_0x13ab10(0x87)]()-_0xd33429;logger[_0x13ab10(0x94)](_0x13ab10(0x8f),_0x13ab10(0x91),{'projectCode':_0x53e2aa,'error':_0x41a15d instanceof Error?_0x41a15d['message']:String(_0x41a15d),'duration':_0x47255e});throw _0x41a15d;}return formatElapsed(_0xd33429);}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x2cbeab=a102_0x4226;(function(_0x293d39,_0x1cc10b){const _0x55c953=a102_0x4226,_0x5a768e=_0x293d39();while(!![]){try{const _0x9744c5=-parseInt(_0x55c953(0xcc))/0x1*(parseInt(_0x55c953(0xdf))/0x2)+parseInt(_0x55c953(0xd0))/0x3+parseInt(_0x55c953(0xc6))/0x4+parseInt(_0x55c953(0xd5))/0x5+parseInt(_0x55c953(0xc5))/0x6*(parseInt(_0x55c953(0xc2))/0x7)+parseInt(_0x55c953(0xd6))/0x8+-parseInt(_0x55c953(0xc3))/0x9;if(_0x9744c5===_0x1cc10b)break;else _0x5a768e['push'](_0x5a768e['shift']());}catch(_0x1c8a9b){_0x5a768e['push'](_0x5a768e['shift']());}}}(a102_0x551b,0xcdad3));function a102_0x4226(_0x4e2695,_0x1d44da){_0x4e2695=_0x4e2695-0xbf;const _0x551bbd=a102_0x551b();let _0x4226ee=_0x551bbd[_0x4e2695];return _0x4226ee;}import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{[a102_0x2cbeab(0xc9)];[a102_0x2cbeab(0xda)];[a102_0x2cbeab(0xcd)];constructor(_0x13e232,_0x584379,_0x35078a,_0x38c03a){const _0x2ef350=a102_0x2cbeab;super(_0x35078a),this[_0x2ef350(0xc8)]=_0x2ef350(0xce),this[_0x2ef350(0xc9)]=_0x13e232,this[_0x2ef350(0xda)]=_0x584379,this['hint']=_0x38c03a;}}function a102_0x551b(){const _0x3426d9=['23149818hNsueT','\x20auth`\x20to\x20login\x20first.','2536392dlkwnm','2664044nivHev','not_in_project','name','code','api_error','flag_missing','241mIVqLo','hint','CliError','Authentication\x20required','4916583RWlfGn','Tip:\x20`','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','\x20--help`\x20to\x20see\x20available\x20commands.','auth_required','6887275lPSvXn','355224BQBPai','\x20project\x20directory','validation_error','join','exitCode','Set\x20appcode\x20via\x20`','Operation\x20cancelled.','Run\x20`','Configuration\x20file\x20not\x20found','6098eVFJQQ','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x0a\x20\x20\x20\x20\x20\x20\x20','config_missing','7cqxxoO'];a102_0x551b=function(){return _0x3426d9;};return a102_0x551b();}export const CliErrors={'authRequired':_0x52e387=>new CliError(a102_0x2cbeab(0xd4),0x1,a102_0x2cbeab(0xcf),_0x52e387??a102_0x2cbeab(0xdd)+CLI_BIN_NAME+a102_0x2cbeab(0xc4)),'configMissing':_0x3385f0=>new CliError(a102_0x2cbeab(0xc1),0x1,a102_0x2cbeab(0xde),_0x3385f0??[a102_0x2cbeab(0xdb)+CLI_BIN_NAME+a102_0x2cbeab(0xd2),a102_0x2cbeab(0xd1)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a102_0x2cbeab(0xd9)](a102_0x2cbeab(0xc0))),'notInProject':()=>new CliError(a102_0x2cbeab(0xc7),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+a102_0x2cbeab(0xd7),a102_0x2cbeab(0xbf)),'apiError':(_0x165548,_0x5e5547)=>new CliError(a102_0x2cbeab(0xca),0x2,_0x165548,_0x5e5547),'networkError':_0x38a359=>new CliError('network_error',0x2,'Network\x20error:\x20'+_0x38a359,'Check\x20your\x20internet\x20connection\x20and\x20try\x20again.'),'unknownCommand':_0x2fde63=>new CliError('unknown_command',0x1,'Unknown\x20command:\x20'+_0x2fde63,a102_0x2cbeab(0xdd)+CLI_BIN_NAME+a102_0x2cbeab(0xd3)),'flagMissing':(_0x25c1a3,_0x12ead4)=>new CliError(a102_0x2cbeab(0xcb),0x1,'Missing\x20required\x20flag:\x20--'+_0x25c1a3,_0x12ead4),'validation':(_0x494836,_0x125507)=>new CliError(a102_0x2cbeab(0xd8),0x1,_0x494836,_0x125507),'cancelled':_0x26a2cf=>new CliError('cancelled',0x0,_0x26a2cf??a102_0x2cbeab(0xdc),undefined)};
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2e153b,_0x57fbbf){const _0x39ae75=a103_0xd41c,_0x1bbbe3=_0x2e153b();while(!![]){try{const _0x42f005=parseInt(_0x39ae75(0x13b))/0x1+parseInt(_0x39ae75(0x121))/0x2+parseInt(_0x39ae75(0x143))/0x3+-parseInt(_0x39ae75(0x11f))/0x4*(-parseInt(_0x39ae75(0x123))/0x5)+-parseInt(_0x39ae75(0x133))/0x6*(-parseInt(_0x39ae75(0x141))/0x7)+parseInt(_0x39ae75(0x13e))/0x8+-parseInt(_0x39ae75(0x132))/0x9;if(_0x42f005===_0x57fbbf)break;else _0x1bbbe3['push'](_0x1bbbe3['shift']());}catch(_0x4e5b){_0x1bbbe3['push'](_0x1bbbe3['shift']());}}}(a103_0x58c6,0xa2b79));function a103_0xd41c(_0x4b6e54,_0x1b2b9c){_0x4b6e54=_0x4b6e54-0x11f;const _0x58c698=a103_0x58c6();let _0xd41c76=_0x58c698[_0x4b6e54];return _0xd41c76;}import{CliErrors}from'../errors.js';export function parseFlags(_0x31b7ef,_0x2f15b2){const _0x571fae=a103_0xd41c,_0x59aabd={};for(const _0x28c6e7 of _0x31b7ef){const _0x2dbabf=_0x2f15b2[_0x28c6e7[_0x571fae(0x12b)]]??_0x2f15b2[toCamelCase(_0x28c6e7[_0x571fae(0x12b)])];if(_0x2dbabf===undefined||_0x2dbabf===null){_0x28c6e7[_0x571fae(0x120)]!==undefined&&(_0x59aabd[_0x28c6e7[_0x571fae(0x12b)]]=_0x28c6e7[_0x571fae(0x120)]);continue;}_0x59aabd[_0x28c6e7[_0x571fae(0x12b)]]=coerce(_0x28c6e7,_0x2dbabf);}for(const _0x71732d of[_0x571fae(0x12a),_0x571fae(0x138),_0x571fae(0x127),'format']){const _0x16fa1e=_0x2f15b2[_0x71732d];if(_0x16fa1e!==undefined){const _0x3a4171=_0x71732d===_0x571fae(0x138)?_0x571fae(0x12a):_0x71732d;_0x59aabd[_0x3a4171]=_0x16fa1e;}}return _0x59aabd;}export function validateFlags(_0x20ed56,_0x8a2557,_0x479231){const _0x561288=a103_0xd41c;for(const _0xe250d5 of _0x20ed56){const _0x4a34f7=_0x8a2557[_0xe250d5['name']];if(_0xe250d5['required']&&(_0x4a34f7===undefined||_0x4a34f7===''))throw CliErrors[_0x561288(0x139)](_0xe250d5[_0x561288(0x12b)],'--'+_0xe250d5[_0x561288(0x12b)]+_0x561288(0x137)+_0x479231+'`.');if(_0xe250d5[_0x561288(0x12d)]&&_0xe250d5[_0x561288(0x12d)][_0x561288(0x140)]>0x0&&_0x4a34f7!==undefined&&_0x4a34f7!==''){if(!_0xe250d5['enum']['includes'](String(_0x4a34f7)))throw CliErrors[_0x561288(0x122)](_0x561288(0x136)+_0x4a34f7+_0x561288(0x12e)+_0xe250d5[_0x561288(0x12b)]+_0x561288(0x142)+_0xe250d5[_0x561288(0x12d)][_0x561288(0x129)](',\x20'));}if(_0xe250d5[_0x561288(0x134)]&&_0x4a34f7!==undefined&&_0x4a34f7!==''){if(!_0xe250d5['pattern'][_0x561288(0x131)][_0x561288(0x13d)](String(_0x4a34f7)))throw CliErrors[_0x561288(0x122)](_0x561288(0x128)+_0xe250d5[_0x561288(0x12b)]+_0x561288(0x124)+_0xe250d5[_0x561288(0x134)][_0x561288(0x12c)]+_0x561288(0x12f)+_0x4a34f7+'\x22.');}}}function coerce(_0x746820,_0x409bfc){const _0x4111bb=a103_0xd41c;switch(_0x746820[_0x4111bb(0x135)]){case _0x4111bb(0x130):return _0x409bfc===!![]||_0x409bfc===_0x4111bb(0x13f);case _0x4111bb(0x13a):{const _0xf01a31=Number(_0x409bfc);if(isNaN(_0xf01a31))throw CliErrors[_0x4111bb(0x122)]('--'+_0x746820['name']+_0x4111bb(0x126)+_0x409bfc+'\x22');return _0xf01a31;}default:return String(_0x409bfc);}}function a103_0x58c6(){const _0x5d3e11=['regex','26227818QcRzYY','564LqSEVG','pattern','type','Invalid\x20value\x20\x22','\x20is\x20required\x20for\x20`','dryRun','flagMissing','number','1323616FxdpiV','toUpperCase','test','3943464GZRIVP','true','length','70133TCDHMI','.\x20Allowed:\x20','1450224kjHswM','28xWedMm','default','138294xirdnX','validation','192715hXshLt',':\x20expected\x20','replace','\x20expects\x20a\x20number,\x20got\x20\x22','yes','Invalid\x20--','join','dry-run','name','description','enum','\x22\x20for\x20--',',\x20got\x20\x22','boolean'];a103_0x58c6=function(){return _0x5d3e11;};return a103_0x58c6();}function toCamelCase(_0x2cba6f){const _0x49b4ee=a103_0xd41c;return _0x2cba6f[_0x49b4ee(0x125)](/-([a-z])/g,(_0x2c8ece,_0xe9e1d0)=>_0xe9e1d0[_0x49b4ee(0x13c)]());}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a104_0x225a1c=a104_0x1788;(function(_0x5ebc1e,_0x41d6c7){const _0x46d098=a104_0x1788,_0xeb5f2d=_0x5ebc1e();while(!![]){try{const _0x3aea13=-parseInt(_0x46d098(0x1b7))/0x1*(-parseInt(_0x46d098(0x1cc))/0x2)+-parseInt(_0x46d098(0x1b6))/0x3+-parseInt(_0x46d098(0x1c5))/0x4+-parseInt(_0x46d098(0x1c3))/0x5+parseInt(_0x46d098(0x1d8))/0x6*(-parseInt(_0x46d098(0x1e1))/0x7)+-parseInt(_0x46d098(0x1d5))/0x8*(parseInt(_0x46d098(0x1ec))/0x9)+parseInt(_0x46d098(0x1db))/0xa;if(_0x3aea13===_0x41d6c7)break;else _0xeb5f2d['push'](_0xeb5f2d['shift']());}catch(_0x20c07e){_0xeb5f2d['push'](_0xeb5f2d['shift']());}}}(a104_0x126b,0xda506));import{serviceRegistry,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME}from'../constant/cli.js';const RISK_LABELS={'read':'','write':a104_0x225a1c(0x1ce),'high-risk-write':'\x20\x20[high-risk-write]'};function a104_0x1788(_0x510cfa,_0x29b335){_0x510cfa=_0x510cfa-0x1a8;const _0x126b27=a104_0x126b();let _0x17882f=_0x126b27[_0x510cfa];return _0x17882f;}export function generateCommandHelp(_0x758225){const _0x4fcff7=a104_0x225a1c,_0x324911=[],_0x4872ec=CLI_BIN_NAME+'\x20'+_0x758225['service']+'\x20'+_0x758225['command'];_0x324911[_0x4fcff7(0x1b3)](''),_0x324911[_0x4fcff7(0x1b3)]('\x20\x20'+_0x758225[_0x4fcff7(0x1aa)]),_0x324911[_0x4fcff7(0x1b3)](''),_0x324911[_0x4fcff7(0x1b3)](_0x4fcff7(0x1e0)),_0x324911['push'](_0x4fcff7(0x1c2)+_0x4872ec+'\x20[flags]'),_0x324911[_0x4fcff7(0x1b3)](''),_0x324911[_0x4fcff7(0x1b3)](_0x4fcff7(0x1d4)+_0x758225[_0x4fcff7(0x1e8)]);_0x758225[_0x4fcff7(0x1e8)]===_0x4fcff7(0x1e5)&&_0x324911['push']('\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.');_0x324911[_0x4fcff7(0x1b3)]('');if(_0x758225[_0x4fcff7(0x1b1)][_0x4fcff7(0x1bf)]>0x0||_0x758225['dryRun']||_0x758225[_0x4fcff7(0x1a9)]!==![]){_0x324911[_0x4fcff7(0x1b3)](_0x4fcff7(0x1c0));const _0x2b2abd=buildAllFlags(_0x758225),_0x405793=Math['max'](..._0x2b2abd[_0x4fcff7(0x1e3)](_0x1504f8=>formatFlagName(_0x1504f8)['length']));for(const _0x41931c of _0x2b2abd){const _0x578c5e=formatFlagName(_0x41931c)[_0x4fcff7(0x1d7)](_0x405793+0x2);let _0x410dfc=_0x41931c['description'];_0x41931c[_0x4fcff7(0x1e6)]&&_0x41931c[_0x4fcff7(0x1e6)][_0x4fcff7(0x1bf)]>0x0&&(_0x410dfc+='\x20('+_0x41931c[_0x4fcff7(0x1e6)][_0x4fcff7(0x1ae)](_0x4fcff7(0x1ca))+')'),_0x41931c[_0x4fcff7(0x1be)]!==undefined&&_0x41931c[_0x4fcff7(0x1be)]!==''&&(_0x410dfc+='\x20[default:\x20'+_0x41931c[_0x4fcff7(0x1be)]+']'),_0x41931c[_0x4fcff7(0x1df)]&&(_0x410dfc+=_0x4fcff7(0x1b5)),_0x324911['push'](_0x4fcff7(0x1c2)+_0x578c5e+_0x410dfc);}_0x324911[_0x4fcff7(0x1b3)]('');}const _0x3ad4a2=[];_0x758225[_0x4fcff7(0x1bc)]!==![]&&_0x3ad4a2['push'](_0x4fcff7(0x1b2)+CLI_BIN_NAME+_0x4fcff7(0x1b4));_0x758225[_0x4fcff7(0x1e7)]!==![]&&_0x3ad4a2[_0x4fcff7(0x1b3)]('Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+_0x4fcff7(0x1e4));if(_0x3ad4a2['length']>0x0){_0x324911[_0x4fcff7(0x1b3)](_0x4fcff7(0x1e2));for(const _0x1846b4 of _0x3ad4a2){_0x324911[_0x4fcff7(0x1b3)](_0x4fcff7(0x1cd)+_0x1846b4);}_0x324911[_0x4fcff7(0x1b3)]('');}return _0x324911[_0x4fcff7(0x1ae)]('\x0a');}export function generateServiceHelp(_0x3c8fd6){const _0x413035=a104_0x225a1c,_0x17310f=getServiceEntry(_0x3c8fd6);if(!_0x17310f)return'\x20\x20Unknown\x20service:\x20'+_0x3c8fd6+'\x0a';const _0x14629c=[];_0x14629c[_0x413035(0x1b3)](''),_0x14629c[_0x413035(0x1b3)]('\x20\x20'+_0x17310f[_0x413035(0x1c7)]),_0x14629c['push'](''),_0x14629c[_0x413035(0x1b3)]('\x20\x20USAGE'),_0x14629c['push'](_0x413035(0x1c2)+CLI_BIN_NAME+'\x20'+_0x3c8fd6+_0x413035(0x1d9)),_0x14629c[_0x413035(0x1b3)](''),_0x14629c['push']('\x20\x20COMMANDS');const _0x8d58e8=Math['max'](..._0x17310f['commands'][_0x413035(0x1e3)](_0x3195d4=>_0x3195d4[_0x413035(0x1af)][_0x413035(0x1bf)]));for(const _0x799d3d of _0x17310f[_0x413035(0x1ac)]){const _0x63ebbb=_0x799d3d[_0x413035(0x1eb)]??'';_0x14629c[_0x413035(0x1b3)](_0x413035(0x1c2)+_0x799d3d['command']['padEnd'](_0x8d58e8+0x2)+_0x799d3d[_0x413035(0x1aa)]+_0x63ebbb);}return _0x14629c[_0x413035(0x1b3)](''),_0x14629c[_0x413035(0x1b3)]('\x20\x20Run\x20`'+CLI_BIN_NAME+'\x20'+_0x3c8fd6+_0x413035(0x1b0)),_0x14629c[_0x413035(0x1b3)](''),_0x14629c[_0x413035(0x1ae)]('\x0a');}export function generateFullHelp(){const _0x52953a=a104_0x225a1c,_0x5b673e=[];_0x5b673e['push'](''),_0x5b673e[_0x52953a(0x1b3)]('\x20\x20Rabetbase\x20CLI'),_0x5b673e[_0x52953a(0x1b3)](''),_0x5b673e['push'](_0x52953a(0x1e0)),_0x5b673e['push'](_0x52953a(0x1a8)+CLI_BIN_NAME+'\x20[global-options]\x20<service>\x20<command>\x20[flags]'),_0x5b673e[_0x52953a(0x1b3)](''),_0x5b673e['push'](_0x52953a(0x1de)),_0x5b673e[_0x52953a(0x1b3)](_0x52953a(0x1ea)),_0x5b673e[_0x52953a(0x1b3)](_0x52953a(0x1d1)),_0x5b673e[_0x52953a(0x1b3)](_0x52953a(0x1da)),_0x5b673e[_0x52953a(0x1b3)]('\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Preview\x20operation\x20without\x20executing'),_0x5b673e['push'](_0x52953a(0x1cf)),_0x5b673e[_0x52953a(0x1b3)]('\x20\x20\x20\x20--non-interactive\x20\x20\x20\x20\x20\x20Force\x20non-interactive\x20mode\x20(CI)'),_0x5b673e['push'](_0x52953a(0x1ad)),_0x5b673e[_0x52953a(0x1b3)](_0x52953a(0x1c1)),_0x5b673e[_0x52953a(0x1b3)](''),_0x5b673e[_0x52953a(0x1b3)]('\x20\x20COMMANDS'),_0x5b673e['push']('');for(const _0x203f57 of serviceRegistry){_0x5b673e[_0x52953a(0x1b3)]('\x20\x20'+_0x203f57['label']);if(_0x203f57[_0x52953a(0x1dd)]){const _0x259d0a=_0x203f57['commands'][0x0],_0x275a38=_0x259d0a[_0x52953a(0x1eb)]??'';_0x5b673e[_0x52953a(0x1b3)](_0x52953a(0x1c2)+_0x203f57[_0x52953a(0x1d2)][_0x52953a(0x1d7)](0x12)+_0x259d0a[_0x52953a(0x1aa)]+_0x275a38);}else{const _0x210bab=_0x203f57[_0x52953a(0x1ac)][_0x52953a(0x1e3)](_0x32feb1=>_0x203f57['service']+'\x20'+_0x32feb1[_0x52953a(0x1af)]),_0x106a2e=Math['max'](..._0x210bab[_0x52953a(0x1e3)](_0x24ab93=>_0x24ab93[_0x52953a(0x1bf)]));for(let _0x2a6e68=0x0;_0x2a6e68<_0x203f57['commands'][_0x52953a(0x1bf)];_0x2a6e68++){const _0x3a7422=_0x203f57['commands'][_0x2a6e68],_0x340da6=_0x3a7422[_0x52953a(0x1eb)]??'';_0x5b673e[_0x52953a(0x1b3)](_0x52953a(0x1c2)+_0x210bab[_0x2a6e68][_0x52953a(0x1d7)](_0x106a2e+0x2)+_0x3a7422['description']+_0x340da6);}}_0x5b673e[_0x52953a(0x1b3)]('');}return _0x5b673e['push'](_0x52953a(0x1d6)+CLI_BIN_NAME+_0x52953a(0x1b9)),_0x5b673e['push'](''),_0x5b673e['join']('\x0a');}export function generateLegacyCommandHelp(_0x539b6d,_0x1a3e1d,_0x43a00c){const _0x4f2b03=a104_0x225a1c,_0x1979fb=[],_0x4245d8=CLI_BIN_NAME+'\x20'+_0x539b6d+'\x20'+_0x1a3e1d;_0x1979fb[_0x4f2b03(0x1b3)](''),_0x1979fb[_0x4f2b03(0x1b3)]('\x20\x20'+_0x43a00c[_0x4f2b03(0x1aa)]),_0x1979fb[_0x4f2b03(0x1b3)](''),_0x1979fb[_0x4f2b03(0x1b3)](_0x4f2b03(0x1e0)),_0x1979fb['push'](_0x4f2b03(0x1c2)+(_0x43a00c[_0x4f2b03(0x1bd)]??_0x4245d8+'\x20[flags]')),_0x1979fb[_0x4f2b03(0x1b3)]('');if(_0x43a00c[_0x4f2b03(0x1b1)]&&_0x43a00c['flags']['length']>0x0){_0x1979fb[_0x4f2b03(0x1b3)](_0x4f2b03(0x1c0));const _0x2cfbc3=Math[_0x4f2b03(0x1cb)](..._0x43a00c['flags']['map'](_0x16d9b2=>formatFlagName(_0x16d9b2)[_0x4f2b03(0x1bf)]));for(const _0x384d80 of _0x43a00c[_0x4f2b03(0x1b1)]){const _0x212d2e=formatFlagName(_0x384d80)[_0x4f2b03(0x1d7)](_0x2cfbc3+0x2);let _0x2f4dc9=_0x384d80[_0x4f2b03(0x1aa)];_0x384d80[_0x4f2b03(0x1e6)]&&_0x384d80['enum']['length']>0x0&&(_0x2f4dc9+='\x20('+_0x384d80['enum'][_0x4f2b03(0x1ae)](_0x4f2b03(0x1ca))+')'),_0x384d80[_0x4f2b03(0x1be)]!==undefined&&_0x384d80[_0x4f2b03(0x1be)]!==''&&(_0x2f4dc9+=_0x4f2b03(0x1bb)+_0x384d80[_0x4f2b03(0x1be)]+']'),_0x384d80['required']&&(_0x2f4dc9+='\x20(required)'),_0x1979fb[_0x4f2b03(0x1b3)](_0x4f2b03(0x1c2)+_0x212d2e+_0x2f4dc9);}_0x1979fb[_0x4f2b03(0x1b3)]('');}return _0x1979fb[_0x4f2b03(0x1ae)]('\x0a');}function a104_0x126b(){const _0xf9be2e=['number','2084752XFmqvJ','pretty','label','type','dry-run','\x20|\x20','max','1952REfyGP','\x20\x20\x20\x20•\x20','\x20\x20[write]','\x20\x20\x20\x20--yes\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20confirmation\x20for\x20high-risk\x20writes','string','\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment:\x20production\x20|\x20daily','service','json','\x20\x20RISK:\x20','3910792ptNJck','\x20\x20Run\x20`','padEnd','24UKfmqU','\x20<command>\x20[flags]','\x20\x20\x20\x20--format\x20<fmt>\x20\x20\x20\x20\x20\x20\x20\x20\x20Output\x20format:\x20json\x20|\x20pretty\x20|\x20table','49162700JfoOhJ','name','isSingleCommand','\x20\x20GLOBAL\x20OPTIONS','required','\x20\x20USAGE','1660792nWQQMB','\x20\x20PREREQUISITES','map','\x20project\x20init`\x20or\x20--appcode).','high-risk-write','enum','requiresAppCode','risk','boolean','\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20Override\x20appcode','tag','18kvAWqL','format','\x20<n>','yes','\x20\x20\x20\x20$\x20','hasFormat','description','dryRun','commands','\x20\x20\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help','join','command','\x20<command>\x20--help`\x20for\x20flag\x20details.','flags','Requires\x20authentication\x20(run\x20`','push','\x20auth`\x20first).','\x20(required)','3818250Elfkgu','159INYuVo','Preview\x20the\x20operation\x20without\x20executing','\x20<service>\x20<command>\x20--help`\x20for\x20command-level\x20flags.','table','\x20[default:\x20','requiresAuth','usage','default','length','\x20\x20FLAGS','\x20\x20\x20\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20version','\x20\x20\x20\x20','2282900WblOzx'];a104_0x126b=function(){return _0xf9be2e;};return a104_0x126b();}function buildAllFlags(_0x24a3a3){const _0xd0989d=a104_0x225a1c,_0x52820f=[..._0x24a3a3['flags']];return _0x24a3a3[_0xd0989d(0x1ab)]&&_0x52820f['push']({'name':_0xd0989d(0x1c9),'type':_0xd0989d(0x1e9),'description':_0xd0989d(0x1b8)}),_0x24a3a3[_0xd0989d(0x1a9)]!==![]&&_0x52820f[_0xd0989d(0x1b3)]({'name':_0xd0989d(0x1ed),'type':_0xd0989d(0x1d0),'default':_0xd0989d(0x1c6),'enum':[_0xd0989d(0x1d3),_0xd0989d(0x1c6),_0xd0989d(0x1ba)],'description':'Output\x20format'}),_0x24a3a3['risk']==='high-risk-write'&&_0x52820f[_0xd0989d(0x1b3)]({'name':_0xd0989d(0x1ef),'type':_0xd0989d(0x1e9),'description':'Skip\x20confirmation\x20prompt'}),_0x52820f;}function formatFlagName(_0x13f6ff){const _0x30f8ca=a104_0x225a1c,_0x2acd5a=_0x13f6ff[_0x30f8ca(0x1c8)]==='boolean'?'':_0x13f6ff[_0x30f8ca(0x1c8)]===_0x30f8ca(0x1c4)?_0x30f8ca(0x1ee):'\x20<value>';return'--'+_0x13f6ff[_0x30f8ca(0x1dc)]+_0x2acd5a;}
|
|
1
|
+
function a104_0x24c7(_0x1d718b,_0x27ee31){_0x1d718b=_0x1d718b-0xd8;const _0x1ae9dc=a104_0x1ae9();let _0x24c70d=_0x1ae9dc[_0x1d718b];return _0x24c70d;}const a104_0x51137=a104_0x24c7;(function(_0x2af5b2,_0xa90c3d){const _0x562f2f=a104_0x24c7,_0x304afa=_0x2af5b2();while(!![]){try{const _0x45c7a0=parseInt(_0x562f2f(0xde))/0x1*(-parseInt(_0x562f2f(0x116))/0x2)+-parseInt(_0x562f2f(0x112))/0x3+parseInt(_0x562f2f(0xdb))/0x4+parseInt(_0x562f2f(0xf9))/0x5+parseInt(_0x562f2f(0xfd))/0x6*(parseInt(_0x562f2f(0xe2))/0x7)+parseInt(_0x562f2f(0xe8))/0x8+-parseInt(_0x562f2f(0xe9))/0x9;if(_0x45c7a0===_0xa90c3d)break;else _0x304afa['push'](_0x304afa['shift']());}catch(_0x916863){_0x304afa['push'](_0x304afa['shift']());}}}(a104_0x1ae9,0x1ad22));function a104_0x1ae9(){const _0x557206=['Output\x20format','join','\x20\x20\x20\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20version','command','Requires\x20authentication\x20(run\x20`','\x20\x20[write]','\x20\x20PREREQUISITES','\x20\x20Rabetbase\x20CLI','type','description','push','38601embqZp','\x20|\x20','\x20\x20\x20\x20•\x20','enum','273272ORcnES','usage','flags','hasFormat','string','map','\x20<n>','\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment:\x20production\x20|\x20daily','\x20\x20GLOBAL\x20OPTIONS','dryRun','yes','\x20\x20\x20\x20$\x20','272936riJbnH','\x20[default:\x20','\x20\x20\x20\x20','1pAZUOT','\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','default','\x20\x20RISK:\x20','21mBLKtS','\x20\x20USAGE','padEnd','\x20\x20Run\x20`','\x20<value>','\x20<service>\x20<command>\x20--help`\x20for\x20command-level\x20flags.','973752fKKTlN','568476JaDLRe','tag','name','Requires\x20appcode\x20(set\x20via\x20`','pretty','high-risk-write','\x20\x20\x20\x20--format\x20<fmt>\x20\x20\x20\x20\x20\x20\x20\x20\x20Output\x20format:\x20json\x20|\x20pretty\x20|\x20table','\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Preview\x20operation\x20without\x20executing','\x20[global-options]\x20<service>\x20<command>\x20[flags]','number','service','length','\x20\x20Unknown\x20service:\x20','requiresAppCode','\x20(required)','\x20\x20\x20\x20--non-interactive\x20\x20\x20\x20\x20\x20Force\x20non-interactive\x20mode\x20(CI)','573910Zvoozc','Skip\x20confirmation\x20prompt','\x20project\x20init`\x20or\x20--appcode).','Preview\x20the\x20operation\x20without\x20executing','35580dTfOif','max','\x20auth`\x20first).','required','\x20\x20FLAGS','requiresAuth','commands','boolean','risk','\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20Override\x20appcode'];a104_0x1ae9=function(){return _0x557206;};return a104_0x1ae9();}import{serviceRegistry,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME}from'../constant/cli.js';const RISK_LABELS={'read':'','write':a104_0x51137(0x10c),'high-risk-write':'\x20\x20[high-risk-write]'};export function generateCommandHelp(_0x5c030c){const _0x5d4e73=a104_0x51137,_0x401a55=[],_0x6e28c3=CLI_BIN_NAME+'\x20'+_0x5c030c[_0x5d4e73(0xf3)]+'\x20'+_0x5c030c['command'];_0x401a55[_0x5d4e73(0x111)](''),_0x401a55[_0x5d4e73(0x111)]('\x20\x20'+_0x5c030c[_0x5d4e73(0x110)]),_0x401a55[_0x5d4e73(0x111)](''),_0x401a55[_0x5d4e73(0x111)]('\x20\x20USAGE'),_0x401a55[_0x5d4e73(0x111)](_0x5d4e73(0xdd)+_0x6e28c3+'\x20[flags]'),_0x401a55[_0x5d4e73(0x111)](''),_0x401a55[_0x5d4e73(0x111)](_0x5d4e73(0xe1)+_0x5c030c[_0x5d4e73(0x105)]);_0x5c030c[_0x5d4e73(0x105)]===_0x5d4e73(0xee)&&_0x401a55[_0x5d4e73(0x111)](_0x5d4e73(0xdf));_0x401a55['push']('');if(_0x5c030c['flags'][_0x5d4e73(0xf4)]>0x0||_0x5c030c[_0x5d4e73(0xd8)]||_0x5c030c[_0x5d4e73(0x119)]!==![]){_0x401a55[_0x5d4e73(0x111)](_0x5d4e73(0x101));const _0xc516b2=buildAllFlags(_0x5c030c),_0x1c3e2d=Math[_0x5d4e73(0xfe)](..._0xc516b2['map'](_0x5bc830=>formatFlagName(_0x5bc830)[_0x5d4e73(0xf4)]));for(const _0x4053bd of _0xc516b2){const _0x4bf696=formatFlagName(_0x4053bd)[_0x5d4e73(0xe4)](_0x1c3e2d+0x2);let _0x42b95d=_0x4053bd[_0x5d4e73(0x110)];_0x4053bd['enum']&&_0x4053bd[_0x5d4e73(0x115)]['length']>0x0&&(_0x42b95d+='\x20('+_0x4053bd[_0x5d4e73(0x115)][_0x5d4e73(0x108)]('\x20|\x20')+')'),_0x4053bd['default']!==undefined&&_0x4053bd['default']!==''&&(_0x42b95d+=_0x5d4e73(0xdc)+_0x4053bd['default']+']'),_0x4053bd[_0x5d4e73(0x100)]&&(_0x42b95d+=_0x5d4e73(0xf7)),_0x401a55[_0x5d4e73(0x111)](_0x5d4e73(0xdd)+_0x4bf696+_0x42b95d);}_0x401a55[_0x5d4e73(0x111)]('');}const _0x2c0589=[];_0x5c030c[_0x5d4e73(0x102)]!==![]&&_0x2c0589[_0x5d4e73(0x111)](_0x5d4e73(0x10b)+CLI_BIN_NAME+_0x5d4e73(0xff));_0x5c030c[_0x5d4e73(0xf6)]!==![]&&_0x2c0589[_0x5d4e73(0x111)](_0x5d4e73(0xec)+CLI_BIN_NAME+_0x5d4e73(0xfb));if(_0x2c0589[_0x5d4e73(0xf4)]>0x0){_0x401a55['push'](_0x5d4e73(0x10d));for(const _0xcd0ab of _0x2c0589){_0x401a55[_0x5d4e73(0x111)](_0x5d4e73(0x114)+_0xcd0ab);}_0x401a55['push']('');}return _0x401a55[_0x5d4e73(0x108)]('\x0a');}export function generateServiceHelp(_0x4a0b5f){const _0x4b9b6f=a104_0x51137,_0xe14c3d=getServiceEntry(_0x4a0b5f);if(!_0xe14c3d)return _0x4b9b6f(0xf5)+_0x4a0b5f+'\x0a';const _0x3e6949=[];_0x3e6949[_0x4b9b6f(0x111)](''),_0x3e6949['push']('\x20\x20'+_0xe14c3d['label']),_0x3e6949[_0x4b9b6f(0x111)](''),_0x3e6949['push'](_0x4b9b6f(0xe3)),_0x3e6949['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20'+_0x4a0b5f+'\x20<command>\x20[flags]'),_0x3e6949[_0x4b9b6f(0x111)](''),_0x3e6949[_0x4b9b6f(0x111)]('\x20\x20COMMANDS');const _0x339598=Math[_0x4b9b6f(0xfe)](..._0xe14c3d['commands'][_0x4b9b6f(0x11b)](_0x54d3ec=>_0x54d3ec[_0x4b9b6f(0x10a)][_0x4b9b6f(0xf4)]));for(const _0x4c80b6 of _0xe14c3d[_0x4b9b6f(0x103)]){const _0x5020d2=_0x4c80b6[_0x4b9b6f(0xea)]??'';_0x3e6949[_0x4b9b6f(0x111)](_0x4b9b6f(0xdd)+_0x4c80b6[_0x4b9b6f(0x10a)][_0x4b9b6f(0xe4)](_0x339598+0x2)+_0x4c80b6['description']+_0x5020d2);}return _0x3e6949['push'](''),_0x3e6949[_0x4b9b6f(0x111)](_0x4b9b6f(0xe5)+CLI_BIN_NAME+'\x20'+_0x4a0b5f+'\x20<command>\x20--help`\x20for\x20flag\x20details.'),_0x3e6949[_0x4b9b6f(0x111)](''),_0x3e6949['join']('\x0a');}export function generateFullHelp(){const _0x5762e0=a104_0x51137,_0x246049=[];_0x246049[_0x5762e0(0x111)](''),_0x246049[_0x5762e0(0x111)](_0x5762e0(0x10e)),_0x246049[_0x5762e0(0x111)](''),_0x246049[_0x5762e0(0x111)](_0x5762e0(0xe3)),_0x246049[_0x5762e0(0x111)](_0x5762e0(0xda)+CLI_BIN_NAME+_0x5762e0(0xf1)),_0x246049[_0x5762e0(0x111)](''),_0x246049[_0x5762e0(0x111)](_0x5762e0(0x11e)),_0x246049[_0x5762e0(0x111)](_0x5762e0(0x106)),_0x246049[_0x5762e0(0x111)](_0x5762e0(0x11d)),_0x246049[_0x5762e0(0x111)](_0x5762e0(0xef)),_0x246049[_0x5762e0(0x111)](_0x5762e0(0xf0)),_0x246049[_0x5762e0(0x111)]('\x20\x20\x20\x20--yes\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20confirmation\x20for\x20high-risk\x20writes'),_0x246049['push'](_0x5762e0(0xf8)),_0x246049[_0x5762e0(0x111)]('\x20\x20\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help'),_0x246049[_0x5762e0(0x111)](_0x5762e0(0x109)),_0x246049['push'](''),_0x246049[_0x5762e0(0x111)]('\x20\x20COMMANDS'),_0x246049[_0x5762e0(0x111)]('');for(const _0x2c67a9 of serviceRegistry){_0x246049['push']('\x20\x20'+_0x2c67a9['label']);if(_0x2c67a9['isSingleCommand']){const _0x29b346=_0x2c67a9[_0x5762e0(0x103)][0x0],_0x3631de=_0x29b346[_0x5762e0(0xea)]??'';_0x246049[_0x5762e0(0x111)](_0x5762e0(0xdd)+_0x2c67a9[_0x5762e0(0xf3)][_0x5762e0(0xe4)](0x12)+_0x29b346[_0x5762e0(0x110)]+_0x3631de);}else{const _0x5ce8ac=_0x2c67a9[_0x5762e0(0x103)][_0x5762e0(0x11b)](_0x2c2e03=>_0x2c67a9['service']+'\x20'+_0x2c2e03[_0x5762e0(0x10a)]),_0x1aa710=Math[_0x5762e0(0xfe)](..._0x5ce8ac['map'](_0x465051=>_0x465051['length']));for(let _0xf5b21a=0x0;_0xf5b21a<_0x2c67a9[_0x5762e0(0x103)][_0x5762e0(0xf4)];_0xf5b21a++){const _0x1105f7=_0x2c67a9['commands'][_0xf5b21a],_0x32d5fb=_0x1105f7[_0x5762e0(0xea)]??'';_0x246049[_0x5762e0(0x111)]('\x20\x20\x20\x20'+_0x5ce8ac[_0xf5b21a]['padEnd'](_0x1aa710+0x2)+_0x1105f7[_0x5762e0(0x110)]+_0x32d5fb);}}_0x246049[_0x5762e0(0x111)]('');}return _0x246049[_0x5762e0(0x111)](_0x5762e0(0xe5)+CLI_BIN_NAME+_0x5762e0(0xe7)),_0x246049[_0x5762e0(0x111)](''),_0x246049[_0x5762e0(0x108)]('\x0a');}export function generateLegacyCommandHelp(_0x443c20,_0x5d1094,_0x4f8578){const _0x4cb8ee=a104_0x51137,_0x191d5b=[],_0x526363=CLI_BIN_NAME+'\x20'+_0x443c20+'\x20'+_0x5d1094;_0x191d5b[_0x4cb8ee(0x111)](''),_0x191d5b['push']('\x20\x20'+_0x4f8578[_0x4cb8ee(0x110)]),_0x191d5b['push'](''),_0x191d5b[_0x4cb8ee(0x111)](_0x4cb8ee(0xe3)),_0x191d5b['push'](_0x4cb8ee(0xdd)+(_0x4f8578[_0x4cb8ee(0x117)]??_0x526363+'\x20[flags]')),_0x191d5b[_0x4cb8ee(0x111)]('');if(_0x4f8578[_0x4cb8ee(0x118)]&&_0x4f8578[_0x4cb8ee(0x118)][_0x4cb8ee(0xf4)]>0x0){_0x191d5b['push']('\x20\x20FLAGS');const _0x5c7a76=Math['max'](..._0x4f8578[_0x4cb8ee(0x118)]['map'](_0x394b0c=>formatFlagName(_0x394b0c)['length']));for(const _0x17add5 of _0x4f8578[_0x4cb8ee(0x118)]){const _0x40738c=formatFlagName(_0x17add5)[_0x4cb8ee(0xe4)](_0x5c7a76+0x2);let _0x3cd415=_0x17add5[_0x4cb8ee(0x110)];_0x17add5[_0x4cb8ee(0x115)]&&_0x17add5[_0x4cb8ee(0x115)][_0x4cb8ee(0xf4)]>0x0&&(_0x3cd415+='\x20('+_0x17add5[_0x4cb8ee(0x115)][_0x4cb8ee(0x108)](_0x4cb8ee(0x113))+')'),_0x17add5[_0x4cb8ee(0xe0)]!==undefined&&_0x17add5[_0x4cb8ee(0xe0)]!==''&&(_0x3cd415+=_0x4cb8ee(0xdc)+_0x17add5['default']+']'),_0x17add5[_0x4cb8ee(0x100)]&&(_0x3cd415+=_0x4cb8ee(0xf7)),_0x191d5b['push'](_0x4cb8ee(0xdd)+_0x40738c+_0x3cd415);}_0x191d5b[_0x4cb8ee(0x111)]('');}return _0x191d5b[_0x4cb8ee(0x108)]('\x0a');}function buildAllFlags(_0x356de0){const _0x1f4520=a104_0x51137,_0xab8884=[..._0x356de0[_0x1f4520(0x118)]];return _0x356de0[_0x1f4520(0xd8)]&&_0xab8884[_0x1f4520(0x111)]({'name':'dry-run','type':_0x1f4520(0x104),'description':_0x1f4520(0xfc)}),_0x356de0[_0x1f4520(0x119)]!==![]&&_0xab8884[_0x1f4520(0x111)]({'name':'format','type':_0x1f4520(0x11a),'default':_0x1f4520(0xed),'enum':['json','pretty','table'],'description':_0x1f4520(0x107)}),_0x356de0[_0x1f4520(0x105)]===_0x1f4520(0xee)&&_0xab8884['push']({'name':_0x1f4520(0xd9),'type':_0x1f4520(0x104),'description':_0x1f4520(0xfa)}),_0xab8884;}function formatFlagName(_0x101d7e){const _0x130da8=a104_0x51137,_0xcc4fc4=_0x101d7e[_0x130da8(0x10f)]===_0x130da8(0x104)?'':_0x101d7e[_0x130da8(0x10f)]===_0x130da8(0xf2)?_0x130da8(0x11c):_0x130da8(0xe6);return'--'+_0x101d7e[_0x130da8(0xeb)]+_0xcc4fc4;}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a7a04,_0x11a8b6){var _0x20e150=a105_0x1793,_0x36f222=_0x4a7a04();while(!![]){try{var _0x315b56=parseInt(_0x20e150(0xe0))/0x1*(-parseInt(_0x20e150(0xdf))/0x2)+parseInt(_0x20e150(0xde))/0x3+parseInt(_0x20e150(0xe3))/0x4+-parseInt(_0x20e150(0xdd))/0x5*(-parseInt(_0x20e150(0xe5))/0x6)+parseInt(_0x20e150(0xe1))/0x7*(-parseInt(_0x20e150(0xe2))/0x8)+parseInt(_0x20e150(0xe4))/0x9+parseInt(_0x20e150(0xdc))/0xa;if(_0x315b56===_0x11a8b6)break;else _0x36f222['push'](_0x36f222['shift']());}catch(_0x5cb1f8){_0x36f222['push'](_0x36f222['shift']());}}}(a105_0x1009,0x94f59));export{runCommand}from'./runner.js';function a105_0x1793(_0x5a3cbb,_0x50896c){_0x5a3cbb=_0x5a3cbb-0xdc;var _0x100923=a105_0x1009();var _0x1793dc=_0x100923[_0x5a3cbb];return _0x1793dc;}export{parseFlags,validateFlags}from'./flags.js';function a105_0x1009(){var _0x306bc7=['2659098ohKcKe','40gXhqkY','30047hdXPec','7RUTbAK','5931824TkbeTM','2554852xkPnVQ','1223127sTECEQ','84tPIeDL','1089430MCCUop','65225tXgFaS'];a105_0x1009=function(){return _0x306bc7;};return a105_0x1009();}export{formatOutput}from'./output.js';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(_0x3a9408,_0x38a9b0){const _0x3e483d=a106_0x1139,_0x264136=_0x3a9408();while(!![]){try{const _0x1fdaf7=-parseInt(_0x3e483d(0xd5))/0x1+parseInt(_0x3e483d(0xd3))/0x2+parseInt(_0x3e483d(0xdd))/0x3+-parseInt(_0x3e483d(0xe5))/0x4*(parseInt(_0x3e483d(0xea))/0x5)+parseInt(_0x3e483d(0xd1))/0x6+parseInt(_0x3e483d(0xcf))/0x7+-parseInt(_0x3e483d(0xd7))/0x8*(parseInt(_0x3e483d(0xcd))/0x9);if(_0x1fdaf7===_0x38a9b0)break;else _0x264136['push'](_0x264136['shift']());}catch(_0x404818){_0x264136['push'](_0x264136['shift']());}}}(a106_0x19dd,0xe04b0));export function formatOutput(_0x558ce7,_0x21e05d){const _0x220b44=a106_0x1139,{format:_0x5cfe60}=_0x21e05d;switch(_0x5cfe60){case _0x220b44(0xdb):printJson(_0x558ce7,_0x21e05d);break;case'table':printTable(_0x558ce7,_0x21e05d);break;case'pretty':default:printPretty(_0x558ce7,_0x21e05d);break;}}function printJson(_0x596761,_0x51895c){const _0x20dd26=a106_0x1139,_0x490eb3={'ok':_0x596761['ok'],'command':_0x51895c[_0x20dd26(0xe8)],'risk':_0x51895c[_0x20dd26(0xd6)]};if(_0x51895c['dryRun'])_0x490eb3['dryRun']=!![];if(_0x596761[_0x20dd26(0xe2)]!==undefined)_0x490eb3[_0x20dd26(0xe2)]=_0x596761[_0x20dd26(0xe2)];!_0x596761['ok']&&_0x596761[_0x20dd26(0xe7)]&&(_0x490eb3[_0x20dd26(0xca)]={'code':'command_error','message':_0x596761['message']}),process['stdout']['write'](JSON[_0x20dd26(0xde)](_0x490eb3,null,0x2)+'\x0a');}function a106_0x1139(_0x5c351e,_0x4a5591){_0x5c351e=_0x5c351e-0xc9;const _0x19dd00=a106_0x19dd();let _0x1139c8=_0x19dd00[_0x5c351e];return _0x1139c8;}function printPretty(_0x5b377f,_0x22024c){const _0x3e2a2d=a106_0x1139;if(_0x22024c[_0x3e2a2d(0xcb)]){console[_0x3e2a2d(0xe4)]('[dry-run]\x20Would\x20execute:'),console[_0x3e2a2d(0xe4)](JSON[_0x3e2a2d(0xde)](_0x5b377f[_0x3e2a2d(0xe2)],null,0x2));return;}if(!_0x5b377f['ok']){console[_0x3e2a2d(0xca)]('Error:\x20'+(_0x5b377f[_0x3e2a2d(0xe7)]??_0x3e2a2d(0xd8)));return;}const _0x36b1c5=_0x5b377f[_0x3e2a2d(0xe2)];if(_0x36b1c5===undefined||_0x36b1c5===null){if(_0x5b377f[_0x3e2a2d(0xe7)])console[_0x3e2a2d(0xe4)](_0x5b377f[_0x3e2a2d(0xe7)]);return;}if(Array[_0x3e2a2d(0xe3)](_0x36b1c5)){printArrayPretty(_0x36b1c5);return;}if(typeof _0x36b1c5===_0x3e2a2d(0xc9)){printObjectPretty(_0x36b1c5);return;}console[_0x3e2a2d(0xe4)](String(_0x36b1c5));}function printObjectPretty(_0x3d88a5){const _0x190957=a106_0x1139,_0x2b95d6=Math['max'](...Object[_0x190957(0xd4)](_0x3d88a5)[_0x190957(0xe9)](_0x506759=>_0x506759[_0x190957(0xd9)]),0x0);for(const [_0x5587d7,_0x6407d7]of Object[_0x190957(0xe0)](_0x3d88a5)){if(_0x6407d7===undefined||_0x6407d7===null)continue;const _0x309902=_0x5587d7[_0x190957(0xcc)](_0x2b95d6);typeof _0x6407d7==='object'?console[_0x190957(0xe4)](_0x309902+'\x20\x20'+JSON[_0x190957(0xde)](_0x6407d7)):console[_0x190957(0xe4)](_0x309902+'\x20\x20'+_0x6407d7);}}function printArrayPretty(_0x3199d6){const _0x4316c2=a106_0x1139;if(_0x3199d6[_0x4316c2(0xd9)]===0x0){console[_0x4316c2(0xe4)](_0x4316c2(0xce));return;}console[_0x4316c2(0xe4)]('Found\x20'+_0x3199d6[_0x4316c2(0xd9)]+_0x4316c2(0xd0));for(const _0x372d52 of _0x3199d6){if(typeof _0x372d52===_0x4316c2(0xc9)&&_0x372d52!==null){const _0x5f54c5=Object[_0x4316c2(0xdc)](_0x372d52)[_0x4316c2(0xe1)](0x0,0x4)[_0x4316c2(0xd2)]('\x20\x20');console['log']('\x20\x20'+_0x5f54c5);}else console[_0x4316c2(0xe4)]('\x20\x20'+_0x372d52);}}function a106_0x19dd(){const _0x3501ac=['12304pphfZE','Unknown\x20error','length','Error:\x20','json','values','3168780VudkHI','stringify','repeat','entries','slice','data','isArray','log','40gYeNGs','max','message','command','map','54305atDudm','object','error','dryRun','padEnd','2835nHXKsW','(empty)','9666566AoApVx','\x20items:\x0a','202686mddJxo','join','728588nosVIb','keys','1323489mRtFam','risk'];a106_0x19dd=function(){return _0x3501ac;};return a106_0x19dd();}function printTable(_0x2bc45f,_0x11877f){const _0x5323b6=a106_0x1139,_0x3f2180=_0x2bc45f[_0x5323b6(0xe2)];if(!_0x2bc45f['ok']){console[_0x5323b6(0xca)](_0x5323b6(0xda)+(_0x2bc45f[_0x5323b6(0xe7)]??'Unknown\x20error'));return;}const _0x1c9139=Array[_0x5323b6(0xe3)](_0x3f2180)?_0x3f2180:_0x3f2180?[_0x3f2180]:[];if(_0x1c9139['length']===0x0){console[_0x5323b6(0xe4)](_0x5323b6(0xce));return;}const _0x5af4a6=Object[_0x5323b6(0xd4)](_0x1c9139[0x0]),_0x2dd3d0=_0x5af4a6['map'](_0x2fe7b0=>Math[_0x5323b6(0xe6)](_0x2fe7b0[_0x5323b6(0xd9)],..._0x1c9139['map'](_0x8423fe=>String(_0x8423fe[_0x2fe7b0]??'')[_0x5323b6(0xd9)]))),_0x1ee283=_0x5af4a6[_0x5323b6(0xe9)]((_0x2dc96f,_0x438532)=>_0x2dc96f[_0x5323b6(0xcc)](_0x2dd3d0[_0x438532]))['join']('\x20\x20'),_0x3b03dd=_0x2dd3d0[_0x5323b6(0xe9)](_0x3c8961=>'-'[_0x5323b6(0xdf)](_0x3c8961))['join']('\x20\x20');console[_0x5323b6(0xe4)](_0x1ee283),console[_0x5323b6(0xe4)](_0x3b03dd);for(const _0x427f1b of _0x1c9139){const _0x2a8c39=_0x5af4a6[_0x5323b6(0xe9)]((_0x21139a,_0x241e0b)=>String(_0x427f1b[_0x21139a]??'')['padEnd'](_0x2dd3d0[_0x241e0b]))[_0x5323b6(0xd2)]('\x20\x20');console['log'](_0x2a8c39);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11713f,_0x2ee707){var _0x2b231a=a107_0x3f1b,_0x5384b1=_0x11713f();while(!![]){try{var _0x1e75a9=-parseInt(_0x2b231a(0x1ca))/0x1*(parseInt(_0x2b231a(0x1c4))/0x2)+-parseInt(_0x2b231a(0x1c3))/0x3+parseInt(_0x2b231a(0x1cc))/0x4*(parseInt(_0x2b231a(0x1c6))/0x5)+-parseInt(_0x2b231a(0x1ce))/0x6*(-parseInt(_0x2b231a(0x1c9))/0x7)+parseInt(_0x2b231a(0x1cf))/0x8+-parseInt(_0x2b231a(0x1cb))/0x9+parseInt(_0x2b231a(0x1c8))/0xa;if(_0x1e75a9===_0x2ee707)break;else _0x5384b1['push'](_0x5384b1['shift']());}catch(_0x190862){_0x5384b1['push'](_0x5384b1['shift']());}}}(a107_0x4b3b,0x7153b));function a107_0x4b3b(){var _0xae8ea6=['paging','35QkhqSd','object','4573830jIQWTy','7HWZtiB','35441mxHbxR','1931445oAYzqp','116404CzGYOf','tableData','446226fiNHcs','4596288KlLpSX','isArray','1680969cLVlGV','4arBmEi'];a107_0x4b3b=function(){return _0xae8ea6;};return a107_0x4b3b();}export function extractList(_0x44b71){var _0x288f16=a107_0x3f1b;if(Array[_0x288f16(0x1c2)](_0x44b71))return _0x44b71;if(_0x44b71&&typeof _0x44b71===_0x288f16(0x1c7))return _0x44b71[_0x288f16(0x1cd)]??[];return[];}function a107_0x3f1b(_0x54c2e2,_0x2f9477){_0x54c2e2=_0x54c2e2-0x1c2;var _0x4b3b9d=a107_0x4b3b();var _0x3f1bbf=_0x4b3b9d[_0x54c2e2];return _0x3f1bbf;}export function extractPaging(_0x204af7){var _0x5db76d=a107_0x3f1b;if(_0x204af7&&typeof _0x204af7===_0x5db76d(0x1c7)&&!Array['isArray'](_0x204af7))return _0x204af7[_0x5db76d(0x1c5)];return undefined;}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x157fcd,_0x3689a1){const _0x36dcf6=a108_0x5204,_0xae4e50=_0x157fcd();while(!![]){try{const _0xbad260=parseInt(_0x36dcf6(0x21c))/0x1*(parseInt(_0x36dcf6(0x21f))/0x2)+parseInt(_0x36dcf6(0x207))/0x3+parseInt(_0x36dcf6(0x200))/0x4+-parseInt(_0x36dcf6(0x1f9))/0x5+-parseInt(_0x36dcf6(0x20d))/0x6+parseInt(_0x36dcf6(0x1f5))/0x7+-parseInt(_0x36dcf6(0x212))/0x8;if(_0xbad260===_0x3689a1)break;else _0xae4e50['push'](_0xae4e50['shift']());}catch(_0x53c3ea){_0xae4e50['push'](_0xae4e50['shift']());}}}(a108_0x4755,0xc8d29));import{riskLevelOrder}from'./types.js';import{parseFlags,validateFlags}from'./flags.js';function a108_0x4755(){const _0x1ce297=['pagesize','service','isNonInteractive','High-risk\x20operation\x20`','defaultVerbose','name','createInterface','1PIiidT','string','../core/api-client.js','305038aXZxJG','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','Command\x20`','defaultPageSize','requiresAppCode','dry-run','alias','./src/api','apiDomain','format','table','pretty','nonInteractive','No\x20api.ts\x20found\x20in\x20','code','\x22.\x0a','validate','selectedAppName','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','cancelled','risk','\x20api\x20pull`\x20first.','Available\x20aliases:\x20','map','cookie','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','number','rawFlags','toLowerCase','9098544gqPrij','command','node:readline','apiDir','1849425dJzNMp','requiresAuth','join','Unknown\x20alias\x20\x22','json','execute','resolveCookie','4935500rXDYJY','\x22.\x20','stderr','flags','validation','question','authRequired','2023635mqIdnU','type','defaultFormat','riskLevel','length','configMissing','659352pZigBS','resolveApiDomain','yes','dryRun','resolveAppCode','16467080iFnGMz','some','Set\x20appcode\x20via\x20`'];a108_0x4755=function(){return _0x1ce297;};return a108_0x4755();}import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a108_0x5204(_0x1138d8,_0x499c6d){_0x1138d8=_0x1138d8-0x1f1;const _0x47550f=a108_0x4755();let _0x5204f9=_0x47550f[_0x1138d8];return _0x5204f9;}export async function runCommand(_0x494ffc,_0x52e34e){const _0x1b4569=a108_0x5204,_0x23c5dc=CLI_BIN_NAME+'\x20'+_0x494ffc['service']+'\x20'+_0x494ffc[_0x1b4569(0x1f6)],_0x421872=parseFlags(_0x494ffc[_0x1b4569(0x203)],_0x52e34e[_0x1b4569(0x1f3)]);validateFlags(_0x494ffc[_0x1b4569(0x203)],_0x421872,_0x23c5dc);if(!_0x421872[_0x1b4569(0x224)]&&_0x52e34e[_0x1b4569(0x20a)]&&riskLevelOrder(_0x494ffc[_0x1b4569(0x233)])>riskLevelOrder(_0x52e34e['riskLevel']))throw CliErrors[_0x1b4569(0x204)](_0x1b4569(0x221)+_0x23c5dc+'`\x20has\x20risk\x20level\x20\x22'+_0x494ffc[_0x1b4569(0x233)]+_0x1b4569(0x220)+_0x52e34e[_0x1b4569(0x20a)]+_0x1b4569(0x22e)+'\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.');const _0x5d9acb=_0x52e34e[_0x1b4569(0x1f8)]||_0x1b4569(0x226);resolveAliasToCode(_0x494ffc,_0x421872,_0x5d9acb,_0x23c5dc);let _0x3d3f85='';if(_0x494ffc[_0x1b4569(0x1fa)]!==![]){_0x3d3f85=_0x52e34e[_0x1b4569(0x1ff)]();if(!_0x3d3f85)throw CliErrors[_0x1b4569(0x206)]();const {setActiveCookie:_0x5b9233}=await import(_0x1b4569(0x21e));_0x5b9233(_0x3d3f85);}let _0x4c6a98='';if(_0x494ffc[_0x1b4569(0x223)]!==![]){_0x4c6a98=_0x52e34e[_0x1b4569(0x211)]()??'';if(!_0x4c6a98)throw CliErrors[_0x1b4569(0x20c)](_0x1b4569(0x214)+CLI_BIN_NAME+_0x1b4569(0x1f1));}const _0x4ba61b=resolveFormat(_0x421872,_0x494ffc,_0x52e34e[_0x1b4569(0x209)]),_0x5b1b50=buildRuntimeContext({'appCode':_0x4c6a98,'cookie':_0x3d3f85,'apiDomain':_0x52e34e[_0x1b4569(0x20e)](),'format':_0x4ba61b,'flags':_0x421872,'def':_0x494ffc,'nonInteractive':_0x52e34e[_0x1b4569(0x217)],'defaultPageSize':_0x52e34e[_0x1b4569(0x222)],'defaultVerbose':_0x52e34e[_0x1b4569(0x219)],'apiDir':_0x5d9acb,'selectedAppName':_0x52e34e[_0x1b4569(0x230)]});_0x494ffc[_0x1b4569(0x22f)]&&await _0x494ffc[_0x1b4569(0x22f)](_0x5b1b50);if(_0x421872['dry-run']){if(!_0x494ffc[_0x1b4569(0x210)])throw CliErrors[_0x1b4569(0x204)]('--dry-run\x20is\x20not\x20supported\x20for\x20`'+_0x23c5dc+'`.');const _0x528e87=await _0x494ffc[_0x1b4569(0x210)](_0x5b1b50);formatOutput({'ok':!![],'data':_0x528e87},{'command':_0x23c5dc,'risk':_0x494ffc[_0x1b4569(0x233)],'format':_0x4ba61b,'dryRun':!![]});return;}if(_0x494ffc[_0x1b4569(0x233)]==='high-risk-write'&&!_0x421872[_0x1b4569(0x20f)]){if(_0x52e34e[_0x1b4569(0x217)])throw CliErrors[_0x1b4569(0x204)](_0x1b4569(0x218)+_0x23c5dc+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmation(_0x23c5dc);}const _0x88fd21=await _0x494ffc[_0x1b4569(0x1fe)](_0x5b1b50);formatOutput(_0x88fd21,{'command':_0x23c5dc,'risk':_0x494ffc[_0x1b4569(0x233)],'format':_0x4ba61b});}function buildRuntimeContext(_0x281902){const _0x27c664=a108_0x5204,{flags:_0x3a8b30,def:_0x4e671d}=_0x281902,_0x1cdcc7=CLI_BIN_NAME+'\x20'+_0x4e671d[_0x27c664(0x216)]+'\x20'+_0x4e671d[_0x27c664(0x1f6)];return{'appCode':_0x281902['appCode'],'cookie':_0x281902[_0x27c664(0x237)],'apiDomain':_0x281902[_0x27c664(0x227)],'format':_0x281902[_0x27c664(0x228)],'nonInteractive':_0x281902[_0x27c664(0x22b)],'apiDir':_0x281902[_0x27c664(0x1f8)],'selectedAppName':_0x281902[_0x27c664(0x230)],'str'(_0x45520c){return String(_0x3a8b30[_0x45520c]??'');},'bool'(_0x5370e0){const _0x105074=_0x27c664;if(_0x3a8b30[_0x5370e0]===!![])return!![];if(_0x5370e0==='verbose'&&_0x281902[_0x105074(0x219)])return!![];return![];},'num'(_0x50379e,_0xe44942){const _0x1365a8=_0x27c664,_0xabe47a=_0x3a8b30[_0x50379e];if(typeof _0xabe47a===_0x1365a8(0x1f2))return _0xabe47a;if(_0x50379e===_0x1365a8(0x215)&&_0x281902['defaultPageSize']!=null)return _0x281902[_0x1365a8(0x222)];return _0xe44942??0x0;},'flag'(_0x3786fd){return _0x3a8b30[_0x3786fd];},'output'(_0x1c7c13){const _0x39dc1c=_0x27c664;formatOutput(_0x1c7c13,{'command':_0x1cdcc7,'risk':_0x4e671d[_0x39dc1c(0x233)],'format':_0x281902['format']});}};}function resolveFormat(_0x4e4904,_0x5c8e74,_0x222c57){const _0xe914bd=a108_0x5204;if(_0x5c8e74['hasFormat']===![])return _0xe914bd(0x22a);const _0x29779f=_0x4e4904[_0xe914bd(0x228)];if(_0x29779f===_0xe914bd(0x1fd)||_0x29779f===_0xe914bd(0x22a)||_0x29779f===_0xe914bd(0x229))return _0x29779f;if(_0x222c57)return _0x222c57;return _0xe914bd(0x22a);}async function requireConfirmation(_0x28d8f3){const _0x2ddde2=a108_0x5204,_0x55d469=await import(_0x2ddde2(0x1f7)),_0x162744=_0x55d469[_0x2ddde2(0x21b)]({'input':process['stdin'],'output':process[_0x2ddde2(0x202)]});return new Promise((_0x40d728,_0x22dfd8)=>{const _0x499b23=_0x2ddde2;_0x162744[_0x499b23(0x205)]('⚠\x20\x20High-risk\x20operation:\x20'+_0x28d8f3+_0x499b23(0x231),_0x526634=>{const _0x46f8fc=_0x499b23;_0x162744['close'](),_0x526634[_0x46f8fc(0x1f4)]()==='y'||_0x526634[_0x46f8fc(0x1f4)]()===_0x46f8fc(0x20f)?_0x40d728():_0x22dfd8(CliErrors[_0x46f8fc(0x232)]('Operation\x20cancelled\x20by\x20user.'));});});}function resolveAliasToCode(_0x259ce4,_0x1b0b20,_0x33e099,_0x5234c3){const _0x412336=a108_0x5204,_0x3c84a0=_0x259ce4[_0x412336(0x203)]['some'](_0x14f3d9=>_0x14f3d9[_0x412336(0x21a)]===_0x412336(0x22d)&&_0x14f3d9[_0x412336(0x208)]===_0x412336(0x21d)),_0x32b7ff=_0x259ce4['flags'][_0x412336(0x213)](_0x1367c1=>_0x1367c1['name']==='alias'&&_0x1367c1['type']===_0x412336(0x21d));if(!_0x3c84a0||!_0x32b7ff)return;const _0xc9d8f7=_0x1b0b20[_0x412336(0x22d)]?String(_0x1b0b20[_0x412336(0x22d)]):'',_0x5f3251=_0x1b0b20[_0x412336(0x225)]?String(_0x1b0b20['alias']):'';if(!_0xc9d8f7&&!_0x5f3251)throw CliErrors[_0x412336(0x204)]('`'+_0x5234c3+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x5f3251&&!_0xc9d8f7){const _0x51ac19=resolveAlias(_0x33e099,_0x5f3251);if(!_0x51ac19){const _0x132935=listAliases(_0x33e099)[_0x412336(0x236)](_0x3fc048=>_0x3fc048['alias']),_0x14e059=_0x132935[_0x412336(0x20b)]?_0x412336(0x235)+_0x132935[_0x412336(0x1fb)](',\x20'):_0x412336(0x22c)+_0x33e099+'.\x20Run\x20`'+CLI_BIN_NAME+_0x412336(0x234);throw CliErrors[_0x412336(0x204)](_0x412336(0x1fc)+_0x5f3251+_0x412336(0x201)+_0x14e059);}_0x1b0b20[_0x412336(0x22d)]=_0x51ac19;}}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x345e09,_0xea075d){const _0x57a985=a109_0x895d,_0x1c3a42=_0x345e09();while(!![]){try{const _0x2545fe=-parseInt(_0x57a985(0x1a5))/0x1*(-parseInt(_0x57a985(0x1a9))/0x2)+-parseInt(_0x57a985(0x1ac))/0x3+-parseInt(_0x57a985(0x1aa))/0x4*(parseInt(_0x57a985(0x1a1))/0x5)+-parseInt(_0x57a985(0x1a8))/0x6+-parseInt(_0x57a985(0x1a2))/0x7*(parseInt(_0x57a985(0x1ab))/0x8)+parseInt(_0x57a985(0x1a3))/0x9+-parseInt(_0x57a985(0x1a4))/0xa*(-parseInt(_0x57a985(0x1a7))/0xb);if(_0x2545fe===_0xea075d)break;else _0x1c3a42['push'](_0x1c3a42['shift']());}catch(_0x555a67){_0x1c3a42['push'](_0x1c3a42['shift']());}}}(a109_0x5185,0xb2b6b));export function riskLevelOrder(_0x31616e){const _0x182790=a109_0x895d,_0x5356a9={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x5356a9[_0x31616e??_0x182790(0x1a6)]??0x0;}function a109_0x895d(_0x24bd11,_0xc52b22){_0x24bd11=_0x24bd11-0x1a1;const _0x518517=a109_0x5185();let _0x895d45=_0x518517[_0x24bd11];return _0x895d45;}function a109_0x5185(){const _0x49a95f=['252412qIFCFj','4IqKVvr','2510632fVBqpZ','1180260EBRMxj','2721965rnwrrg','14EPSbJB','6551640kIHqBU','40tFIvac','8ZuQPmm','read','2602435ngsOeP','2318796yfnQhQ'];a109_0x5185=function(){return _0x49a95f;};return a109_0x5185();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a110_0xba8897=a110_0x3406;(function(_0x579656,_0xc508a){const _0x9a67d0=a110_0x3406,_0x1c1c90=_0x579656();while(!![]){try{const _0x19e0d0=-parseInt(_0x9a67d0(0xc6))/0x1+parseInt(_0x9a67d0(0xbf))/0x2*(-parseInt(_0x9a67d0(0xc3))/0x3)+parseInt(_0x9a67d0(0xc2))/0x4+parseInt(_0x9a67d0(0xc5))/0x5+parseInt(_0x9a67d0(0xc7))/0x6+parseInt(_0x9a67d0(0xc9))/0x7*(parseInt(_0x9a67d0(0xca))/0x8)+-parseInt(_0x9a67d0(0xc8))/0x9;if(_0x19e0d0===_0xc508a)break;else _0x1c1c90['push'](_0x1c1c90['shift']());}catch(_0x31847c){_0x1c1c90['push'](_0x1c1c90['shift']());}}}(a110_0x4db4,0xb6931));export const VERSION=a110_0xba8897(0xc1);export const GIT_TAG='v2.0.4-beta.4';function a110_0x4db4(){const _0xf476e3=['18QYCBcy','2026-04-02T07:44:44.617Z','6028325HqbcsY','172049NuFIgn','5964630ZihJZw','26279568ZSAJwx','16079PNxMLl','3992sTERHF','323588narzQb','2f3989a','2.0.4-beta.4','5858468sUpxfg'];a110_0x4db4=function(){return _0xf476e3;};return a110_0x4db4();}export const GIT_COMMIT=a110_0xba8897(0xc0);function a110_0x3406(_0x2481b5,_0x4aa7b7){_0x2481b5=_0x2481b5-0xbf;const _0x4db434=a110_0x4db4();let _0x340684=_0x4db434[_0x2481b5];return _0x340684;}export const BUILD_TIME=a110_0xba8897(0xc4);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a3ad1,_0x7c4b41){var _0x5d49ad=a111_0x4451,_0x3b6473=_0x5a3ad1();while(!![]){try{var _0x44f3fd=-parseInt(_0x5d49ad(0x118))/0x1*(parseInt(_0x5d49ad(0x11b))/0x2)+-parseInt(_0x5d49ad(0x115))/0x3*(parseInt(_0x5d49ad(0x110))/0x4)+parseInt(_0x5d49ad(0x11e))/0x5*(-parseInt(_0x5d49ad(0x112))/0x6)+parseInt(_0x5d49ad(0x11d))/0x7*(parseInt(_0x5d49ad(0x111))/0x8)+parseInt(_0x5d49ad(0x116))/0x9*(parseInt(_0x5d49ad(0x10c))/0xa)+parseInt(_0x5d49ad(0x113))/0xb*(parseInt(_0x5d49ad(0x119))/0xc)+parseInt(_0x5d49ad(0x11a))/0xd*(parseInt(_0x5d49ad(0x10b))/0xe);if(_0x44f3fd===_0x7c4b41)break;else _0x3b6473['push'](_0x3b6473['shift']());}catch(_0x3a3d44){_0x3b6473['push'](_0x3b6473['shift']());}}}(a111_0x4fd5,0x33a97));import a111_0x50b509 from'chalk';function a111_0x4fd5(){var _0x6686a=['5506iJWlEq','\x20--help','38381bFrSKE','191850hxxgwf','bold','572978rlloZi','130SFFRld','green','\x20\x20Rabetbase\x20CLI','log','207188uzmwYN','40WrNDls','42PsyZzR','11biVlmA','\x20to\x20view\x20available\x20commands.','21zvFXSe','155484RjkpWn','\x20\x20Use\x20','1HvLUqC','1719948FqAzJV','143QWuZKK'];a111_0x4fd5=function(){return _0x6686a;};return a111_0x4fd5();}function a111_0x4451(_0x1ff299,_0x4096f0){_0x1ff299=_0x1ff299-0x10b;var _0x4fd536=a111_0x4fd5();var _0x44518a=_0x4fd536[_0x1ff299];return _0x44518a;}import{CLI_BIN_NAME}from'./constant/cli.js';export function showHelp(){var _0x3a361a=a111_0x4451;console['log'](),console[_0x3a361a(0x10f)](a111_0x50b509[_0x3a361a(0x10d)][_0x3a361a(0x11f)](_0x3a361a(0x10e))),console[_0x3a361a(0x10f)](),console[_0x3a361a(0x10f)](_0x3a361a(0x117)+a111_0x50b509[_0x3a361a(0x10d)]['bold'](CLI_BIN_NAME+_0x3a361a(0x11c))+_0x3a361a(0x114)),console[_0x3a361a(0x10f)]();}
|
package/lib/init/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x588afc,_0x324dd3){const _0x2fcd19=a112_0x3e50,_0xe6236d=_0x588afc();while(!![]){try{const _0x20b798=-parseInt(_0x2fcd19(0xd0))/0x1*(parseInt(_0x2fcd19(0xc8))/0x2)+parseInt(_0x2fcd19(0xd5))/0x3*(-parseInt(_0x2fcd19(0xe1))/0x4)+-parseInt(_0x2fcd19(0xcb))/0x5+parseInt(_0x2fcd19(0xdd))/0x6+parseInt(_0x2fcd19(0xdc))/0x7*(-parseInt(_0x2fcd19(0xe7))/0x8)+-parseInt(_0x2fcd19(0xd7))/0x9*(parseInt(_0x2fcd19(0xd4))/0xa)+parseInt(_0x2fcd19(0xe5))/0xb;if(_0x20b798===_0x324dd3)break;else _0xe6236d['push'](_0xe6236d['shift']());}catch(_0x92cfac){_0xe6236d['push'](_0xe6236d['shift']());}}}(a112_0x3a39,0x5623e));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a112_0x5c86f6 from'chalk';import{input,confirm}from'@inquirer/prompts';function a112_0x3e50(_0x48252b,_0x34eec0){_0x48252b=_0x48252b-0xc7;const _0x3a39f1=a112_0x3a39();let _0x3e50ac=_0x3a39f1[_0x48252b];return _0x3e50ac;}import{logger}from'../utils/logger.js';function a112_0x3a39(){const _0x3265e6=['utf8','env','17636BgOHzC','\x20\x20AppCode:\x20','info','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','18473708UQQpNF','parse','8oEGuVe','?\x20(Old\x20file\x20→\x20*.bak)','从旧配置文件升级成功','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','version','App\x20Code\x20cannot\x20be\x20empty','Upgrade\x20it\x20to\x20','string','\x20\x20appcode:\x20','log','.bak','Please\x20enter\x20App\x20Code:','appcode','yellow','cwd','toLocaleString','\x20→\x20.rabetbase.json','✓\x20Upgraded\x20','1086yOChxP','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','package.json','697455xXnGSr','1.0.0','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','.rabetbase.json','init','818frGOvL','../..','gray','setLogPath','20AihqaX','366RlunIH','green','1858392FNazYN','cyan','bold','Migration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.','trim','1604526jTmOfq','2622954qYUeYR','app'];a112_0x3a39=function(){return _0x3265e6;};return a112_0x3a39();}import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../context.js';import{validateAppcode}from'../commands/common/validate.js';export async function initConfig(_0x1bd477){const _0x23d04a=a112_0x3e50,{appcode:_0x505f66,env:_0x4f9cd1,autoYes:_0x4f9545}=_0x1bd477,_0x221013=process[_0x23d04a(0xf5)]();if(getProjectConfigPath())throw new Error(_0x23d04a(0xcd));let _0x31d1ec;for(const _0x25513b of LEGACY_CONFIG_NAMES){const _0x306ddb=resolve(_0x221013,_0x25513b);if(existsSync(_0x306ddb)){_0x31d1ec=_0x306ddb;break;}}if(_0x31d1ec){let _0x42e92a={};try{_0x42e92a=JSON[_0x23d04a(0xe6)](readFileSync(_0x31d1ec,_0x23d04a(0xdf)));}catch{}const _0x4227d8=basename(_0x31d1ec),_0x35a9cf=_0x42e92a?.[_0x23d04a(0xf3)]||_0x42e92a?.[_0x23d04a(0xde)];let _0x4c1dc4=_0x4f9545;!_0x4f9545&&(console[_0x23d04a(0xf0)](a112_0x5c86f6[_0x23d04a(0xf4)](_0x23d04a(0xe4)+a112_0x5c86f6[_0x23d04a(0xd9)](_0x4227d8))),_0x35a9cf&&console[_0x23d04a(0xf0)](a112_0x5c86f6[_0x23d04a(0xd8)](_0x23d04a(0xef)+_0x35a9cf)),_0x4c1dc4=await confirm({'message':_0x23d04a(0xed)+a112_0x5c86f6[_0x23d04a(0xd9)](_0x23d04a(0xce))+_0x23d04a(0xe8),'default':!![]}));if(!_0x4c1dc4){console[_0x23d04a(0xf0)](_0x23d04a(0xda));return;}const _0x160119=resolve(_0x221013,NEW_CONFIG_NAME),_0x53be2b=getCliVersionFromPkg(),_0x352cc1=readRawConfig(),_0x263abe={..._0x352cc1,..._0x42e92a,'version':_0x53be2b,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x31d1ec};if(!_0x263abe[_0x23d04a(0xf3)]&&!_0x263abe[_0x23d04a(0xde)]){if(!_0x505f66){const _0x3d93c5=await askAppcode();_0x263abe[_0x23d04a(0xf3)]=_0x3d93c5;}else _0x263abe[_0x23d04a(0xf3)]=_0x505f66;}if(_0x263abe[_0x23d04a(0xe0)]&&typeof _0x263abe[_0x23d04a(0xe0)]!==_0x23d04a(0xee))delete _0x263abe[_0x23d04a(0xe0)];else!_0x263abe[_0x23d04a(0xe0)]&&(_0x263abe[_0x23d04a(0xe0)]=_0x352cc1[_0x23d04a(0xe0)]||'production');writeConfigFile(_0x160119,_0x263abe);const _0x7e2042=_0x31d1ec+_0x23d04a(0xf1);renameSync(_0x31d1ec,_0x7e2042),logger[_0x23d04a(0xd3)](_0x221013),logger[_0x23d04a(0xe3)](_0x23d04a(0xcf),_0x23d04a(0xe9),{'from':_0x31d1ec,'to':_0x160119,'appcode':_0x263abe['appcode']||_0x263abe[_0x23d04a(0xde)],'env':_0x263abe['env']}),console[_0x23d04a(0xf0)](a112_0x5c86f6[_0x23d04a(0xd6)](_0x23d04a(0xc7)+_0x4227d8+_0x23d04a(0xf7))),console[_0x23d04a(0xf0)](a112_0x5c86f6[_0x23d04a(0xd8)](_0x23d04a(0xe2)+(_0x263abe['appcode']||_0x263abe[_0x23d04a(0xde)]))),console['log'](a112_0x5c86f6[_0x23d04a(0xd2)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x4227d8+'.bak'));return;}const _0xdd8809=_0x505f66||await askAppcode(),_0x325975=resolve(_0x221013,NEW_CONFIG_NAME),_0x266c40=getCliVersionFromPkg(),_0x1d4138=readRawConfig(),_0x29fcee=typeof _0x1d4138[_0x23d04a(0xe0)]===_0x23d04a(0xee)?_0x1d4138[_0x23d04a(0xe0)]:undefined,_0xea1c0f={'version':_0x266c40,'createdAt':new Date()[_0x23d04a(0xf6)](),'appcode':_0xdd8809,'env':_0x4f9cd1||_0x29fcee||'production'};writeConfigFile(_0x325975,_0xea1c0f),logger[_0x23d04a(0xd3)](_0x221013),logger[_0x23d04a(0xe3)](_0x23d04a(0xcf),'初始化项目配置文件成功',{'appcode':_0xea1c0f[_0x23d04a(0xf3)],'env':_0xea1c0f[_0x23d04a(0xe0)],'version':_0xea1c0f[_0x23d04a(0xeb)],'configPath':_0x325975}),console[_0x23d04a(0xf0)](a112_0x5c86f6[_0x23d04a(0xd6)](_0x23d04a(0xea))),console['log'](a112_0x5c86f6[_0x23d04a(0xd8)](_0x23d04a(0xe2)+_0xdd8809)),console[_0x23d04a(0xf0)](_0x23d04a(0xc9));}function askAppcode(){const _0x56b7fb=a112_0x3e50;return input({'message':_0x56b7fb(0xf2),'validate':_0x390e2b=>{const _0x25b067=_0x56b7fb;if(!_0x390e2b[_0x25b067(0xdb)]())return _0x25b067(0xec);const {valid:_0x58ab29,message:_0x19cd91}=validateAppcode(_0x390e2b[_0x25b067(0xdb)]());return _0x58ab29||_0x19cd91||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0xc7f34d=a112_0x3e50;try{const _0x163845=fileURLToPath(import.meta.url),_0x4a2347=resolve(dirname(_0x163845),_0xc7f34d(0xd1)),_0x4bcff4=JSON[_0xc7f34d(0xe6)](readFileSync(resolve(_0x4a2347,_0xc7f34d(0xca)),_0xc7f34d(0xdf)));return _0x4bcff4[_0xc7f34d(0xeb)]||'1.0.0';}catch{return _0xc7f34d(0xcc);}}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x37c53d,_0x28c12a){const _0x4ee683=a113_0x281f,_0x1f1eb9=_0x37c53d();while(!![]){try{const _0x1d4d18=-parseInt(_0x4ee683(0x155))/0x1+parseInt(_0x4ee683(0x150))/0x2*(parseInt(_0x4ee683(0x14f))/0x3)+parseInt(_0x4ee683(0x143))/0x4*(parseInt(_0x4ee683(0x147))/0x5)+parseInt(_0x4ee683(0x158))/0x6*(-parseInt(_0x4ee683(0x159))/0x7)+-parseInt(_0x4ee683(0x15f))/0x8*(parseInt(_0x4ee683(0x15c))/0x9)+-parseInt(_0x4ee683(0x156))/0xa*(parseInt(_0x4ee683(0x145))/0xb)+-parseInt(_0x4ee683(0x153))/0xc*(-parseInt(_0x4ee683(0x14b))/0xd);if(_0x1d4d18===_0x28c12a)break;else _0x1f1eb9['push'](_0x1f1eb9['shift']());}catch(_0x81c746){_0x1f1eb9['push'](_0x1f1eb9['shift']());}}}(a113_0x9673,0x52816));import{logger}from'../utils/logger.js';function a113_0x9673(){const _0x3db5d1=['112rWHeJr','entries','1229789FSmfLI','push','27220bOcdMl','help','error','argv','221zXtRYN','-$1','(empty)','replace','590517LICXgs','2BDlCJB','log','length','448284vPJNmy','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','100040DkykRu','30UNyLTS','startsWith','87684GQgLwd','7pwXEbH','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20rabetbase\x20skill\x20--help\x0a\x20\x20rabetbase\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','enable-bff-save','27sqWEyR','from','dangerously-bff-save','523592RXcGnj','\x20\x20rabetbase\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','skill','--help','Equivalent\x20command:\x20','has','cwd','slice'];a113_0x9673=function(){return _0x3db5d1;};return a113_0x9673();}export function camelCaseFlagsToKebab(_0x181cea){const _0x4941c5=a113_0x281f,_0x2fbd04=[];for(const [_0x2f5280,_0x5cb3df]of Object[_0x4941c5(0x144)](_0x181cea)){if(_0x5cb3df===!![]){const _0xce2046=_0x2f5280[_0x4941c5(0x14e)](/([A-Z])/g,_0x4941c5(0x14c))['toLowerCase']();_0x2fbd04[_0x4941c5(0x146)](_0xce2046);}}return _0x2fbd04;}export function parseDynamicFlags(){const _0x76d4e=a113_0x281f,_0x23513d=[];for(let _0x15ef04=0x3;_0x15ef04<process[_0x76d4e(0x14a)][_0x76d4e(0x152)];_0x15ef04++){const _0x121224=process[_0x76d4e(0x14a)][_0x15ef04];if(_0x121224&&_0x121224[_0x76d4e(0x157)]('--')){const _0x30360e=_0x121224[_0x76d4e(0x142)](0x2);_0x30360e&&!_0x30360e['includes']('=')&&_0x23513d[_0x76d4e(0x146)](_0x30360e);}}return _0x23513d;}export function getAllProvidedFlags(_0x4f3ad4){const _0x36ce4d=a113_0x281f,_0x5c19d1=camelCaseFlagsToKebab(_0x4f3ad4),_0x25826e=parseDynamicFlags(),_0x84fee8=new Set([..._0x5c19d1,..._0x25826e]);return Array[_0x36ce4d(0x15d)](_0x84fee8);}export function normalizeLegacyBffSaveFlags(_0x2e2687){const _0x5ba168=a113_0x281f,_0x43825b=new Set(_0x2e2687);return _0x43825b[_0x5ba168(0x164)](_0x5ba168(0x15e))&&_0x43825b['add'](_0x5ba168(0x15b)),Array[_0x5ba168(0x15d)](_0x43825b);}function a113_0x281f(_0x3fc4fd,_0x3547e8){_0x3fc4fd=_0x3fc4fd-0x141;const _0x967370=a113_0x9673();let _0x281fab=_0x967370[_0x3fc4fd];return _0x281fab;}const SKILLS_INSTALL_COMMAND_LINE='npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global';export async function skillsCommand(_0x299312,_0x393759,_0xe215c9){const _0x195111=a113_0x281f;logger['setLogPath'](process[_0x195111(0x141)]());if(_0xe215c9?.[_0x195111(0x148)]||_0x299312===_0x195111(0x162)){showHelp();return;}console[_0x195111(0x149)]('Error:\x20Unsupported\x20command:\x20'+(_0x299312||_0x195111(0x14d))),console['log']('\x0aAvailable\x20commands:'),console[_0x195111(0x151)]('\x20\x20rabetbase\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation'),console['log'](_0x195111(0x160)),console[_0x195111(0x151)](''),console[_0x195111(0x151)](_0x195111(0x163)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x195111(0x149)](_0x195111(0x161),'不支持的命令:\x20'+_0x299312),process['exit'](0x1);}function showHelp(){const _0x28c294=a113_0x281f;console[_0x28c294(0x151)](_0x28c294(0x15a)+SKILLS_INSTALL_COMMAND_LINE+_0x28c294(0x154));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x46bc9e=a114_0x564d;(function(_0x427c7f,_0x4cf5ff){const _0x540d7c=a114_0x564d,_0x2db1da=_0x427c7f();while(!![]){try{const _0x14b3e2=-parseInt(_0x540d7c(0xde))/0x1+parseInt(_0x540d7c(0xc5))/0x2*(-parseInt(_0x540d7c(0xd6))/0x3)+parseInt(_0x540d7c(0xdd))/0x4+parseInt(_0x540d7c(0xc7))/0x5*(-parseInt(_0x540d7c(0xd5))/0x6)+parseInt(_0x540d7c(0xd4))/0x7+parseInt(_0x540d7c(0xc4))/0x8+parseInt(_0x540d7c(0xc6))/0x9;if(_0x14b3e2===_0x4cf5ff)break;else _0x2db1da['push'](_0x2db1da['shift']());}catch(_0x591b62){_0x2db1da['push'](_0x2db1da['shift']());}}}(a114_0x102f,0x5865f));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI=a114_0x46bc9e(0xce);export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL=a114_0x46bc9e(0xdb);export const RABETBASE_SKILL_SOURCE=a114_0x46bc9e(0xd7);export const DEFAULT_RABETBASE_SKILL_NAME=a114_0x46bc9e(0xcd);export function buildNpxSkillsAddArgv(_0x28ba55=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x28ba55];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a114_0x46bc9e(0xd8),...buildNpxSkillsAddArgv()][a114_0x46bc9e(0xcf)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x5bc070,_0x214523){const _0x17a7b7=a114_0x46bc9e;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1d7be3=_0x214523?.[_0x17a7b7(0xca)]??'inherit',_0x4b8dff=resolveNpmBin('npx'),_0xe73290=buildNpxSkillsAddArgv(_0x214523?.[_0x17a7b7(0xd0)]??DEFAULT_RABETBASE_SKILL_NAME),_0x236ff5=[_0x4b8dff,..._0xe73290][_0x17a7b7(0xcf)]('\x20');console[_0x17a7b7(0xc8)]('*\x20'+_0x236ff5);const _0x15e3d6=spawnSync(_0x4b8dff,_0xe73290,{'cwd':_0x5bc070,'stdio':_0x1d7be3,'env':process.env,'shell':![]}),_0xb739f0=_0x15e3d6[_0x17a7b7(0xcc)];if(_0xb739f0===0x0)return{'ok':!![],'status':0x0};let _0x498fde=_0x17a7b7(0xc9)+(_0xb739f0??_0x17a7b7(0xd9));if(_0x1d7be3===_0x17a7b7(0xdc)){const _0x23ab03=_0x15e3d6[_0x17a7b7(0xd3)]?_0x15e3d6[_0x17a7b7(0xd3)]['toString']()[_0x17a7b7(0xd1)]():'',_0x2ebdac=_0x15e3d6['stdout']?_0x15e3d6[_0x17a7b7(0xda)][_0x17a7b7(0xd2)]()[_0x17a7b7(0xd1)]():'';if(_0x23ab03)_0x498fde=_0x23ab03;else{if(_0x2ebdac)_0x498fde=_0x2ebdac;}}return{'ok':![],'status':_0xb739f0??null,'error':_0x498fde};}function a114_0x102f(){const _0x2bb5d1=['skill','trim','toString','stderr','2400846Sqjaoc','4057554xLitiO','809427PKISbb','lovrabet/lovrabet-skill','npx','unknown','stdout','--skill','pipe','1868592fcWvmI','709417VUfxGE','78568DfNGQR','2mSmuBR','10778553jkNhsr','5OhhKlA','log','exit\x20','stdio','inherit','status','Lovrabet','skills','join'];a114_0x102f=function(){return _0x2bb5d1;};return a114_0x102f();}export function runNpxSkillsRemove(_0xed7dc4,_0xd0a8c3){const _0x216a44=a114_0x46bc9e,_0x1bc789=_0xd0a8c3?.[_0x216a44(0xca)]??'inherit',_0x448ae8=resolveNpmBin('npx'),_0x464c5a=[NPX_FLAG_YES,NPX_SKILLS_CLI,'remove',RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0xd0a8c3?.[_0x216a44(0xd0)]??DEFAULT_RABETBASE_SKILL_NAME],_0x254628=[_0x448ae8,..._0x464c5a][_0x216a44(0xcf)]('\x20');console[_0x216a44(0xc8)]('*\x20'+_0x254628);const _0x3dfb3c=spawnSync(_0x448ae8,_0x464c5a,{'cwd':_0xed7dc4,'stdio':_0x1bc789,'env':process.env,'shell':![]}),_0x1c473b=_0x3dfb3c[_0x216a44(0xcc)];if(_0x1c473b===0x0)return{'ok':!![],'status':0x0};let _0xc2e633=_0x216a44(0xc9)+(_0x1c473b??_0x216a44(0xd9));if(_0x1bc789===_0x216a44(0xdc)){const _0x3b9898=_0x3dfb3c['stderr']?_0x3dfb3c[_0x216a44(0xd3)]['toString']()[_0x216a44(0xd1)]():'',_0x5bbc7f=_0x3dfb3c[_0x216a44(0xda)]?_0x3dfb3c[_0x216a44(0xda)]['toString']()[_0x216a44(0xd1)]():'';if(_0x3b9898)_0xc2e633=_0x3b9898;else{if(_0x5bbc7f)_0xc2e633=_0x5bbc7f;}}return{'ok':![],'status':_0x1c473b??null,'error':_0xc2e633};}function a114_0x564d(_0x141601,_0xc54300){_0x141601=_0x141601-0xc4;const _0x102f91=a114_0x102f();let _0x564dfa=_0x102f91[_0x141601];return _0x564dfa;}export function runNpxSkillsAddGlobal(_0xb705a7,_0x4a6fc5,_0x2046f1){const _0x136db1=a114_0x46bc9e,_0x51813f=_0x2046f1?.[_0x136db1(0xca)]??_0x136db1(0xcb),_0x3798ff=resolveNpmBin(_0x136db1(0xd8)),_0x8fc410=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x4a6fc5,'--global'],_0x520fad=[_0x3798ff,..._0x8fc410][_0x136db1(0xcf)]('\x20');console[_0x136db1(0xc8)]('*\x20'+_0x520fad);const _0x1e1f44=spawnSync(_0x3798ff,_0x8fc410,{'cwd':_0xb705a7,'stdio':_0x51813f,'env':process.env,'shell':![]}),_0x2321c=_0x1e1f44[_0x136db1(0xcc)];if(_0x2321c===0x0)return{'ok':!![],'status':0x0};let _0x147cd2=_0x136db1(0xc9)+(_0x2321c??_0x136db1(0xd9));if(_0x51813f==='pipe'){const _0x2171e1=_0x1e1f44['stderr']?_0x1e1f44[_0x136db1(0xd3)][_0x136db1(0xd2)]()[_0x136db1(0xd1)]():'',_0x1a71ae=_0x1e1f44['stdout']?_0x1e1f44[_0x136db1(0xda)][_0x136db1(0xd2)]()[_0x136db1(0xd1)]():'';if(_0x2171e1)_0x147cd2=_0x2171e1;else{if(_0x1a71ae)_0x147cd2=_0x1a71ae;}}return{'ok':![],'status':_0x2321c??null,'error':_0x147cd2};}
|