@lovrabet/rabetbase-cli 2.0.4-beta.5 → 2.0.6
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/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/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/preview.js +1 -1
- package/lib/commands/project/index.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/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/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-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/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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x31d48e=a98_0x17a0;(function(_0x15722d,_0x4fa465){const _0x3fb48c=a98_0x17a0,_0x2a363b=_0x15722d();while(!![]){try{const _0x10c94d=-parseInt(_0x3fb48c(0xdf))/0x1+-parseInt(_0x3fb48c(0xd1))/0x2*(-parseInt(_0x3fb48c(0xd6))/0x3)+-parseInt(_0x3fb48c(0xdc))/0x4+parseInt(_0x3fb48c(0xd3))/0x5+-parseInt(_0x3fb48c(0xcd))/0x6*(-parseInt(_0x3fb48c(0xd0))/0x7)+-parseInt(_0x3fb48c(0xdb))/0x8*(-parseInt(_0x3fb48c(0xcf))/0x9)+-parseInt(_0x3fb48c(0xd8))/0xa*(-parseInt(_0x3fb48c(0xd5))/0xb);if(_0x10c94d===_0x4fa465)break;else _0x2a363b['push'](_0x2a363b['shift']());}catch(_0x20efb3){_0x2a363b['push'](_0x2a363b['shift']());}}}(a98_0x1d5b,0xd566f));import a98_0xe815cb from'node:path';import{fileURLToPath}from'node:url';import{copyDirectory}from'../utils/copy-directory.js';function a98_0x17a0(_0x551cf3,_0x184f46){_0x551cf3=_0x551cf3-0xcd;const _0x1d5bbf=a98_0x1d5b();let _0x17a0c4=_0x1d5bbf[_0x551cf3];return _0x17a0c4;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a98_0x1d5b(){const _0x159521=['33qbidGp','3576777akDeXi','../../templates/projects/sub-app-react-demo','1629990tVzwWk','error','now','9072848usnGvq','3657600qndfJB','copy','开始复制项目模板','1618755KOHuDx','cwd','resolve','9558GzNoVQ','dirname','9eUcLlu','2583uQkVRl','2BAAKpJ','message','20355OCOOvb','项目模板复制完成'];a98_0x1d5b=function(){return _0x159521;};return a98_0x1d5b();}const __dirname=a98_0xe815cb[a98_0x31d48e(0xce)](fileURLToPath(import.meta.url)),templateDir=a98_0xe815cb[a98_0x31d48e(0xe1)](__dirname,a98_0x31d48e(0xd7));export async function copyProjectTemplate(_0x419c60){const _0x5956f5=a98_0x31d48e,_0x3ca5a6=Date['now'](),_0x2375ef=a98_0xe815cb[_0x5956f5(0xe1)](process[_0x5956f5(0xe0)](),_0x419c60);try{logger['info'](_0x5956f5(0xdd),_0x5956f5(0xde),{'projectCode':_0x419c60,'templateDir':templateDir}),await copyDirectory(templateDir,_0x2375ef);const _0x31ad21=Date['now']()-_0x3ca5a6;logger['success'](_0x5956f5(0xdd),_0x5956f5(0xd4),_0x31ad21,{'projectCode':_0x419c60});}catch(_0x4c3156){const _0x97abe3=Date[_0x5956f5(0xda)]()-_0x3ca5a6;logger[_0x5956f5(0xd9)](_0x5956f5(0xdd),'项目模板复制失败',{'projectCode':_0x419c60,'error':_0x4c3156 instanceof Error?_0x4c3156[_0x5956f5(0xd2)]:String(_0x4c3156),'duration':_0x97abe3});throw _0x4c3156;}return formatElapsed(_0x3ca5a6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a99_0x55f9(){const _0x2e9117=['prettier','3123rNPPys','代码格式化完成','9628692VgDVDP','52RLXjlu','now','format','message','2706QzJvpC','1803109Utzzte','npx','error','32qVRVpx','开始格式化代码','1389188VlxGEX','info','cwd','5313087KmOAYe','success','404720YCpoFu','resolve','3347570QeegaR'];a99_0x55f9=function(){return _0x2e9117;};return a99_0x55f9();}(function(_0xb5dbe1,_0x19bd21){const _0x4b2eca=a99_0x268f,_0x465ffc=_0xb5dbe1();while(!![]){try{const _0x2a275d=parseInt(_0x4b2eca(0x1c2))/0x1+-parseInt(_0x4b2eca(0x1d2))/0x2*(-parseInt(_0x4b2eca(0x1cb))/0x3)+-parseInt(_0x4b2eca(0x1ce))/0x4*(parseInt(_0x4b2eca(0x1c7))/0x5)+-parseInt(_0x4b2eca(0x1cd))/0x6+parseInt(_0x4b2eca(0x1d3))/0x7*(parseInt(_0x4b2eca(0x1d6))/0x8)+-parseInt(_0x4b2eca(0x1c5))/0x9+parseInt(_0x4b2eca(0x1c9))/0xa;if(_0x2a275d===_0x19bd21)break;else _0x465ffc['push'](_0x465ffc['shift']());}catch(_0xd6a9f6){_0x465ffc['push'](_0x465ffc['shift']());}}}(a99_0x55f9,0xdf7a9));import a99_0x42545a from'node:path';import{execa}from'execa';function a99_0x268f(_0x33a288,_0x3e33c1){_0x33a288=_0x33a288-0x1c2;const _0x55f9e7=a99_0x55f9();let _0x268fe7=_0x55f9e7[_0x33a288];return _0x268fe7;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export async function formatProjectCode(_0x586469){const _0x2f5754=a99_0x268f,_0x4b9da0=Date[_0x2f5754(0x1cf)](),_0x567c11=a99_0x42545a[_0x2f5754(0x1c8)](process[_0x2f5754(0x1c4)](),_0x586469);try{logger[_0x2f5754(0x1c3)]('format',_0x2f5754(0x1d7),{'projectCode':_0x586469}),await execa(resolveNpmBin(_0x2f5754(0x1d4)),[_0x2f5754(0x1ca),'--write','.'],{'cwd':_0x567c11});const _0x253dba=Date[_0x2f5754(0x1cf)]()-_0x4b9da0;logger[_0x2f5754(0x1c6)]('format',_0x2f5754(0x1cc),_0x253dba,{'projectCode':_0x586469});}catch(_0x44c780){const _0x13f872=Date[_0x2f5754(0x1cf)]()-_0x4b9da0;logger[_0x2f5754(0x1d5)](_0x2f5754(0x1d0),'代码格式化失败',{'projectCode':_0x586469,'error':_0x44c780 instanceof Error?_0x44c780[_0x2f5754(0x1d1)]:String(_0x44c780),'duration':_0x13f872});throw _0x44c780;}return formatElapsed(_0x4b9da0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c6c8d,_0x314347){const _0x2e0dad=a100_0x598a,_0x944761=_0x1c6c8d();while(!![]){try{const _0x1a6483=-parseInt(_0x2e0dad(0x172))/0x1*(-parseInt(_0x2e0dad(0x17b))/0x2)+parseInt(_0x2e0dad(0x177))/0x3+-parseInt(_0x2e0dad(0x17f))/0x4*(-parseInt(_0x2e0dad(0x175))/0x5)+parseInt(_0x2e0dad(0x181))/0x6*(parseInt(_0x2e0dad(0x17a))/0x7)+-parseInt(_0x2e0dad(0x174))/0x8+parseInt(_0x2e0dad(0x173))/0x9+parseInt(_0x2e0dad(0x17d))/0xa*(-parseInt(_0x2e0dad(0x180))/0xb);if(_0x1a6483===_0x314347)break;else _0x944761['push'](_0x944761['shift']());}catch(_0x3fb362){_0x944761['push'](_0x944761['shift']());}}}(a100_0x5097,0x43f11));function a100_0x598a(_0x190905,_0x1c183d){_0x190905=_0x190905-0x172;const _0x5097dd=a100_0x5097();let _0x598acc=_0x5097dd[_0x190905];return _0x598acc;}import a100_0x5dc411 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';function a100_0x5097(){const _0x52111b=['3727999nmYGMC','38292VVVpRb','开始安装依赖','info','error','now','2LHUqJQ','763065uGZCHQ','718272KXAnWM','166475YnXJRG','npm','411954ivGFmE','install','https://registry.npmmirror.com','490mdUqEj','44098wborBx','--registry','20bdUGdU','message','40DpzcOl'];a100_0x5097=function(){return _0x52111b;};return a100_0x5097();}export async function installDependencies(_0x14d365){const _0x2d321c=a100_0x598a,_0x13559f=Date[_0x2d321c(0x185)](),_0x13e1d8=a100_0x5dc411['resolve'](process['cwd'](),_0x14d365);try{logger[_0x2d321c(0x183)](_0x2d321c(0x178),_0x2d321c(0x182),{'projectCode':_0x14d365,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x2d321c(0x176)),[_0x2d321c(0x178),_0x2d321c(0x17c),_0x2d321c(0x179)],{'cwd':_0x13e1d8});const _0x253d67=Date[_0x2d321c(0x185)]()-_0x13559f;logger['success'](_0x2d321c(0x178),'依赖安装完成',_0x253d67,{'projectCode':_0x14d365});}catch(_0x440e15){const _0x11fc39=Date[_0x2d321c(0x185)]()-_0x13559f;logger[_0x2d321c(0x184)](_0x2d321c(0x178),'依赖安装失败',{'projectCode':_0x14d365,'error':_0x440e15 instanceof Error?_0x440e15[_0x2d321c(0x17e)]:String(_0x440e15),'duration':_0x11fc39});throw _0x440e15;}return formatElapsed(_0x13559f);}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x268a7c=a101_0x334a;function a101_0x593f(){const _0x5293ba=['Network\x20error:\x20','not_in_project','18YJrjme','CliError','2699660DINPCK','1034678NMWZzy','name','hint','code','unknown_command','2437006ciuawp','join','90hzqrMY','validation_error','609392amKfmn','\x20project\x20directory','Run\x20`','auth_required','exitCode','Configuration\x20file\x20not\x20found','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','cancelled','Missing\x20required\x20flag:\x20--','network_error','4402554tzjgFR','\x20--help`\x20to\x20see\x20available\x20commands.','api_error','4916192cTopwY','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','7410522wnQJgk','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'];a101_0x593f=function(){return _0x5293ba;};return a101_0x593f();}(function(_0x2dc425,_0x5a0be9){const _0x55e54d=a101_0x334a,_0x894978=_0x2dc425();while(!![]){try{const _0x3b9770=-parseInt(_0x55e54d(0x76))/0x1+-parseInt(_0x55e54d(0x7b))/0x2+parseInt(_0x55e54d(0x73))/0x3*(-parseInt(_0x55e54d(0x7f))/0x4)+-parseInt(_0x55e54d(0x75))/0x5+-parseInt(_0x55e54d(0x6a))/0x6+-parseInt(_0x55e54d(0x6f))/0x7+-parseInt(_0x55e54d(0x6d))/0x8*(-parseInt(_0x55e54d(0x7d))/0x9);if(_0x3b9770===_0x5a0be9)break;else _0x894978['push'](_0x894978['shift']());}catch(_0x30be98){_0x894978['push'](_0x894978['shift']());}}}(a101_0x593f,0x9da02));import{CLI_BIN_NAME}from'./constant/cli.js';function a101_0x334a(_0x1cf8f9,_0x5d2800){_0x1cf8f9=_0x1cf8f9-0x65;const _0x593f49=a101_0x593f();let _0x334abb=_0x593f49[_0x1cf8f9];return _0x334abb;}export class CliError extends Error{[a101_0x268a7c(0x79)];['exitCode'];[a101_0x268a7c(0x78)];constructor(_0x4dfd85,_0x257739,_0x4e2833,_0x1fb944){const _0x3f6f37=a101_0x268a7c;super(_0x4e2833),this[_0x3f6f37(0x77)]=_0x3f6f37(0x74),this[_0x3f6f37(0x79)]=_0x4dfd85,this[_0x3f6f37(0x83)]=_0x257739,this[_0x3f6f37(0x78)]=_0x1fb944;}}export const CliErrors={'authRequired':_0x4db337=>new CliError(a101_0x268a7c(0x82),0x1,'Authentication\x20required',_0x4db337??a101_0x268a7c(0x81)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.'),'configMissing':_0x260b97=>new CliError('config_missing',0x1,a101_0x268a7c(0x65),_0x260b97??['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+a101_0x268a7c(0x6e),'Tip:\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a101_0x268a7c(0x7c)]('\x0a\x20\x20\x20\x20\x20\x20\x20')),'notInProject':()=>new CliError(a101_0x268a7c(0x72),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+a101_0x268a7c(0x80),a101_0x268a7c(0x70)),'apiError':(_0x2b8a7f,_0x539603)=>new CliError(a101_0x268a7c(0x6c),0x2,_0x2b8a7f,_0x539603),'networkError':_0x2a5d38=>new CliError(a101_0x268a7c(0x69),0x2,a101_0x268a7c(0x71)+_0x2a5d38,a101_0x268a7c(0x66)),'unknownCommand':_0x5ac146=>new CliError(a101_0x268a7c(0x7a),0x1,'Unknown\x20command:\x20'+_0x5ac146,a101_0x268a7c(0x81)+CLI_BIN_NAME+a101_0x268a7c(0x6b)),'flagMissing':(_0xbb5fe0,_0xa366c1)=>new CliError('flag_missing',0x1,a101_0x268a7c(0x68)+_0xbb5fe0,_0xa366c1),'validation':(_0x4b67cc,_0x171dd3)=>new CliError(a101_0x268a7c(0x7e),0x1,_0x4b67cc,_0x171dd3),'cancelled':_0x10a108=>new CliError(a101_0x268a7c(0x67),0x0,_0x10a108??'Operation\x20cancelled.',undefined)};
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x34e6(_0x451bae,_0x56ce12){_0x451bae=_0x451bae-0x192;const _0x391ea7=a102_0x391e();let _0x34e661=_0x391ea7[_0x451bae];return _0x34e661;}(function(_0x433ff0,_0x5a5fbc){const _0x5cf8dd=a102_0x34e6,_0x369e33=_0x433ff0();while(!![]){try{const _0x5ee7c0=parseInt(_0x5cf8dd(0x1af))/0x1+parseInt(_0x5cf8dd(0x1ab))/0x2*(-parseInt(_0x5cf8dd(0x194))/0x3)+parseInt(_0x5cf8dd(0x1b5))/0x4+parseInt(_0x5cf8dd(0x1b0))/0x5*(-parseInt(_0x5cf8dd(0x1b2))/0x6)+parseInt(_0x5cf8dd(0x1b1))/0x7+-parseInt(_0x5cf8dd(0x1a6))/0x8*(parseInt(_0x5cf8dd(0x193))/0x9)+parseInt(_0x5cf8dd(0x1a8))/0xa;if(_0x5ee7c0===_0x5a5fbc)break;else _0x369e33['push'](_0x369e33['shift']());}catch(_0x12fa27){_0x369e33['push'](_0x369e33['shift']());}}}(a102_0x391e,0xd5aca));import{CliErrors}from'../errors.js';export function parseFlags(_0x5e6d70,_0x336b66){const _0x429fc9=a102_0x34e6,_0x3d30b3={};for(const _0x3c7642 of _0x5e6d70){const _0x5dd4d6=_0x336b66[_0x3c7642[_0x429fc9(0x19e)]]??_0x336b66[toCamelCase(_0x3c7642[_0x429fc9(0x19e)])];if(_0x5dd4d6===undefined||_0x5dd4d6===null){_0x3c7642[_0x429fc9(0x199)]!==undefined&&(_0x3d30b3[_0x3c7642[_0x429fc9(0x19e)]]=_0x3c7642[_0x429fc9(0x199)]);continue;}_0x3d30b3[_0x3c7642[_0x429fc9(0x19e)]]=coerce(_0x3c7642,_0x5dd4d6);}for(const _0x2ab8a3 of[_0x429fc9(0x19c),'dryRun','yes',_0x429fc9(0x197)]){const _0x2c3c10=_0x336b66[_0x2ab8a3];if(_0x2c3c10!==undefined){const _0xc87fa5=_0x2ab8a3===_0x429fc9(0x1ae)?_0x429fc9(0x19c):_0x2ab8a3;_0x3d30b3[_0xc87fa5]=_0x2c3c10;}}return _0x3d30b3;}export function validateFlags(_0x209e76,_0x75ccd2,_0x25d844){const _0x35207e=a102_0x34e6;for(const _0x21db52 of _0x209e76){const _0x39a6da=_0x75ccd2[_0x21db52['name']];if(_0x21db52[_0x35207e(0x196)]&&(_0x39a6da===undefined||_0x39a6da===''))throw CliErrors[_0x35207e(0x1aa)](_0x21db52[_0x35207e(0x19e)],'--'+_0x21db52[_0x35207e(0x19e)]+_0x35207e(0x195)+_0x25d844+'`.');if(_0x21db52[_0x35207e(0x1ac)]&&_0x21db52[_0x35207e(0x1ac)][_0x35207e(0x1a1)]>0x0&&_0x39a6da!==undefined&&_0x39a6da!==''){if(!_0x21db52['enum'][_0x35207e(0x1a0)](String(_0x39a6da)))throw CliErrors['validation'](_0x35207e(0x19b)+_0x39a6da+_0x35207e(0x1ad)+_0x21db52[_0x35207e(0x19e)]+_0x35207e(0x19d)+_0x21db52['enum']['join'](',\x20'));}if(_0x21db52['pattern']&&_0x39a6da!==undefined&&_0x39a6da!==''){if(!_0x21db52[_0x35207e(0x1a2)][_0x35207e(0x19f)][_0x35207e(0x198)](String(_0x39a6da)))throw CliErrors[_0x35207e(0x1b4)](_0x35207e(0x19a)+_0x21db52['name']+_0x35207e(0x1a5)+_0x21db52[_0x35207e(0x1a2)][_0x35207e(0x1a4)]+_0x35207e(0x1a3)+_0x39a6da+'\x22.');}}}function a102_0x391e(){const _0x2e6a1e=['.\x20Allowed:\x20','name','regex','includes','length','pattern',',\x20got\x20\x22','description',':\x20expected\x20','3447064cDveDJ','replace','27254450xZwaej','true','flagMissing','98754aZImoi','enum','\x22\x20for\x20--','dryRun','230750wxSwaX','1685vBDIEL','996849amGvVZ','30522rmSEUt','number','validation','3834908myOYBz','toUpperCase','9lieBbO','63dyeBOq','\x20is\x20required\x20for\x20`','required','format','test','default','Invalid\x20--','Invalid\x20value\x20\x22','dry-run'];a102_0x391e=function(){return _0x2e6a1e;};return a102_0x391e();}function coerce(_0x3056a4,_0x242188){const _0x356b8c=a102_0x34e6;switch(_0x3056a4['type']){case'boolean':return _0x242188===!![]||_0x242188===_0x356b8c(0x1a9);case _0x356b8c(0x1b3):{const _0x16344b=Number(_0x242188);if(isNaN(_0x16344b))throw CliErrors[_0x356b8c(0x1b4)]('--'+_0x3056a4[_0x356b8c(0x19e)]+'\x20expects\x20a\x20number,\x20got\x20\x22'+_0x242188+'\x22');return _0x16344b;}default:return String(_0x242188);}}function toCamelCase(_0x50372e){const _0x5ec6c1=a102_0x34e6;return _0x50372e[_0x5ec6c1(0x1a7)](/-([a-z])/g,(_0x4c1754,_0x5d5155)=>_0x5d5155[_0x5ec6c1(0x192)]());}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a103_0x3dc37a=a103_0x2e5f;(function(_0x4c1e27,_0x4df3ee){const _0x4daaa3=a103_0x2e5f,_0x42573e=_0x4c1e27();while(!![]){try{const _0x3ec071=-parseInt(_0x4daaa3(0x85))/0x1+parseInt(_0x4daaa3(0x9c))/0x2*(parseInt(_0x4daaa3(0xc7))/0x3)+-parseInt(_0x4daaa3(0xaf))/0x4*(parseInt(_0x4daaa3(0x88))/0x5)+parseInt(_0x4daaa3(0xb4))/0x6*(-parseInt(_0x4daaa3(0xc1))/0x7)+parseInt(_0x4daaa3(0x87))/0x8+parseInt(_0x4daaa3(0xb2))/0x9+parseInt(_0x4daaa3(0x9a))/0xa;if(_0x3ec071===_0x4df3ee)break;else _0x42573e['push'](_0x42573e['shift']());}catch(_0xc7a871){_0x42573e['push'](_0x42573e['shift']());}}}(a103_0x148a,0x6d9c4));import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';function a103_0x2e5f(_0x1d438d,_0x1010aa){_0x1d438d=_0x1d438d-0x83;const _0x148aeb=a103_0x148a();let _0x2e5f97=_0x148aeb[_0x1d438d];return _0x2e5f97;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';const RISK_LABELS={'read':'','write':a103_0x3dc37a(0xb5),'high-risk-write':'\x20\x20[high-risk-write]'};function a103_0x148a(){const _0x4ac1d0=['9kMWVtx','label','\x20\x20COMMANDS','Output\x20format','\x20\x20\x20\x20$\x20','service','(required)','\x20[default:\x20','padEnd','\x20[flags]','256207gEWvGJ','commands','662048vvcuHa','5qHaFmi','\x20\x20USAGE','trim','string','\x20(required)','length','yes','\x20\x20FLAGS','join','tag','type','Requires\x20appcode\x20(set\x20via\x20`','\x20|\x20','\x20\x20\x20\x20•\x20','\x20auth`\x20first).','hasFormat','boolean','find','9820960QkMTrF','Skip\x20confirmation\x20prompt','11184DCLKhA','\x20\x20Unknown\x20service:\x20','command','number','\x20\x20\x20\x20\x20\x20ARGS','json','push','helpExtra','Preview\x20the\x20operation\x20without\x20executing','max','args','format','required','\x20\x20RISK:\x20','includes','default','\x20\x20PREREQUISITES','hint','flags','304984uaFVLt','dry-run','get','4195107vdsVIb','\x20<service>\x20<command>\x20--help`\x20for\x20command\x20flags.','21486VQzsVz','\x20\x20[write]','\x20<n>','map','dryRun','enum','\x20\x20Run\x20`','name','\x20\x20\x20\x20\x20\x20\x20\x20','hidden','\x20<command>\x20[flags]','table','\x20<service>\x20--help`\x20for\x20service\x20commands.','1498dDYRfe','\x20project\x20init`\x20or\x20--appcode).','\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20','risk','description'];a103_0x148a=function(){return _0x4ac1d0;};return a103_0x148a();}export function generateCommandHelp(_0xcb11cb){const _0x4e021d=a103_0x3dc37a,_0x5259b9=[],_0x2ae569=CLI_BIN_NAME+'\x20'+_0xcb11cb['service']+'\x20'+_0xcb11cb[_0x4e021d(0x9e)],_0x148096=_0xcb11cb[_0x4e021d(0xa6)]?_0xcb11cb[_0x4e021d(0xa6)][_0x4e021d(0xb7)](_0x5483d6=>_0x5483d6[_0x4e021d(0xa8)]!==![]?'<'+_0x5483d6[_0x4e021d(0xbb)]+'>':'['+_0x5483d6[_0x4e021d(0xbb)]+']')[_0x4e021d(0x90)]('\x20'):'',_0x2f730c=_0x148096?_0x2ae569+'\x20'+_0x148096+_0x4e021d(0x84):_0x2ae569+_0x4e021d(0x84);_0x5259b9[_0x4e021d(0xa2)](''),_0x5259b9[_0x4e021d(0xa2)]('\x20\x20'+_0xcb11cb[_0x4e021d(0xc6)]),_0x5259b9[_0x4e021d(0xa2)](''),_0x5259b9['push'](_0x4e021d(0x89)),_0x5259b9[_0x4e021d(0xa2)]('\x20\x20\x20\x20'+_0x2f730c),_0x5259b9[_0x4e021d(0xa2)](''),_0x5259b9['push'](_0x4e021d(0xa9)+_0xcb11cb[_0x4e021d(0xc5)]);_0xcb11cb[_0x4e021d(0xc5)]==='high-risk-write'&&_0x5259b9[_0x4e021d(0xa2)]('\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.');_0x5259b9[_0x4e021d(0xa2)]('');if(_0xcb11cb[_0x4e021d(0xa6)]&&_0xcb11cb[_0x4e021d(0xa6)]['length']>0x0){_0x5259b9['push']('\x20\x20ARGS');const _0x139a05=Math[_0x4e021d(0xa5)](..._0xcb11cb[_0x4e021d(0xa6)][_0x4e021d(0xb7)](_0x38468b=>_0x38468b[_0x4e021d(0xbb)][_0x4e021d(0x8d)]+0x2));for(const _0xcc98bb of _0xcb11cb[_0x4e021d(0xa6)]){const _0x3d41ca=('<'+_0xcc98bb[_0x4e021d(0xbb)]+'>')[_0x4e021d(0x83)](_0x139a05+0x2),_0x161e70=_0xcc98bb[_0x4e021d(0xa8)]!==![]?_0x4e021d(0x8c):'';_0x5259b9[_0x4e021d(0xa2)](_0x4e021d(0xc4)+_0x3d41ca+_0xcc98bb[_0x4e021d(0xc6)]+_0x161e70);}_0x5259b9[_0x4e021d(0xa2)]('');}if(_0xcb11cb[_0x4e021d(0xae)][_0x4e021d(0x8d)]>0x0||_0xcb11cb[_0x4e021d(0xb8)]||_0xcb11cb[_0x4e021d(0x97)]!==![]){_0x5259b9['push'](_0x4e021d(0x8f));const _0x105c64=buildAllFlags(_0xcb11cb),_0x86f51f=Math['max'](..._0x105c64[_0x4e021d(0xb7)](_0x4d59a1=>formatFlagName(_0x4d59a1)[_0x4e021d(0x8d)]));for(const _0x4c6d1b of _0x105c64){_0x5259b9['push']('\x20\x20\x20\x20'+formatFlagName(_0x4c6d1b)[_0x4e021d(0x83)](_0x86f51f+0x2)+renderFlagDesc(_0x4c6d1b));}_0x5259b9['push']('');}const _0xec6d1b=[];_0xcb11cb['requiresAuth']!==![]&&_0xec6d1b[_0x4e021d(0xa2)]('Requires\x20authentication\x20(run\x20`'+CLI_BIN_NAME+_0x4e021d(0x96));_0xcb11cb['requiresAppCode']!==![]&&_0xec6d1b[_0x4e021d(0xa2)](_0x4e021d(0x93)+CLI_BIN_NAME+_0x4e021d(0xc2));if(_0xec6d1b[_0x4e021d(0x8d)]>0x0){_0x5259b9[_0x4e021d(0xa2)](_0x4e021d(0xac));for(const _0x1ba2cd of _0xec6d1b){_0x5259b9[_0x4e021d(0xa2)](_0x4e021d(0x95)+_0x1ba2cd);}_0x5259b9[_0x4e021d(0xa2)]('');}return _0xcb11cb[_0x4e021d(0xa3)]&&(_0x5259b9[_0x4e021d(0xa2)](_0xcb11cb[_0x4e021d(0xa3)]),_0x5259b9['push']('')),_0x5259b9[_0x4e021d(0x90)]('\x0a');}export function generateServiceHelp(_0x55e39a){const _0xa2a5d4=a103_0x3dc37a,_0x9bbf69=getServiceEntry(_0x55e39a);if(!_0x9bbf69)return _0xa2a5d4(0x9d)+_0x55e39a+'\x0a';const _0x140f84=[],_0x398311=serviceGroups[_0xa2a5d4(0xb1)](_0x55e39a);_0x140f84[_0xa2a5d4(0xa2)](''),_0x140f84[_0xa2a5d4(0xa2)]('\x20\x20'+_0x9bbf69[_0xa2a5d4(0xc8)]),_0x140f84[_0xa2a5d4(0xa2)](''),_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0x89)),_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0xc4)+CLI_BIN_NAME+'\x20'+_0x55e39a+_0xa2a5d4(0xbe)),_0x140f84['push'](''),_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0xc9));for(const _0x297b70 of _0x9bbf69[_0xa2a5d4(0x86)]){_0x140f84[_0xa2a5d4(0xa2)]('');const _0x123833=_0x297b70[_0xa2a5d4(0x91)]?'\x20\x20'+_0x297b70['tag'][_0xa2a5d4(0x8a)]():'';_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0xc4)+_0x297b70[_0xa2a5d4(0x9e)]+_0x123833),_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0xc3)+_0x297b70['description']);const _0x291e37=_0x398311?.[_0xa2a5d4(0x99)](_0x891bb7=>_0x891bb7['command']===_0x297b70[_0xa2a5d4(0x9e)]);if(_0x291e37?.['args']&&_0x291e37[_0xa2a5d4(0xa6)]['length']>0x0){_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0xa0));const _0x1b67a0=Math['max'](..._0x291e37[_0xa2a5d4(0xa6)]['map'](_0x39b9e1=>_0x39b9e1[_0xa2a5d4(0xbb)][_0xa2a5d4(0x8d)]+0x2));for(const _0x240705 of _0x291e37[_0xa2a5d4(0xa6)]){const _0x541e8b=('<'+_0x240705[_0xa2a5d4(0xbb)]+'>')[_0xa2a5d4(0x83)](_0x1b67a0+0x2),_0x19f642=_0x240705[_0xa2a5d4(0xa8)]!==![]?_0xa2a5d4(0x8c):'';_0x140f84[_0xa2a5d4(0xa2)](_0xa2a5d4(0xbc)+_0x541e8b+_0x240705['description']+_0x19f642);}}const _0x4d08f8=getCommandFlags(_0x55e39a,_0x297b70[_0xa2a5d4(0x9e)],_0x398311);if(_0x4d08f8['length']>0x0){const _0x5883c5=Math[_0xa2a5d4(0xa5)](..._0x4d08f8[_0xa2a5d4(0xb7)](_0x1a5190=>formatFlagName(_0x1a5190)[_0xa2a5d4(0x8d)]));for(const _0x16735c of _0x4d08f8){_0x140f84['push'](_0xa2a5d4(0xc3)+formatFlagName(_0x16735c)[_0xa2a5d4(0x83)](_0x5883c5+0x2)+renderFlagDesc(_0x16735c));}}}return _0x140f84[_0xa2a5d4(0xa2)](''),_0x140f84['join']('\x0a');}export function generateFullHelp(){const _0x3b3ca2=a103_0x3dc37a,_0x5436c7=[];_0x5436c7[_0x3b3ca2(0xa2)](''),_0x5436c7[_0x3b3ca2(0xa2)]('\x20\x20'+CLI_DISPLAY_NAME),_0x5436c7['push'](''),_0x5436c7[_0x3b3ca2(0xa2)]('\x20\x20USAGE'),_0x5436c7[_0x3b3ca2(0xa2)](_0x3b3ca2(0xcb)+CLI_BIN_NAME+'\x20[global-options]\x20<service>\x20<command>\x20[flags]'),_0x5436c7[_0x3b3ca2(0xa2)](''),_0x5436c7[_0x3b3ca2(0xa2)]('\x20\x20GLOBAL\x20OPTIONS');const _0x3e144c=GLOBAL_FLAGS['filter'](_0x40bcc4=>!_0x40bcc4[_0x3b3ca2(0xbd)]),_0xfec1b3=Math[_0x3b3ca2(0xa5)](..._0x3e144c[_0x3b3ca2(0xb7)](_0x2d244c=>{const _0x4fc913=_0x3b3ca2,_0xd9b8d9=_0x2d244c[_0x4fc913(0xad)]?'\x20'+_0x2d244c[_0x4fc913(0xad)]:'';return('--'+_0x2d244c[_0x4fc913(0xbb)]+_0xd9b8d9)[_0x4fc913(0x8d)];}));for(const _0x40c88b of _0x3e144c){const _0x2169a0=_0x40c88b[_0x3b3ca2(0xad)]?'\x20'+_0x40c88b[_0x3b3ca2(0xad)]:'',_0x4d9a13=('--'+_0x40c88b[_0x3b3ca2(0xbb)]+_0x2169a0)[_0x3b3ca2(0x83)](_0xfec1b3+0x2);_0x5436c7[_0x3b3ca2(0xa2)]('\x20\x20\x20\x20'+_0x4d9a13+_0x40c88b[_0x3b3ca2(0xc6)]);}_0x5436c7[_0x3b3ca2(0xa2)](''),_0x5436c7[_0x3b3ca2(0xa2)](_0x3b3ca2(0xc9)),_0x5436c7[_0x3b3ca2(0xa2)]('');for(const _0x1685fe of serviceRegistry){_0x5436c7[_0x3b3ca2(0xa2)]('\x20\x20'+_0x1685fe['label']);if(_0x1685fe['isSingleCommand']){const _0x421989=_0x1685fe[_0x3b3ca2(0x86)][0x0],_0x1335d7=_0x421989[_0x3b3ca2(0x91)]??'';_0x5436c7['push']('\x20\x20\x20\x20'+_0x1685fe[_0x3b3ca2(0xcc)][_0x3b3ca2(0x83)](0x12)+_0x421989['description']+_0x1335d7);}else{const _0x2916c7=_0x1685fe[_0x3b3ca2(0x86)]['map'](_0x2d480b=>_0x1685fe['service']+'\x20'+_0x2d480b[_0x3b3ca2(0x9e)]),_0x6a0470=Math[_0x3b3ca2(0xa5)](..._0x2916c7[_0x3b3ca2(0xb7)](_0x2c5d83=>_0x2c5d83[_0x3b3ca2(0x8d)]));for(let _0x125cbf=0x0;_0x125cbf<_0x1685fe['commands']['length'];_0x125cbf++){const _0x1850f4=_0x1685fe['commands'][_0x125cbf],_0x16a34c=_0x1850f4[_0x3b3ca2(0x91)]??'';_0x5436c7['push'](_0x3b3ca2(0xc4)+_0x2916c7[_0x125cbf][_0x3b3ca2(0x83)](_0x6a0470+0x2)+_0x1850f4[_0x3b3ca2(0xc6)]+_0x16a34c);}}_0x5436c7['push']('');}return _0x5436c7[_0x3b3ca2(0xa2)](_0x3b3ca2(0xba)+CLI_BIN_NAME+_0x3b3ca2(0xc0)),_0x5436c7[_0x3b3ca2(0xa2)](_0x3b3ca2(0xba)+CLI_BIN_NAME+_0x3b3ca2(0xb3)),_0x5436c7[_0x3b3ca2(0xa2)](''),_0x5436c7['join']('\x0a');}function getCommandFlags(_0x9e564e,_0x5ca82b,_0x5efbc1){const _0x3ddecf=a103_0x3dc37a;if(_0x5efbc1){const _0x27c9dc=_0x5efbc1[_0x3ddecf(0x99)](_0x251e28=>_0x251e28['command']===_0x5ca82b);if(_0x27c9dc)return buildAllFlags(_0x27c9dc);}return[];}function buildAllFlags(_0x261029){const _0x1efa14=a103_0x3dc37a,_0x3b5532=[..._0x261029[_0x1efa14(0xae)]];return _0x261029[_0x1efa14(0xb8)]&&_0x3b5532[_0x1efa14(0xa2)]({'name':_0x1efa14(0xb0),'type':_0x1efa14(0x98),'description':_0x1efa14(0xa4)}),_0x261029[_0x1efa14(0x97)]!==![]&&_0x3b5532[_0x1efa14(0xa2)]({'name':_0x1efa14(0xa7),'type':_0x1efa14(0x8b),'default':'pretty','enum':[_0x1efa14(0xa1),'pretty',_0x1efa14(0xbf)],'description':_0x1efa14(0xca)}),_0x261029[_0x1efa14(0xc5)]==='high-risk-write'&&_0x3b5532['push']({'name':_0x1efa14(0x8e),'type':'boolean','description':_0x1efa14(0x9b)}),_0x3b5532;}function renderFlagDesc(_0x302b4d){const _0x92d1=a103_0x3dc37a;let _0x48ef5b=_0x302b4d[_0x92d1(0xc6)];return _0x302b4d['enum']&&_0x302b4d[_0x92d1(0xb9)][_0x92d1(0x8d)]>0x0&&(_0x48ef5b+='\x20('+_0x302b4d[_0x92d1(0xb9)]['join'](_0x92d1(0x94))+')'),_0x302b4d[_0x92d1(0xab)]!==undefined&&_0x302b4d[_0x92d1(0xab)]!==''&&_0x302b4d['default']!==![]&&(_0x48ef5b+=_0x92d1(0xce)+_0x302b4d[_0x92d1(0xab)]+']'),_0x302b4d[_0x92d1(0xa8)]&&!_0x48ef5b[_0x92d1(0xaa)](_0x92d1(0xcd))&&(_0x48ef5b+=_0x92d1(0x8c)),_0x48ef5b;}function formatFlagName(_0x114b04){const _0xa55508=a103_0x3dc37a,_0x1b49eb=_0x114b04[_0xa55508(0x92)]===_0xa55508(0x98)?'':_0x114b04[_0xa55508(0x92)]===_0xa55508(0x9f)?_0xa55508(0xb6):'\x20<value>';return'--'+_0x114b04['name']+_0x1b49eb;}
|
|
1
|
+
(function(_0xda7b15,_0x352d21){const _0x2fd284=a103_0x54ab,_0x4b325a=_0xda7b15();while(!![]){try{const _0x503aa5=parseInt(_0x2fd284(0x113))/0x1*(parseInt(_0x2fd284(0x141))/0x2)+parseInt(_0x2fd284(0x137))/0x3*(parseInt(_0x2fd284(0x130))/0x4)+-parseInt(_0x2fd284(0x136))/0x5*(-parseInt(_0x2fd284(0x134))/0x6)+-parseInt(_0x2fd284(0x132))/0x7+parseInt(_0x2fd284(0x12c))/0x8+-parseInt(_0x2fd284(0x116))/0x9+-parseInt(_0x2fd284(0x11d))/0xa*(parseInt(_0x2fd284(0x123))/0xb);if(_0x503aa5===_0x352d21)break;else _0x4b325a['push'](_0x4b325a['shift']());}catch(_0x5969e9){_0x4b325a['push'](_0x4b325a['shift']());}}}(a103_0x2bb0,0xc5e5e));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':'\x20\x20[high-risk-write]'};export function generateCommandHelp(_0x5dee5d){const _0x2a1c00=a103_0x54ab,_0x1910cb=[],_0x419fd7=_0x5dee5d['service']===_0x5dee5d[_0x2a1c00(0x126)]?CLI_BIN_NAME+'\x20'+_0x5dee5d[_0x2a1c00(0x133)]:CLI_BIN_NAME+'\x20'+_0x5dee5d[_0x2a1c00(0x133)]+'\x20'+_0x5dee5d[_0x2a1c00(0x126)],_0x1a7e69=_0x5dee5d[_0x2a1c00(0x125)]?_0x5dee5d[_0x2a1c00(0x125)][_0x2a1c00(0x158)](_0x123b1f=>_0x123b1f[_0x2a1c00(0x110)]!==![]?'<'+_0x123b1f['name']+'>':'['+_0x123b1f['name']+']')['join']('\x20'):'',_0x1dd047=_0x1a7e69?_0x419fd7+'\x20'+_0x1a7e69+_0x2a1c00(0x13c):_0x419fd7+_0x2a1c00(0x13c);_0x1910cb[_0x2a1c00(0x13f)](''),_0x1910cb['push']('\x20\x20'+_0x5dee5d[_0x2a1c00(0x118)]),_0x1910cb[_0x2a1c00(0x13f)](''),_0x1910cb[_0x2a1c00(0x13f)](_0x2a1c00(0x143)),_0x1910cb[_0x2a1c00(0x13f)](_0x2a1c00(0x151)+_0x1dd047),_0x1910cb[_0x2a1c00(0x13f)](''),_0x1910cb['push']('\x20\x20RISK:\x20'+_0x5dee5d[_0x2a1c00(0x11c)]);_0x5dee5d['risk']===_0x2a1c00(0x112)&&_0x1910cb[_0x2a1c00(0x13f)](_0x2a1c00(0x11f));_0x1910cb[_0x2a1c00(0x13f)]('');if(_0x5dee5d[_0x2a1c00(0x125)]&&_0x5dee5d['args'][_0x2a1c00(0x11e)]>0x0){_0x1910cb['push']('\x20\x20ARGS');const _0x251c86=Math[_0x2a1c00(0x119)](..._0x5dee5d[_0x2a1c00(0x125)]['map'](_0x21d1f3=>_0x21d1f3[_0x2a1c00(0x128)][_0x2a1c00(0x11e)]+0x2));for(const _0x2531d9 of _0x5dee5d[_0x2a1c00(0x125)]){const _0x386a12=('<'+_0x2531d9['name']+'>')[_0x2a1c00(0x12b)](_0x251c86+0x2),_0x16e401=_0x2531d9[_0x2a1c00(0x110)]!==![]?'\x20(required)':'';_0x1910cb['push'](_0x2a1c00(0x151)+_0x386a12+_0x2531d9[_0x2a1c00(0x118)]+_0x16e401);}_0x1910cb['push']('');}if(_0x5dee5d[_0x2a1c00(0x117)][_0x2a1c00(0x11e)]>0x0||_0x5dee5d[_0x2a1c00(0x145)]||_0x5dee5d[_0x2a1c00(0x115)]!==![]){_0x1910cb[_0x2a1c00(0x13f)](_0x2a1c00(0x11b));const _0x190cb2=buildAllFlags(_0x5dee5d),_0x27d881=Math[_0x2a1c00(0x119)](..._0x190cb2['map'](_0x47329a=>formatFlagName(_0x47329a)[_0x2a1c00(0x11e)]));for(const _0x427748 of _0x190cb2){_0x1910cb['push']('\x20\x20\x20\x20'+formatFlagName(_0x427748)[_0x2a1c00(0x12b)](_0x27d881+0x2)+renderFlagDesc(_0x427748));}_0x1910cb[_0x2a1c00(0x13f)]('');}const _0x8a2670=[];_0x5dee5d['requiresAuth']!==![]&&_0x8a2670[_0x2a1c00(0x13f)]('Requires\x20authentication\x20(run\x20`'+CLI_BIN_NAME+_0x2a1c00(0x14a));_0x5dee5d[_0x2a1c00(0x13d)]!==![]&&_0x8a2670[_0x2a1c00(0x13f)](_0x2a1c00(0x14d)+CLI_BIN_NAME+_0x2a1c00(0x159));if(_0x8a2670['length']>0x0){_0x1910cb[_0x2a1c00(0x13f)](_0x2a1c00(0x124));for(const _0x416442 of _0x8a2670){_0x1910cb[_0x2a1c00(0x13f)](_0x2a1c00(0x12e)+_0x416442);}_0x1910cb[_0x2a1c00(0x13f)]('');}if(_0x5dee5d[_0x2a1c00(0x146)]){const _0x39798e=typeof _0x5dee5d[_0x2a1c00(0x146)]===_0x2a1c00(0x140)?_0x5dee5d[_0x2a1c00(0x146)]():_0x5dee5d[_0x2a1c00(0x146)];_0x1910cb['push'](_0x39798e),_0x1910cb[_0x2a1c00(0x13f)]('');}return _0x1910cb[_0x2a1c00(0x148)]('\x0a');}export function generateServiceHelp(_0x3cc617){const _0x487edb=a103_0x54ab,_0x39d1f8=getServiceEntry(_0x3cc617);if(!_0x39d1f8)return _0x487edb(0x122)+_0x3cc617+'\x0a';const _0xf1569a=[],_0x1a40b2=serviceGroups[_0x487edb(0x15a)](_0x3cc617);_0xf1569a[_0x487edb(0x13f)](''),_0xf1569a['push']('\x20\x20'+_0x39d1f8[_0x487edb(0x14c)]),_0xf1569a[_0x487edb(0x13f)](''),_0xf1569a[_0x487edb(0x13f)]('\x20\x20USAGE'),_0xf1569a['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20'+_0x3cc617+'\x20<command>\x20[flags]'),_0xf1569a[_0x487edb(0x13f)](''),_0xf1569a[_0x487edb(0x13f)](_0x487edb(0x154));for(const _0x8092eb of _0x39d1f8['commands']){_0xf1569a[_0x487edb(0x13f)]('');const _0x3f215b=_0x8092eb[_0x487edb(0x156)]?'\x20\x20'+_0x8092eb[_0x487edb(0x156)][_0x487edb(0x11a)]():'';_0xf1569a[_0x487edb(0x13f)](_0x487edb(0x151)+_0x8092eb[_0x487edb(0x126)]+_0x3f215b),_0xf1569a[_0x487edb(0x13f)](_0x487edb(0x153)+_0x8092eb[_0x487edb(0x118)]);const _0x3c76b2=_0x1a40b2?.['find'](_0x1b54fe=>_0x1b54fe['command']===_0x8092eb[_0x487edb(0x126)]);if(_0x3c76b2?.[_0x487edb(0x125)]&&_0x3c76b2['args'][_0x487edb(0x11e)]>0x0){_0xf1569a[_0x487edb(0x13f)](_0x487edb(0x142));const _0x52049f=Math[_0x487edb(0x119)](..._0x3c76b2[_0x487edb(0x125)][_0x487edb(0x158)](_0x58cace=>_0x58cace[_0x487edb(0x128)]['length']+0x2));for(const _0xe81c6a of _0x3c76b2[_0x487edb(0x125)]){const _0x16114c=('<'+_0xe81c6a[_0x487edb(0x128)]+'>')[_0x487edb(0x12b)](_0x52049f+0x2),_0xc28860=_0xe81c6a[_0x487edb(0x110)]!==![]?_0x487edb(0x13a):'';_0xf1569a[_0x487edb(0x13f)](_0x487edb(0x152)+_0x16114c+_0xe81c6a['description']+_0xc28860);}}const _0x3efdbb=getCommandFlags(_0x3cc617,_0x8092eb['command'],_0x1a40b2);if(_0x3efdbb[_0x487edb(0x11e)]>0x0){const _0x1115db=Math[_0x487edb(0x119)](..._0x3efdbb['map'](_0x60685a=>formatFlagName(_0x60685a)['length']));for(const _0x142a16 of _0x3efdbb){_0xf1569a['push']('\x20\x20\x20\x20\x20\x20'+formatFlagName(_0x142a16)[_0x487edb(0x12b)](_0x1115db+0x2)+renderFlagDesc(_0x142a16));}}}return _0xf1569a['push'](''),_0xf1569a[_0x487edb(0x148)]('\x0a');}function a103_0x54ab(_0x7a3059,_0x36fbfc){_0x7a3059=_0x7a3059-0x110;const _0x2bb0b1=a103_0x2bb0();let _0x54abf3=_0x2bb0b1[_0x7a3059];return _0x54abf3;}export function generateFullHelp(){const _0x2d7359=a103_0x54ab,_0x52d321=[];_0x52d321['push'](''),_0x52d321['push']('\x20\x20'+CLI_DISPLAY_NAME),_0x52d321[_0x2d7359(0x13f)](''),_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x143)),_0x52d321[_0x2d7359(0x13f)]('\x20\x20\x20\x20$\x20'+CLI_BIN_NAME+_0x2d7359(0x147)),_0x52d321[_0x2d7359(0x13f)](''),_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x13e));const _0x2bee76=GLOBAL_FLAGS[_0x2d7359(0x155)](_0xafc1d3=>!_0xafc1d3[_0x2d7359(0x13b)]),_0x2d15c4=Math['max'](..._0x2bee76[_0x2d7359(0x158)](_0x277efa=>{const _0x3d6449=_0x2d7359,_0x3940eb=_0x277efa['hint']?'\x20'+_0x277efa[_0x3d6449(0x150)]:'';return('--'+_0x277efa[_0x3d6449(0x128)]+_0x3940eb)[_0x3d6449(0x11e)];}));for(const _0x4ceb1a of _0x2bee76){const _0x3b254d=_0x4ceb1a[_0x2d7359(0x150)]?'\x20'+_0x4ceb1a[_0x2d7359(0x150)]:'',_0x58493b=('--'+_0x4ceb1a[_0x2d7359(0x128)]+_0x3b254d)[_0x2d7359(0x12b)](_0x2d15c4+0x2);_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x151)+_0x58493b+_0x4ceb1a[_0x2d7359(0x118)]);}_0x52d321[_0x2d7359(0x13f)](''),_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x154)),_0x52d321[_0x2d7359(0x13f)]('');for(const _0x31a418 of serviceRegistry){_0x52d321['push']('\x20\x20'+_0x31a418[_0x2d7359(0x14c)]);if(_0x31a418[_0x2d7359(0x149)]){const _0xb65e4c=_0x31a418['commands'][0x0],_0x35cac7=_0xb65e4c['tag']??'';_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x151)+_0x31a418['service'][_0x2d7359(0x12b)](0x12)+_0xb65e4c[_0x2d7359(0x118)]+_0x35cac7);}else{const _0x48072c=_0x31a418[_0x2d7359(0x135)][_0x2d7359(0x158)](_0x1c1285=>_0x31a418[_0x2d7359(0x133)]+'\x20'+_0x1c1285[_0x2d7359(0x126)]),_0x25136b=Math['max'](..._0x48072c[_0x2d7359(0x158)](_0x5403bd=>_0x5403bd[_0x2d7359(0x11e)]));for(let _0x30f6ab=0x0;_0x30f6ab<_0x31a418['commands'][_0x2d7359(0x11e)];_0x30f6ab++){const _0x1b6a72=_0x31a418['commands'][_0x30f6ab],_0x232795=_0x1b6a72[_0x2d7359(0x156)]??'';_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x151)+_0x48072c[_0x30f6ab]['padEnd'](_0x25136b+0x2)+_0x1b6a72[_0x2d7359(0x118)]+_0x232795);}}if(_0x31a418[_0x2d7359(0x131)]?.[_0x2d7359(0x146)]){const _0x2c675f=typeof _0x31a418[_0x2d7359(0x131)][_0x2d7359(0x146)]===_0x2d7359(0x140)?_0x31a418[_0x2d7359(0x131)][_0x2d7359(0x146)]():_0x31a418[_0x2d7359(0x131)][_0x2d7359(0x146)];for(const _0x1b9ea1 of _0x2c675f[_0x2d7359(0x14b)]('\x0a')){_0x52d321[_0x2d7359(0x13f)]('\x20\x20'+_0x1b9ea1);}}_0x52d321[_0x2d7359(0x13f)]('');}return _0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x138)+CLI_BIN_NAME+_0x2d7359(0x114)),_0x52d321[_0x2d7359(0x13f)](_0x2d7359(0x138)+CLI_BIN_NAME+_0x2d7359(0x14f)),_0x52d321[_0x2d7359(0x13f)](''),_0x52d321[_0x2d7359(0x148)]('\x0a');}function getCommandFlags(_0x17c427,_0x1874b2,_0x29e085){const _0x1a02c5=a103_0x54ab;if(_0x29e085){const _0x4d3fcc=_0x29e085[_0x1a02c5(0x15b)](_0x4888ca=>_0x4888ca['command']===_0x1874b2);if(_0x4d3fcc)return buildAllFlags(_0x4d3fcc);}return[];}function buildAllFlags(_0x3be08e){const _0x21b4e1=a103_0x54ab,_0x460348=[..._0x3be08e[_0x21b4e1(0x117)]];return _0x3be08e['dryRun']&&_0x460348[_0x21b4e1(0x13f)]({'name':_0x21b4e1(0x12d),'type':'boolean','description':'Preview\x20the\x20operation\x20without\x20executing'}),_0x3be08e['hasFormat']!==![]&&_0x460348[_0x21b4e1(0x13f)]({'name':_0x21b4e1(0x111),'type':_0x21b4e1(0x15c),'default':_0x21b4e1(0x121),'enum':[_0x21b4e1(0x144),_0x21b4e1(0x121),'table'],'description':'Output\x20format'}),_0x3be08e['risk']==='high-risk-write'&&_0x460348[_0x21b4e1(0x13f)]({'name':_0x21b4e1(0x127),'type':_0x21b4e1(0x12a),'description':_0x21b4e1(0x14e)}),_0x460348;}function renderFlagDesc(_0x37e84c){const _0x5c5cbc=a103_0x54ab;let _0x4751a1=_0x37e84c[_0x5c5cbc(0x118)];return _0x37e84c[_0x5c5cbc(0x120)]&&_0x37e84c[_0x5c5cbc(0x120)][_0x5c5cbc(0x11e)]>0x0&&(_0x4751a1+='\x20('+_0x37e84c[_0x5c5cbc(0x120)]['join'](_0x5c5cbc(0x129))+')'),_0x37e84c[_0x5c5cbc(0x12f)]!==undefined&&_0x37e84c[_0x5c5cbc(0x12f)]!==''&&_0x37e84c[_0x5c5cbc(0x12f)]!==![]&&(_0x4751a1+='\x20[default:\x20'+_0x37e84c[_0x5c5cbc(0x12f)]+']'),_0x37e84c[_0x5c5cbc(0x110)]&&!_0x4751a1['includes'](_0x5c5cbc(0x139))&&(_0x4751a1+=_0x5c5cbc(0x13a)),_0x4751a1;}function a103_0x2bb0(){const _0x13e244=['\x20\x20\x20\x20\x20\x20ARGS','\x20\x20USAGE','json','dryRun','helpExtra','\x20[global-options]\x20<service>\x20<command>\x20[flags]','join','isSingleCommand','\x20auth`\x20first).','split','label','Requires\x20appcode\x20(set\x20via\x20`','Skip\x20confirmation\x20prompt','\x20<service>\x20<command>\x20--help`\x20for\x20command\x20flags.','hint','\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20','\x20\x20COMMANDS','filter','tag','type','map','\x20project\x20init`\x20or\x20--appcode).','get','find','string','\x20<value>','required','format','high-risk-write','201673GDelqa','\x20<service>\x20--help`\x20for\x20service\x20commands.','hasFormat','657540DvwVTq','flags','description','max','trim','\x20\x20FLAGS','risk','595620tLoITl','length','\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','enum','pretty','\x20\x20Unknown\x20service:\x20','517gcBFPa','\x20\x20PREREQUISITES','args','command','yes','name','\x20|\x20','boolean','padEnd','12432608kdwULF','dry-run','\x20\x20\x20\x20•\x20','default','130060zfPEME','wildcardDef','5860015idTlTo','service','1411596Nrqjyl','commands','30TUdBcn','69MqFFwv','\x20\x20Run\x20`','(required)','\x20(required)','hidden','\x20[flags]','requiresAppCode','\x20\x20GLOBAL\x20OPTIONS','push','function','8GFWuQG'];a103_0x2bb0=function(){return _0x13e244;};return a103_0x2bb0();}function formatFlagName(_0x665182){const _0x3b61b6=a103_0x54ab,_0x2097ff=_0x665182[_0x3b61b6(0x157)]==='boolean'?'':_0x665182['type']==='number'?'\x20<n>':_0x3b61b6(0x15d);return'--'+_0x665182[_0x3b61b6(0x128)]+_0x2097ff;}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d6b38,_0x3182cd){var _0x472935=a104_0x1421,_0x50b08a=_0x1d6b38();while(!![]){try{var _0x18b39d=-parseInt(_0x472935(0xbf))/0x1+parseInt(_0x472935(0xc0))/0x2+-parseInt(_0x472935(0xbe))/0x3+parseInt(_0x472935(0xc1))/0x4+parseInt(_0x472935(0xbc))/0x5+parseInt(_0x472935(0xc2))/0x6+-parseInt(_0x472935(0xbd))/0x7;if(_0x18b39d===_0x3182cd)break;else _0x50b08a['push'](_0x50b08a['shift']());}catch(_0x271b5d){_0x50b08a['push'](_0x50b08a['shift']());}}}(a104_0x4236,0x797bb));export{runCommand}from'./runner.js';function a104_0x1421(_0x593d85,_0x3a6d0b){_0x593d85=_0x593d85-0xbc;var _0x42367f=a104_0x4236();var _0x14216b=_0x42367f[_0x593d85];return _0x14216b;}export{parseFlags,validateFlags}from'./flags.js';export{formatOutput}from'./output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./help.js';export{extractList,extractPaging}from'./response.js';function a104_0x4236(){var _0xdf0fed=['409780cmpasf','1832016mEOKUv','4162235LVmjke','6473810WWgmHV','240474TSpbTD','72052Qotmvb','668814ZmZMtA'];a104_0x4236=function(){return _0xdf0fed;};return a104_0x4236();}export{riskLevelOrder}from'./types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b9953,_0x5b75b5){const _0x212e47=a105_0x29f7,_0x37b375=_0x1b9953();while(!![]){try{const _0x2929fa=-parseInt(_0x212e47(0xcb))/0x1*(parseInt(_0x212e47(0xb1))/0x2)+-parseInt(_0x212e47(0xc4))/0x3*(-parseInt(_0x212e47(0xb3))/0x4)+parseInt(_0x212e47(0xbd))/0x5+parseInt(_0x212e47(0xc8))/0x6*(parseInt(_0x212e47(0xc6))/0x7)+-parseInt(_0x212e47(0xc7))/0x8*(-parseInt(_0x212e47(0xc0))/0x9)+parseInt(_0x212e47(0xbf))/0xa+-parseInt(_0x212e47(0xcf))/0xb*(parseInt(_0x212e47(0xb5))/0xc);if(_0x2929fa===_0x5b75b5)break;else _0x37b375['push'](_0x37b375['shift']());}catch(_0x394092){_0x37b375['push'](_0x37b375['shift']());}}}(a105_0x524c,0xefc1d));export function formatOutput(_0x3c07ee,_0x3a83fd){const _0x28577f=a105_0x29f7,{format:_0x202475}=_0x3a83fd;switch(_0x202475){case _0x28577f(0xd1):printJson(_0x3c07ee,_0x3a83fd);break;case _0x28577f(0xc2):printTable(_0x3c07ee,_0x3a83fd);break;case _0x28577f(0xbb):default:printPretty(_0x3c07ee,_0x3a83fd);break;}}function printJson(_0x50578a,_0x108678){const _0x73aae4=a105_0x29f7,_0x1b1b52={'ok':_0x50578a['ok'],'command':_0x108678['command'],'risk':_0x108678[_0x73aae4(0xad)]};if(_0x108678['dryRun'])_0x1b1b52['dryRun']=!![];if(_0x50578a[_0x73aae4(0xba)]!==undefined)_0x1b1b52[_0x73aae4(0xba)]=_0x50578a[_0x73aae4(0xba)];!_0x50578a['ok']&&_0x50578a['message']&&(_0x1b1b52[_0x73aae4(0xb0)]={'code':_0x73aae4(0xcc),'message':_0x50578a[_0x73aae4(0xbc)]}),process[_0x73aae4(0xd0)][_0x73aae4(0xce)](JSON['stringify'](_0x1b1b52,null,0x2)+'\x0a');}function printPretty(_0x28716e,_0x289ec6){const _0x3282cc=a105_0x29f7;if(_0x289ec6['dryRun']){console[_0x3282cc(0xb9)](_0x3282cc(0xb6)),console['log'](JSON[_0x3282cc(0xb8)](_0x28716e['data'],null,0x2));return;}if(!_0x28716e['ok']){console[_0x3282cc(0xb0)](_0x3282cc(0xc9)+(_0x28716e[_0x3282cc(0xbc)]??_0x3282cc(0xc5)));return;}const _0x2f7061=_0x28716e['data'];if(_0x2f7061===undefined||_0x2f7061===null){if(_0x28716e['message'])console[_0x3282cc(0xb9)](_0x28716e['message']);return;}if(Array[_0x3282cc(0xca)](_0x2f7061)){printArrayPretty(_0x2f7061);return;}if(typeof _0x2f7061==='object'){printObjectPretty(_0x2f7061);return;}console[_0x3282cc(0xb9)](String(_0x2f7061));}function printObjectPretty(_0x5c4da9){const _0x2b3909=a105_0x29f7,_0x12bf75=Math[_0x2b3909(0xc3)](...Object[_0x2b3909(0xb4)](_0x5c4da9)[_0x2b3909(0xb2)](_0x1cd9c8=>_0x1cd9c8[_0x2b3909(0xac)]),0x0);for(const [_0xc19144,_0x1c17c6]of Object['entries'](_0x5c4da9)){if(_0x1c17c6===undefined||_0x1c17c6===null)continue;const _0x1e4285=_0xc19144['padEnd'](_0x12bf75);typeof _0x1c17c6===_0x2b3909(0xc1)?console[_0x2b3909(0xb9)](_0x1e4285+'\x20\x20'+JSON[_0x2b3909(0xb8)](_0x1c17c6)):console[_0x2b3909(0xb9)](_0x1e4285+'\x20\x20'+_0x1c17c6);}}function printArrayPretty(_0x11107c){const _0x2941b5=a105_0x29f7;if(_0x11107c[_0x2941b5(0xac)]===0x0){console[_0x2941b5(0xb9)]('(empty)');return;}console['log']('Found\x20'+_0x11107c[_0x2941b5(0xac)]+_0x2941b5(0xb7));for(const _0xdc485e of _0x11107c){if(typeof _0xdc485e===_0x2941b5(0xc1)&&_0xdc485e!==null){const _0xcd03d4=Object[_0x2941b5(0xbe)](_0xdc485e)['filter'](([,_0x58da80])=>_0x58da80!=null&&_0x58da80!=='');if(_0xcd03d4[_0x2941b5(0xac)]===0x0)continue;const _0x41d972=Math[_0x2941b5(0xc3)](..._0xcd03d4[_0x2941b5(0xb2)](([_0x3c1ea3])=>_0x3c1ea3['length']));for(const [_0x351325,_0x17e3f6]of _0xcd03d4){const _0x5929bc=typeof _0x17e3f6===_0x2941b5(0xc1)?JSON[_0x2941b5(0xb8)](_0x17e3f6):String(_0x17e3f6);console['log']('\x20\x20'+_0x351325[_0x2941b5(0xaf)](_0x41d972)+'\x20\x20'+_0x5929bc);}console['log']('');}else console[_0x2941b5(0xb9)]('\x20\x20'+_0xdc485e);}}function a105_0x29f7(_0x5e7b02,_0xfb01f8){_0x5e7b02=_0x5e7b02-0xac;const _0x524c3e=a105_0x524c();let _0x29f781=_0x524c3e[_0x5e7b02];return _0x29f781;}function a105_0x524c(){const _0x104d90=['5560815tHNHFR','entries','1569940BDyKcP','36TBwNPL','object','table','max','253158GcsESC','Unknown\x20error','6788887RAAJzu','2160088dSyWna','6zViVRl','Error:\x20','isArray','58692suDNEL','command_error','join','write','14490531rbzdlP','stdout','json','length','risk','repeat','padEnd','error','52nNDXfM','map','24yvQxnL','keys','12TLRaYy','[dry-run]\x20Would\x20execute:','\x20items:\x0a','stringify','log','data','pretty','message'];a105_0x524c=function(){return _0x104d90;};return a105_0x524c();}function printTable(_0x42f746,_0x272027){const _0x5ac655=a105_0x29f7,_0x5363f2=_0x42f746['data'];if(!_0x42f746['ok']){console[_0x5ac655(0xb0)](_0x5ac655(0xc9)+(_0x42f746['message']??_0x5ac655(0xc5)));return;}const _0x556c82=Array[_0x5ac655(0xca)](_0x5363f2)?_0x5363f2:_0x5363f2?[_0x5363f2]:[];if(_0x556c82[_0x5ac655(0xac)]===0x0){console[_0x5ac655(0xb9)]('(empty)');return;}const _0x49d509=Object['keys'](_0x556c82[0x0]),_0x566dcf=_0x49d509[_0x5ac655(0xb2)](_0xf6bca3=>Math['max'](_0xf6bca3[_0x5ac655(0xac)],..._0x556c82[_0x5ac655(0xb2)](_0x764f1a=>String(_0x764f1a[_0xf6bca3]??'')[_0x5ac655(0xac)]))),_0x42d986=_0x49d509[_0x5ac655(0xb2)]((_0xb836ee,_0x4ed076)=>_0xb836ee[_0x5ac655(0xaf)](_0x566dcf[_0x4ed076]))['join']('\x20\x20'),_0x4e80a9=_0x566dcf['map'](_0x403dd9=>'-'[_0x5ac655(0xae)](_0x403dd9))[_0x5ac655(0xcd)]('\x20\x20');console[_0x5ac655(0xb9)](_0x42d986),console[_0x5ac655(0xb9)](_0x4e80a9);for(const _0x5a1040 of _0x556c82){const _0x5b0d36=_0x49d509['map']((_0x3fdf9b,_0x363e96)=>String(_0x5a1040[_0x3fdf9b]??'')[_0x5ac655(0xaf)](_0x566dcf[_0x363e96]))[_0x5ac655(0xcd)]('\x20\x20');console[_0x5ac655(0xb9)](_0x5b0d36);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31a409,_0x6ec97f){var _0x59046f=a106_0x577b,_0x43d122=_0x31a409();while(!![]){try{var _0x385fab=-parseInt(_0x59046f(0xf0))/0x1+-parseInt(_0x59046f(0xfb))/0x2*(parseInt(_0x59046f(0xf2))/0x3)+parseInt(_0x59046f(0xf9))/0x4+parseInt(_0x59046f(0xf7))/0x5*(-parseInt(_0x59046f(0xf5))/0x6)+-parseInt(_0x59046f(0xf8))/0x7+-parseInt(_0x59046f(0xf1))/0x8*(parseInt(_0x59046f(0xf6))/0x9)+-parseInt(_0x59046f(0xf3))/0xa*(-parseInt(_0x59046f(0xfa))/0xb);if(_0x385fab===_0x6ec97f)break;else _0x43d122['push'](_0x43d122['shift']());}catch(_0x522cfa){_0x43d122['push'](_0x43d122['shift']());}}}(a106_0x3a6b,0x59403));function a106_0x577b(_0x41698a,_0x4edc0c){_0x41698a=_0x41698a-0xef;var _0x3a6b64=a106_0x3a6b();var _0x577b73=_0x3a6b64[_0x41698a];return _0x577b73;}export function extractList(_0xdcc7a9){var _0x118c2c=a106_0x577b;if(Array['isArray'](_0xdcc7a9))return _0xdcc7a9;if(_0xdcc7a9&&typeof _0xdcc7a9===_0x118c2c(0xfc))return _0xdcc7a9['tableData']??[];return[];}export function extractPaging(_0x5a3fa5){var _0x255898=a106_0x577b;if(_0x5a3fa5&&typeof _0x5a3fa5===_0x255898(0xfc)&&!Array[_0x255898(0xf4)](_0x5a3fa5))return _0x5a3fa5[_0x255898(0xef)];return undefined;}function a106_0x3a6b(){var _0x3292e9=['292527TMAtoC','5bKIEcF','2864470pSPVvR','800812jUzshB','5597647dNxmqU','4fvsqqr','object','paging','147263vlwjci','168UlpkLj','183294eFmnTa','30rSzRuR','isArray','186wkpbDH'];a106_0x3a6b=function(){return _0x3292e9;};return a106_0x3a6b();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e4a0f,_0x29c050){const _0x554c46=a107_0x579c,_0x5d4f38=_0x4e4a0f();while(!![]){try{const _0x149a81=-parseInt(_0x554c46(0x1d5))/0x1*(-parseInt(_0x554c46(0x1b7))/0x2)+parseInt(_0x554c46(0x1d9))/0x3+parseInt(_0x554c46(0x1c8))/0x4+-parseInt(_0x554c46(0x1ac))/0x5*(-parseInt(_0x554c46(0x1c5))/0x6)+-parseInt(_0x554c46(0x1ad))/0x7+parseInt(_0x554c46(0x1ed))/0x8*(parseInt(_0x554c46(0x1b9))/0x9)+-parseInt(_0x554c46(0x1ba))/0xa;if(_0x149a81===_0x29c050)break;else _0x5d4f38['push'](_0x5d4f38['shift']());}catch(_0x2e09cb){_0x5d4f38['push'](_0x5d4f38['shift']());}}}(a107_0x38b1,0xafc18));import{riskLevelOrder,isValidFormat}from'./types.js';import{parseFlags,validateFlags}from'./flags.js';function a107_0x579c(_0xea6b64,_0x152af0){_0xea6b64=_0xea6b64-0x1a6;const _0x38b134=a107_0x38b1();let _0x579c85=_0x38b134[_0xea6b64];return _0x579c85;}import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';function a107_0x38b1(){const _0x4f5717=['map','execute','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','args','riskLevel','dryRun','.\x20Run\x20`','106mrWQUo','name','531BNusMP','20345130ZSTMNU','\x20api\x20pull`\x20first.','`\x20requires\x20either\x20--code\x20or\x20--alias.','createInterface','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','resolveApiDomain','`\x20has\x20risk\x20level\x20\x22','isNonInteractive','stdin','../core/api-client.js','defaultPageSize','487362iOkeQh','\x22.\x20visit\x20https://qizhiyuntu.feishu.cn/docx/JTiOdxQlXo2dQLxXVu6ctutcnme\x20for\x20more\x20information.','Command\x20`','804004wimQZb','flags','appCode','requiresAppCode','selectedAppName','apiDir','defaultVerbose','command','dry-run','join','requiresAuth','alias','yes','159xJNCVa','rawFlags','service','Operation\x20cancelled\x20by\x20user.','3395229yKbnBu','stderr','configMissing','\x22.\x20','length','apiDomain','pretty','verbose','type','resolveAppCode','validate','Available\x20aliases:\x20','\x22.\x0a','code','some','⚠\x20\x20High-risk\x20operation:\x20','risk','validation','node:readline','number','188024uQUaZr','Unknown\x20alias\x20\x22','defaultFormat','Set\x20appcode\x20via\x20`','toLowerCase','format','nonInteractive','high-risk-write','pagesize','20mwebrZ','2088429YAKfDu','No\x20api.ts\x20found\x20in\x20','High-risk\x20operation\x20`'];a107_0x38b1=function(){return _0x4f5717;};return a107_0x38b1();}import{CLI_BIN_NAME}from'../constant/cli.js';export async function runCommand(_0x3ae466,_0x2ef1f3){const _0x595493=a107_0x579c,_0x3fad32=CLI_BIN_NAME+'\x20'+_0x3ae466[_0x595493(0x1d7)]+'\x20'+_0x3ae466['command'],_0x4ce3c8=parseFlags(_0x3ae466[_0x595493(0x1c9)],_0x2ef1f3[_0x595493(0x1d6)]);validateFlags(_0x3ae466[_0x595493(0x1c9)],_0x4ce3c8,_0x3fad32);if(!_0x4ce3c8[_0x595493(0x1d0)]&&_0x2ef1f3['riskLevel']&&riskLevelOrder(_0x3ae466[_0x595493(0x1e9)])>riskLevelOrder(_0x2ef1f3['riskLevel'])){if(_0x2ef1f3[_0x595493(0x1c1)])throw CliErrors[_0x595493(0x1ea)](_0x595493(0x1c7)+_0x3fad32+_0x595493(0x1c0)+_0x3ae466[_0x595493(0x1e9)]+'\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22'+_0x2ef1f3[_0x595493(0x1b4)]+'\x22.');throw CliErrors[_0x595493(0x1ea)]('Command\x20`'+_0x3fad32+_0x595493(0x1c0)+_0x3ae466[_0x595493(0x1e9)]+_0x595493(0x1be)+_0x2ef1f3['riskLevel']+_0x595493(0x1e5)+('\x20\x20Edit\x20the\x20config\x20file\x20manually\x20and\x20set\x20riskLevel\x20to\x20\x22'+_0x3ae466[_0x595493(0x1e9)]+_0x595493(0x1c6)));}const _0x237222=_0x2ef1f3[_0x595493(0x1cd)]||'./src/api';resolveAliasToCode(_0x3ae466,_0x4ce3c8,_0x237222,_0x3fad32);let _0x488359='';if(_0x3ae466[_0x595493(0x1d2)]!==![]){_0x488359=_0x2ef1f3['resolveCookie']();if(!_0x488359)throw CliErrors['authRequired']();const {setActiveCookie:_0x5279a9}=await import(_0x595493(0x1c3));_0x5279a9(_0x488359);}let _0x47dd86='';if(_0x3ae466[_0x595493(0x1cb)]!==![]){_0x47dd86=_0x2ef1f3[_0x595493(0x1e2)]()??'';if(!_0x47dd86)throw CliErrors[_0x595493(0x1db)](_0x595493(0x1a6)+CLI_BIN_NAME+_0x595493(0x1b2));}const _0x2af489=resolveFormat(_0x4ce3c8,_0x3ae466,_0x2ef1f3[_0x595493(0x1ef)]),_0x3b12ba=buildRuntimeContext({'appCode':_0x47dd86,'cookie':_0x488359,'apiDomain':_0x2ef1f3[_0x595493(0x1bf)](),'format':_0x2af489,'flags':_0x4ce3c8,'def':_0x3ae466,'nonInteractive':_0x2ef1f3[_0x595493(0x1c1)],'defaultPageSize':_0x2ef1f3[_0x595493(0x1c4)],'defaultVerbose':_0x2ef1f3[_0x595493(0x1ce)],'apiDir':_0x237222,'selectedAppName':_0x2ef1f3[_0x595493(0x1cc)],'args':_0x2ef1f3[_0x595493(0x1b3)]??[]});_0x3ae466[_0x595493(0x1e3)]&&await _0x3ae466['validate'](_0x3b12ba);if(_0x4ce3c8[_0x595493(0x1d0)]){if(!_0x3ae466[_0x595493(0x1b5)])throw CliErrors[_0x595493(0x1ea)]('--dry-run\x20is\x20not\x20supported\x20for\x20`'+_0x3fad32+'`.');const _0x4ad316=await _0x3ae466[_0x595493(0x1b5)](_0x3b12ba);formatOutput({'ok':!![],'data':_0x4ad316},{'command':_0x3fad32,'risk':_0x3ae466[_0x595493(0x1e9)],'format':_0x2af489,'dryRun':!![]});return;}if(_0x3ae466[_0x595493(0x1e9)]===_0x595493(0x1aa)&&!_0x4ce3c8[_0x595493(0x1d4)]){if(_0x2ef1f3[_0x595493(0x1c1)])throw CliErrors['validation'](_0x595493(0x1af)+_0x3fad32+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmation(_0x3fad32);}const _0x5a7752=await _0x3ae466[_0x595493(0x1b1)](_0x3b12ba);formatOutput(_0x5a7752,{'command':_0x3fad32,'risk':_0x3ae466[_0x595493(0x1e9)],'format':_0x2af489});}function buildRuntimeContext(_0x32b9a0){const _0x2f994e=a107_0x579c,{flags:_0x406e3a,def:_0x1351e}=_0x32b9a0,_0x1807d3=CLI_BIN_NAME+'\x20'+_0x1351e[_0x2f994e(0x1d7)]+'\x20'+_0x1351e[_0x2f994e(0x1cf)];return{'appCode':_0x32b9a0[_0x2f994e(0x1ca)],'cookie':_0x32b9a0['cookie'],'apiDomain':_0x32b9a0[_0x2f994e(0x1de)],'format':_0x32b9a0[_0x2f994e(0x1a8)],'nonInteractive':_0x32b9a0[_0x2f994e(0x1a9)],'apiDir':_0x32b9a0[_0x2f994e(0x1cd)],'selectedAppName':_0x32b9a0[_0x2f994e(0x1cc)],'args':_0x32b9a0[_0x2f994e(0x1b3)],'str'(_0x26402b){return String(_0x406e3a[_0x26402b]??'');},'bool'(_0x34629b){const _0x5b644e=_0x2f994e;if(_0x406e3a[_0x34629b]===!![])return!![];if(_0x34629b===_0x5b644e(0x1e0)&&_0x32b9a0[_0x5b644e(0x1ce)])return!![];return![];},'num'(_0x3e1940,_0x1b2762){const _0x190750=_0x2f994e,_0xa14301=_0x406e3a[_0x3e1940];if(typeof _0xa14301===_0x190750(0x1ec))return _0xa14301;if(_0x3e1940===_0x190750(0x1ab)&&_0x32b9a0['defaultPageSize']!=null)return _0x32b9a0['defaultPageSize'];return _0x1b2762??0x0;},'flag'(_0xae657d){return _0x406e3a[_0xae657d];},'output'(_0x233bd4){const _0x56d113=_0x2f994e;formatOutput(_0x233bd4,{'command':_0x1807d3,'risk':_0x1351e['risk'],'format':_0x32b9a0[_0x56d113(0x1a8)]});}};}function resolveFormat(_0x4d12b7,_0x5d3d29,_0x19822c){const _0x53e64c=a107_0x579c;if(_0x5d3d29['hasFormat']===![])return _0x53e64c(0x1df);const _0x262990=_0x4d12b7[_0x53e64c(0x1a8)];if(isValidFormat(_0x262990))return _0x262990;if(_0x19822c)return _0x19822c;return _0x53e64c(0x1df);}async function requireConfirmation(_0x484c60){const _0x1be712=a107_0x579c,_0x588aba=await import(_0x1be712(0x1eb)),_0xd6c8ea=_0x588aba[_0x1be712(0x1bd)]({'input':process[_0x1be712(0x1c2)],'output':process[_0x1be712(0x1da)]});return new Promise((_0x577384,_0x149d51)=>{const _0x85a42c=_0x1be712;_0xd6c8ea['question'](_0x85a42c(0x1e8)+_0x484c60+'\x0a\x20\x20\x20Continue?\x20[y/N]\x20',_0xf24bf2=>{const _0x3e5fcb=_0x85a42c;_0xd6c8ea['close'](),_0xf24bf2[_0x3e5fcb(0x1a7)]()==='y'||_0xf24bf2[_0x3e5fcb(0x1a7)]()===_0x3e5fcb(0x1d4)?_0x577384():_0x149d51(CliErrors['cancelled'](_0x3e5fcb(0x1d8)));});});}function resolveAliasToCode(_0x29d8f7,_0x2d32b0,_0x3838dc,_0x5d20be){const _0x1170b8=a107_0x579c,_0x281c4b=_0x29d8f7[_0x1170b8(0x1c9)][_0x1170b8(0x1e7)](_0x2efce0=>_0x2efce0[_0x1170b8(0x1b8)]===_0x1170b8(0x1e6)&&_0x2efce0[_0x1170b8(0x1e1)]==='string'),_0x2755d3=_0x29d8f7[_0x1170b8(0x1c9)][_0x1170b8(0x1e7)](_0x2b3af6=>_0x2b3af6[_0x1170b8(0x1b8)]==='alias'&&_0x2b3af6[_0x1170b8(0x1e1)]==='string');if(!_0x281c4b||!_0x2755d3)return;const _0x5c351a=_0x2d32b0[_0x1170b8(0x1e6)]?String(_0x2d32b0[_0x1170b8(0x1e6)]):'',_0x395166=_0x2d32b0[_0x1170b8(0x1d3)]?String(_0x2d32b0[_0x1170b8(0x1d3)]):'';if(!_0x5c351a&&!_0x395166)throw CliErrors[_0x1170b8(0x1ea)]('`'+_0x5d20be+_0x1170b8(0x1bc));if(_0x395166&&!_0x5c351a){const _0xe034ab=resolveAlias(_0x3838dc,_0x395166);if(!_0xe034ab){const _0x5b679d=listAliases(_0x3838dc)[_0x1170b8(0x1b0)](_0x12a017=>_0x12a017[_0x1170b8(0x1d3)]),_0x3c0dc5=_0x5b679d[_0x1170b8(0x1dd)]?_0x1170b8(0x1e4)+_0x5b679d[_0x1170b8(0x1d1)](',\x20'):_0x1170b8(0x1ae)+_0x3838dc+_0x1170b8(0x1b6)+CLI_BIN_NAME+_0x1170b8(0x1bb);throw CliErrors[_0x1170b8(0x1ea)](_0x1170b8(0x1ee)+_0x395166+_0x1170b8(0x1dc)+_0x3c0dc5);}_0x2d32b0[_0x1170b8(0x1e6)]=_0xe034ab;}}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a4b71,_0x4fc9a){const _0x2f4481=a108_0x9f0a,_0x6b1ca7=_0x4a4b71();while(!![]){try{const _0x263328=parseInt(_0x2f4481(0x13f))/0x1+parseInt(_0x2f4481(0x138))/0x2*(-parseInt(_0x2f4481(0x141))/0x3)+parseInt(_0x2f4481(0x13a))/0x4+-parseInt(_0x2f4481(0x139))/0x5*(parseInt(_0x2f4481(0x13b))/0x6)+parseInt(_0x2f4481(0x13e))/0x7+parseInt(_0x2f4481(0x13c))/0x8*(parseInt(_0x2f4481(0x140))/0x9)+-parseInt(_0x2f4481(0x143))/0xa;if(_0x263328===_0x4fc9a)break;else _0x6b1ca7['push'](_0x6b1ca7['shift']());}catch(_0x254e22){_0x6b1ca7['push'](_0x6b1ca7['shift']());}}}(a108_0x5cc3,0xee007));export function riskLevelOrder(_0xacee61){const _0x1e0c19=a108_0x9f0a,_0x590792={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x590792[_0xacee61??_0x1e0c19(0x142)]??0x0;}export function isValidFormat(_0x91264a){const _0x10629b=a108_0x9f0a;return _0x91264a===_0x10629b(0x13d)||_0x91264a===_0x10629b(0x137)||_0x91264a==='table';}function a108_0x9f0a(_0x456021,_0x8ce13e){_0x456021=_0x456021-0x137;const _0x5cc38b=a108_0x5cc3();let _0x9f0ada=_0x5cc38b[_0x456021];return _0x9f0ada;}function a108_0x5cc3(){const _0x1c5c4e=['79311jQxZbn','read','11789680YqiFwj','pretty','74ZIAddM','4755910CSdEUr','5827968rGbtWp','6aqISxC','907064StEMQd','json','3883320hWPVMc','824209jTsQZD','99KPiyiM'];a108_0x5cc3=function(){return _0x1c5c4e;};return a108_0x5cc3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a109_0x477070=a109_0x5343;(function(_0x4307a5,_0x243e1d){const _0x3e8beb=a109_0x5343,_0x4a5b91=_0x4307a5();while(!![]){try{const _0x5ad213=parseInt(_0x3e8beb(0xdf))/0x1*(-parseInt(_0x3e8beb(0xe5))/0x2)+parseInt(_0x3e8beb(0xe1))/0x3*(-parseInt(_0x3e8beb(0xe3))/0x4)+parseInt(_0x3e8beb(0xe6))/0x5*(-parseInt(_0x3e8beb(0xea))/0x6)+parseInt(_0x3e8beb(0xe7))/0x7+-parseInt(_0x3e8beb(0xe0))/0x8+parseInt(_0x3e8beb(0xe4))/0x9+parseInt(_0x3e8beb(0xe8))/0xa;if(_0x5ad213===_0x243e1d)break;else _0x4a5b91['push'](_0x4a5b91['shift']());}catch(_0x514e73){_0x4a5b91['push'](_0x4a5b91['shift']());}}}(a109_0x2b61,0x52b3f));function a109_0x5343(_0x58cb98,_0xa00e63){_0x58cb98=_0x58cb98-0xdf;const _0x2b6160=a109_0x2b61();let _0x53433c=_0x2b6160[_0x58cb98];return _0x53433c;}export const VERSION='2.0.6';export const GIT_TAG=a109_0x477070(0xe2);export const GIT_COMMIT=a109_0x477070(0xe9);function a109_0x2b61(){const _0xcf61b7=['30ALOqEs','1597dmINaK','3291944fsjMkO','655278KsqJEY','v2.0.6','8vddlNQ','4707369EAEVsy','798lZNpYV','370630xLaKEk','2208626gTYoXj','13563700sMnJZz','3f0fc12'];a109_0x2b61=function(){return _0xcf61b7;};return a109_0x2b61();}export const BUILD_TIME='2026-04-03T10:10:20.682Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a110_0x284d(_0x39de38,_0x298fb0){_0x39de38=_0x39de38-0xaf;var _0x90e686=a110_0x90e6();var _0x284daf=_0x90e686[_0x39de38];return _0x284daf;}(function(_0x4f5190,_0x4d8921){var _0x3f080f=a110_0x284d,_0x50868f=_0x4f5190();while(!![]){try{var _0x515f25=parseInt(_0x3f080f(0xb5))/0x1+-parseInt(_0x3f080f(0xb1))/0x2+-parseInt(_0x3f080f(0xbd))/0x3+parseInt(_0x3f080f(0xbb))/0x4*(parseInt(_0x3f080f(0xb0))/0x5)+-parseInt(_0x3f080f(0xb7))/0x6*(-parseInt(_0x3f080f(0xaf))/0x7)+-parseInt(_0x3f080f(0xb4))/0x8+-parseInt(_0x3f080f(0xb6))/0x9*(-parseInt(_0x3f080f(0xb9))/0xa);if(_0x515f25===_0x4d8921)break;else _0x50868f['push'](_0x50868f['shift']());}catch(_0x29b688){_0x50868f['push'](_0x50868f['shift']());}}}(a110_0x90e6,0x655cb));import a110_0x1a75b9 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x4ffabd=a110_0x284d;console[_0x4ffabd(0xb3)](),console[_0x4ffabd(0xb3)](a110_0x1a75b9[_0x4ffabd(0xb8)][_0x4ffabd(0xba)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x4ffabd(0xb3)](),console['log'](_0x4ffabd(0xbc)+a110_0x1a75b9[_0x4ffabd(0xb8)][_0x4ffabd(0xba)](CLI_BIN_NAME+_0x4ffabd(0xb2))+'\x20to\x20view\x20available\x20commands.'),console['log']();}function a110_0x90e6(){var _0x32621a=['1304288MMJwyH','\x20--help','log','5546224YVjmGy','742391XfTCHw','2403nTfJBA','48XPsRsd','green','9770pKlElg','bold','64EzGxqJ','\x20\x20Use\x20','1157787vHXZfU','537236avCxHe','165405kjQGgq'];a110_0x90e6=function(){return _0x32621a;};return a110_0x90e6();}
|
package/lib/init/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d036c,_0x481465){const _0x10749a=a111_0x3010,_0x15f1c7=_0x3d036c();while(!![]){try{const _0x241541=-parseInt(_0x10749a(0xd6))/0x1*(parseInt(_0x10749a(0xda))/0x2)+-parseInt(_0x10749a(0xd9))/0x3+-parseInt(_0x10749a(0xee))/0x4+parseInt(_0x10749a(0xeb))/0x5*(parseInt(_0x10749a(0xdb))/0x6)+-parseInt(_0x10749a(0xf4))/0x7+-parseInt(_0x10749a(0xc6))/0x8*(parseInt(_0x10749a(0xd1))/0x9)+parseInt(_0x10749a(0xef))/0xa;if(_0x241541===_0x481465)break;else _0x15f1c7['push'](_0x15f1c7['shift']());}catch(_0xacdcf3){_0x15f1c7['push'](_0x15f1c7['shift']());}}}(a111_0x4521,0x56eba));function a111_0x4521(){const _0x5c38c5=['8QJmBqX','126uxRDBk','utf8','trim','.bak','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','\x20api\x20doc\x27\x20and\x20\x27','version','\x20api\x20pull\x27','appcode','info','../..','\x20project\x20init`\x20to\x20start\x20fresh.','parse','1.0.0','package.json','.rabetbase.json','51920GIWigo','\x20\x20appcode:\x20','?\x20(Old\x20file\x20→\x20*.bak)','1874888lSzmGK','18348770uFALlj','string','setLogPath','init','\x20\x20AppCode:\x20','4844882FNEnNN','cyan','Upgrade\x20it\x20to\x20','32zKWmFX','env','toLocaleString','log','✓\x20Upgraded\x20','Please\x20enter\x20App\x20Code:','app','从旧配置文件升级成功','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','bold','cwd','687123PEPTLm','初始化项目配置文件成功','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','green','production','51223KSueki','\x20→\x20.rabetbase.json','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','77361qmRhSV'];a111_0x4521=function(){return _0x5c38c5;};return a111_0x4521();}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a111_0x2d1f48 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../constant/cli.js';function a111_0x3010(_0x469638,_0x5459a5){_0x469638=_0x469638-0xc6;const _0x45210f=a111_0x4521();let _0x301090=_0x45210f[_0x469638];return _0x301090;}import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../context.js';import{validateAppcode}from'../commands/common/validate.js';export async function initConfig(_0xc2367){const _0x513905=a111_0x3010,{appcode:_0x59f941,env:_0x1a17bd,autoYes:_0x1cf72b}=_0xc2367,_0x258fde=process[_0x513905(0xd0)]();if(getProjectConfigPath())throw new Error(_0x513905(0xd8));let _0x20b88c;for(const _0x27aeda of LEGACY_CONFIG_NAMES){const _0x555944=resolve(_0x258fde,_0x27aeda);if(existsSync(_0x555944)){_0x20b88c=_0x555944;break;}}if(_0x20b88c){let _0x1ad925={};try{_0x1ad925=JSON[_0x513905(0xe7)](readFileSync(_0x20b88c,_0x513905(0xdc)));}catch{}const _0x1a1340=basename(_0x20b88c),_0x243b38=_0x1ad925?.[_0x513905(0xe3)]||_0x1ad925?.['app'];let _0x5e6e61=_0x1cf72b;!_0x1cf72b&&(console[_0x513905(0xc9)](a111_0x2d1f48['yellow']('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a111_0x2d1f48[_0x513905(0xcf)](_0x1a1340))),_0x243b38&&console['log'](a111_0x2d1f48[_0x513905(0xf5)](_0x513905(0xec)+_0x243b38)),_0x5e6e61=await confirm({'message':_0x513905(0xf6)+a111_0x2d1f48[_0x513905(0xcf)](_0x513905(0xea))+_0x513905(0xed),'default':!![]}));if(!_0x5e6e61){console[_0x513905(0xc9)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x513905(0xe6));return;}const _0xd9ee7d=resolve(_0x258fde,NEW_CONFIG_NAME),_0x39ff4a=getCliVersionFromPkg(),_0x55c2ba=readRawConfig(),_0x54b0b8={..._0x55c2ba,..._0x1ad925,'version':_0x39ff4a,'migratedAt':new Date()[_0x513905(0xc8)](),'migratedFrom':_0x20b88c};if(!_0x54b0b8['appcode']&&!_0x54b0b8['app']){if(!_0x59f941){const _0x2f532e=await askAppcode();_0x54b0b8[_0x513905(0xe3)]=_0x2f532e;}else _0x54b0b8[_0x513905(0xe3)]=_0x59f941;}if(_0x54b0b8[_0x513905(0xc7)]&&typeof _0x54b0b8['env']!=='string')delete _0x54b0b8[_0x513905(0xc7)];else!_0x54b0b8[_0x513905(0xc7)]&&(_0x54b0b8[_0x513905(0xc7)]=_0x55c2ba[_0x513905(0xc7)]||_0x513905(0xd5));writeConfigFile(_0xd9ee7d,_0x54b0b8);const _0x3ec1c4=_0x20b88c+_0x513905(0xde);renameSync(_0x20b88c,_0x3ec1c4),logger[_0x513905(0xf1)](_0x258fde),logger[_0x513905(0xe4)](_0x513905(0xf2),_0x513905(0xcd),{'from':_0x20b88c,'to':_0xd9ee7d,'appcode':_0x54b0b8['appcode']||_0x54b0b8['app'],'env':_0x54b0b8[_0x513905(0xc7)]}),console[_0x513905(0xc9)](a111_0x2d1f48['green'](_0x513905(0xca)+_0x1a1340+_0x513905(0xd7))),console[_0x513905(0xc9)](a111_0x2d1f48[_0x513905(0xf5)](_0x513905(0xf3)+(_0x54b0b8[_0x513905(0xe3)]||_0x54b0b8[_0x513905(0xcc)]))),console[_0x513905(0xc9)](a111_0x2d1f48['gray'](_0x513905(0xdf)+_0x1a1340+_0x513905(0xde)));return;}const _0x1728f7=_0x59f941||await askAppcode(),_0x56f42a=resolve(_0x258fde,NEW_CONFIG_NAME),_0x3c49c5=getCliVersionFromPkg(),_0x2eb63c=readRawConfig(),_0x51b4bd=typeof _0x2eb63c[_0x513905(0xc7)]===_0x513905(0xf0)?_0x2eb63c[_0x513905(0xc7)]:undefined,_0x2f9f0d={'version':_0x3c49c5,'createdAt':new Date()[_0x513905(0xc8)](),'appcode':_0x1728f7,'env':_0x1a17bd||_0x51b4bd||'production'};writeConfigFile(_0x56f42a,_0x2f9f0d),logger[_0x513905(0xf1)](_0x258fde),logger[_0x513905(0xe4)]('init',_0x513905(0xd2),{'appcode':_0x2f9f0d[_0x513905(0xe3)],'env':_0x2f9f0d['env'],'version':_0x2f9f0d[_0x513905(0xe1)],'configPath':_0x56f42a}),console[_0x513905(0xc9)](a111_0x2d1f48[_0x513905(0xd4)](_0x513905(0xd3))),console[_0x513905(0xc9)](a111_0x2d1f48[_0x513905(0xf5)](_0x513905(0xf3)+_0x1728f7)),console['log'](_0x513905(0xce)+CLI_BIN_NAME+_0x513905(0xe0)+CLI_BIN_NAME+_0x513905(0xe2));}function askAppcode(){const _0x19956b=a111_0x3010;return input({'message':_0x19956b(0xcb),'validate':_0x58f99d=>{const _0x53f2a3=_0x19956b;if(!_0x58f99d[_0x53f2a3(0xdd)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x2644b5,message:_0x34c66f}=validateAppcode(_0x58f99d[_0x53f2a3(0xdd)]());return _0x2644b5||_0x34c66f||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x329e9f=a111_0x3010;try{const _0x22b9c5=fileURLToPath(import.meta.url),_0x56472c=resolve(dirname(_0x22b9c5),_0x329e9f(0xe5)),_0xb1750d=JSON['parse'](readFileSync(resolve(_0x56472c,_0x329e9f(0xe9)),'utf8'));return _0xb1750d[_0x329e9f(0xe1)]||_0x329e9f(0xe8);}catch{return _0x329e9f(0xe8);}}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a112_0x148c58=a112_0x1c5f;function a112_0x1c5f(_0x3acfa7,_0x47917a){_0x3acfa7=_0x3acfa7-0x182;const _0x313911=a112_0x3139();let _0x1c5f0f=_0x313911[_0x3acfa7];return _0x1c5f0f;}(function(_0x37d387,_0xf25355){const _0x10f6d5=a112_0x1c5f,_0x5275ee=_0x37d387();while(!![]){try{const _0x41bdb3=-parseInt(_0x10f6d5(0x18b))/0x1*(-parseInt(_0x10f6d5(0x1aa))/0x2)+parseInt(_0x10f6d5(0x19d))/0x3+-parseInt(_0x10f6d5(0x1a9))/0x4*(parseInt(_0x10f6d5(0x18f))/0x5)+-parseInt(_0x10f6d5(0x19a))/0x6*(-parseInt(_0x10f6d5(0x18a))/0x7)+parseInt(_0x10f6d5(0x19f))/0x8*(parseInt(_0x10f6d5(0x1a4))/0x9)+parseInt(_0x10f6d5(0x19e))/0xa*(parseInt(_0x10f6d5(0x190))/0xb)+-parseInt(_0x10f6d5(0x199))/0xc*(parseInt(_0x10f6d5(0x191))/0xd);if(_0x41bdb3===_0xf25355)break;else _0x5275ee['push'](_0x5275ee['shift']());}catch(_0x389753){_0x5275ee['push'](_0x5275ee['shift']());}}}(a112_0x3139,0xd03cb));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function camelCaseFlagsToKebab(_0xc9207b){const _0x5ac16f=a112_0x1c5f,_0x29e59c=[];for(const [_0x381059,_0x1f0404]of Object[_0x5ac16f(0x1a5)](_0xc9207b)){if(_0x1f0404===!![]){const _0x113199=_0x381059[_0x5ac16f(0x192)](/([A-Z])/g,_0x5ac16f(0x185))[_0x5ac16f(0x1a2)]();_0x29e59c['push'](_0x113199);}}return _0x29e59c;}export function parseDynamicFlags(){const _0x2208b1=a112_0x1c5f,_0x489a82=[];for(let _0x5bffde=0x3;_0x5bffde<process[_0x2208b1(0x1a7)]['length'];_0x5bffde++){const _0x542422=process['argv'][_0x5bffde];if(_0x542422&&_0x542422['startsWith']('--')){const _0x3b6f4e=_0x542422[_0x2208b1(0x18e)](0x2);_0x3b6f4e&&!_0x3b6f4e['includes']('=')&&_0x489a82[_0x2208b1(0x186)](_0x3b6f4e);}}return _0x489a82;}export function getAllProvidedFlags(_0x43b071){const _0x5e71e9=a112_0x1c5f,_0x43b85d=camelCaseFlagsToKebab(_0x43b071),_0x4321e3=parseDynamicFlags(),_0x55bed9=new Set([..._0x43b85d,..._0x4321e3]);return Array[_0x5e71e9(0x1a0)](_0x55bed9);}export function normalizeLegacyBffSaveFlags(_0xdbbae0){const _0x2e3d17=a112_0x1c5f,_0x5d58e8=new Set(_0xdbbae0);return _0x5d58e8[_0x2e3d17(0x183)]('dangerously-bff-save')&&_0x5d58e8[_0x2e3d17(0x19b)]('enable-bff-save'),Array[_0x2e3d17(0x1a0)](_0x5d58e8);}const SKILLS_INSTALL_COMMAND_LINE=a112_0x148c58(0x187);export async function skillsCommand(_0x4a3162,_0x2f3fca,_0x552164){const _0x14f636=a112_0x148c58;logger['setLogPath'](process[_0x14f636(0x195)]());if(_0x552164?.[_0x14f636(0x182)]||_0x4a3162===_0x14f636(0x189)){showHelp();return;}console['error'](_0x14f636(0x194)+(_0x4a3162||_0x14f636(0x1a1))),console[_0x14f636(0x198)](_0x14f636(0x18c)),console['log']('\x20\x20'+CLI_BIN_NAME+_0x14f636(0x196)),console['log']('\x20\x20'+CLI_BIN_NAME+_0x14f636(0x193)),console[_0x14f636(0x198)](''),console['log'](_0x14f636(0x184)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x14f636(0x197)](_0x14f636(0x18d),_0x14f636(0x188)+_0x4a3162),process['exit'](0x1);}function a112_0x3139(){const _0x3a9094=['1460041hRhoCc','13PAaTtt','replace','\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','Error:\x20Unsupported\x20command:\x20','cwd','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','error','log','33589092IYROdP','33882ppfxaQ','add','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','3250818dQMacL','40abDveB','8NlzmHJ','from','(empty)','toLowerCase','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','6845436kxrQsL','entries','\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','argv','\x20skill\x20--help\x0a\x20\x20','1988blKsIZ','68fMzaCN','help','has','Equivalent\x20command:\x20','-$1','push','npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global','不支持的命令:\x20','--help','1848PVzqfJ','42853mvZPxi','\x0aAvailable\x20commands:','skill','slice','16810UNDGmO'];a112_0x3139=function(){return _0x3a9094;};return a112_0x3139();}function showHelp(){const _0x759de3=a112_0x148c58;console['log'](_0x759de3(0x1a3)+CLI_BIN_NAME+_0x759de3(0x1a8)+CLI_BIN_NAME+_0x759de3(0x1a6)+SKILLS_INSTALL_COMMAND_LINE+_0x759de3(0x19c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x37d4a9=a113_0x17b4;(function(_0x143447,_0x4d2340){const _0x44a4a6=a113_0x17b4,_0x1c71f1=_0x143447();while(!![]){try{const _0xe0d48d=parseInt(_0x44a4a6(0xfa))/0x1*(parseInt(_0x44a4a6(0xfb))/0x2)+-parseInt(_0x44a4a6(0x104))/0x3*(parseInt(_0x44a4a6(0x102))/0x4)+-parseInt(_0x44a4a6(0xfe))/0x5+-parseInt(_0x44a4a6(0x112))/0x6+parseInt(_0x44a4a6(0x101))/0x7+-parseInt(_0x44a4a6(0xf9))/0x8*(parseInt(_0x44a4a6(0x100))/0x9)+parseInt(_0x44a4a6(0x113))/0xa;if(_0xe0d48d===_0x4d2340)break;else _0x1c71f1['push'](_0x1c71f1['shift']());}catch(_0x1f7ac8){_0x1c71f1['push'](_0x1c71f1['shift']());}}}(a113_0x4821,0xedeee));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';function a113_0x17b4(_0x3e8ba7,_0x53b453){_0x3e8ba7=_0x3e8ba7-0xf7;const _0x4821f2=a113_0x4821();let _0x17b455=_0x4821f2[_0x3e8ba7];return _0x17b455;}export const NPX_SKILLS_CLI=a113_0x37d4a9(0x103);export const NPX_SKILLS_SUBCOMMAND_ADD=a113_0x37d4a9(0xfd);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a113_0x37d4a9(0xf7);function a113_0x4821(){const _0x59e65d=['16TvzrMI','166NTBJVP','12832gkCDQC','trim','add','3258675iEnvVP','npx','383607RSZZvo','7158333RdSTDg','4ZhtHDe','skills','254535vvekUC','inherit','--global','stderr','exit\x20','toString','stdout','log','join','Lovrabet','pipe','stdio','status','remove','2483832GtgORb','1226970cmDsyp','lovrabet/lovrabet-skill','unknown'];a113_0x4821=function(){return _0x59e65d;};return a113_0x4821();}export const DEFAULT_RABETBASE_SKILL_NAME=a113_0x37d4a9(0x10d);export function buildNpxSkillsAddArgv(_0x4cefd2=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x4cefd2];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a113_0x37d4a9(0xff),...buildNpxSkillsAddArgv()][a113_0x37d4a9(0x10c)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0xc2af15,_0x336e2e){const _0x45eb77=a113_0x37d4a9;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3e68d4=_0x336e2e?.[_0x45eb77(0x10f)]??'inherit',_0x4b4af6=resolveNpmBin('npx'),_0x30e6bb=buildNpxSkillsAddArgv(_0x336e2e?.['skill']??DEFAULT_RABETBASE_SKILL_NAME),_0x39a08d=[_0x4b4af6,..._0x30e6bb][_0x45eb77(0x10c)]('\x20');console[_0x45eb77(0x10b)]('*\x20'+_0x39a08d);const _0x44514c=spawnSync(_0x4b4af6,_0x30e6bb,{'cwd':_0xc2af15,'stdio':_0x3e68d4,'env':process.env,'shell':![]}),_0x31ea7c=_0x44514c[_0x45eb77(0x110)];if(_0x31ea7c===0x0)return{'ok':!![],'status':0x0};let _0x14ffb3=_0x45eb77(0x108)+(_0x31ea7c??_0x45eb77(0xf8));if(_0x3e68d4===_0x45eb77(0x10e)){const _0x3c46bf=_0x44514c['stderr']?_0x44514c['stderr'][_0x45eb77(0x109)]()[_0x45eb77(0xfc)]():'',_0x30ceda=_0x44514c[_0x45eb77(0x10a)]?_0x44514c['stdout'][_0x45eb77(0x109)]()['trim']():'';if(_0x3c46bf)_0x14ffb3=_0x3c46bf;else{if(_0x30ceda)_0x14ffb3=_0x30ceda;}}return{'ok':![],'status':_0x31ea7c??null,'error':_0x14ffb3};}export function runNpxSkillsRemove(_0x748837,_0x749ede){const _0x32716e=a113_0x37d4a9,_0x56e197=_0x749ede?.[_0x32716e(0x10f)]??_0x32716e(0x105),_0x1c950e=resolveNpmBin(_0x32716e(0xff)),_0x1d110f=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x32716e(0x111),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x749ede?.['skill']??DEFAULT_RABETBASE_SKILL_NAME],_0x57bba9=[_0x1c950e,..._0x1d110f][_0x32716e(0x10c)]('\x20');console[_0x32716e(0x10b)]('*\x20'+_0x57bba9);const _0x3d66ee=spawnSync(_0x1c950e,_0x1d110f,{'cwd':_0x748837,'stdio':_0x56e197,'env':process.env,'shell':![]}),_0x468b71=_0x3d66ee[_0x32716e(0x110)];if(_0x468b71===0x0)return{'ok':!![],'status':0x0};let _0x4336dc='exit\x20'+(_0x468b71??_0x32716e(0xf8));if(_0x56e197==='pipe'){const _0x7891c9=_0x3d66ee[_0x32716e(0x107)]?_0x3d66ee['stderr'][_0x32716e(0x109)]()[_0x32716e(0xfc)]():'',_0x211b9b=_0x3d66ee[_0x32716e(0x10a)]?_0x3d66ee[_0x32716e(0x10a)][_0x32716e(0x109)]()['trim']():'';if(_0x7891c9)_0x4336dc=_0x7891c9;else{if(_0x211b9b)_0x4336dc=_0x211b9b;}}return{'ok':![],'status':_0x468b71??null,'error':_0x4336dc};}export function runNpxSkillsAddGlobal(_0x518b35,_0x5961af,_0x2ef56){const _0x3fe02b=a113_0x37d4a9,_0x586c2a=_0x2ef56?.['stdio']??'inherit',_0x3d52a9=resolveNpmBin(_0x3fe02b(0xff)),_0x47fc5f=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5961af,_0x3fe02b(0x106)],_0x32d376=[_0x3d52a9,..._0x47fc5f][_0x3fe02b(0x10c)]('\x20');console[_0x3fe02b(0x10b)]('*\x20'+_0x32d376);const _0xe7a635=spawnSync(_0x3d52a9,_0x47fc5f,{'cwd':_0x518b35,'stdio':_0x586c2a,'env':process.env,'shell':![]}),_0x1bd69e=_0xe7a635[_0x3fe02b(0x110)];if(_0x1bd69e===0x0)return{'ok':!![],'status':0x0};let _0x446e24=_0x3fe02b(0x108)+(_0x1bd69e??_0x3fe02b(0xf8));if(_0x586c2a==='pipe'){const _0x187ef9=_0xe7a635[_0x3fe02b(0x107)]?_0xe7a635[_0x3fe02b(0x107)][_0x3fe02b(0x109)]()[_0x3fe02b(0xfc)]():'',_0x339259=_0xe7a635[_0x3fe02b(0x10a)]?_0xe7a635['stdout']['toString']()[_0x3fe02b(0xfc)]():'';if(_0x187ef9)_0x446e24=_0x187ef9;else{if(_0x339259)_0x446e24=_0x339259;}}return{'ok':![],'status':_0x1bd69e??null,'error':_0x446e24};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x36d202,_0x5dcaf2){const _0x53c251=a114_0x20ff,_0x535b5c=_0x36d202();while(!![]){try{const _0x1fe017=-parseInt(_0x53c251(0x14e))/0x1*(parseInt(_0x53c251(0x158))/0x2)+parseInt(_0x53c251(0x15b))/0x3+-parseInt(_0x53c251(0x15d))/0x4*(-parseInt(_0x53c251(0x154))/0x5)+-parseInt(_0x53c251(0x15c))/0x6+parseInt(_0x53c251(0x14f))/0x7+-parseInt(_0x53c251(0x14b))/0x8*(-parseInt(_0x53c251(0x15e))/0x9)+parseInt(_0x53c251(0x15f))/0xa*(-parseInt(_0x53c251(0x15a))/0xb);if(_0x1fe017===_0x5dcaf2)break;else _0x535b5c['push'](_0x535b5c['shift']());}catch(_0x6730f2){_0x535b5c['push'](_0x535b5c['shift']());}}}(a114_0x2142,0x3c2c6));import{sendCliTraceLog}from'./send-cli-trace-log.js';function a114_0x20ff(_0x175efd,_0x2ac486){_0x175efd=_0x175efd-0x14b;const _0x214214=a114_0x2142();let _0x20ff5d=_0x214214[_0x175efd];return _0x20ff5d;}function a114_0x2142(){const _0x13e15d=['256570maOQhh','rabetbase.command','11gawJBF','1008516jXrdXX','1714962CvoXqf','1277864bOYxPh','153jcppKy','4155080bhWiEN','106728IHQPxB','error','flags','3fLMclv','3151575AVjzVU','stringify','some','test','[REDACTED]','5wUyRew','message','entries','durationMs'];a114_0x2142=function(){return _0x13e15d;};return a114_0x2142();}import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i];function isSensitiveKey(_0x3d6875){const _0x42d8d0=a114_0x20ff;return SENSITIVE_PATTERNS[_0x42d8d0(0x151)](_0x27400a=>_0x27400a[_0x42d8d0(0x152)](_0x3d6875));}function sanitizeFlags(_0x39a19e){const _0x17656a=a114_0x20ff,_0xdf08d={};for(const [_0x5d7a6b,_0x3f3288]of Object[_0x17656a(0x156)](_0x39a19e)){isSensitiveKey(_0x5d7a6b)?_0xdf08d[_0x5d7a6b]=_0x3f3288!=null&&_0x3f3288!==''?_0x17656a(0x153):_0x3f3288:_0xdf08d[_0x5d7a6b]=_0x3f3288;}return _0xdf08d;}export async function reportCommandTrace(_0x25d9ca){const _0x571b9e=a114_0x20ff;try{const _0x481d3d=sanitizeFlags(_0x25d9ca[_0x571b9e(0x14d)]);await sendCliTraceLog({'spanName':_0x571b9e(0x159),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x25d9ca['service'],'command.name':_0x25d9ca['command'],'command.flags':JSON[_0x571b9e(0x150)](_0x481d3d),..._0x25d9ca['durationMs']!=null?{'command.duration_ms':_0x25d9ca[_0x571b9e(0x157)]}:{},..._0x25d9ca['error']?{'command.error':_0x25d9ca['error']instanceof Error?_0x25d9ca[_0x571b9e(0x14c)][_0x571b9e(0x155)]:String(_0x25d9ca[_0x571b9e(0x14c)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2063b9,_0x12e0a8){var _0x5b6b61=a115_0x4d66,_0x5ab768=_0x2063b9();while(!![]){try{var _0x2f5cb5=-parseInt(_0x5b6b61(0xa9))/0x1+-parseInt(_0x5b6b61(0xac))/0x2*(-parseInt(_0x5b6b61(0xb0))/0x3)+parseInt(_0x5b6b61(0xa2))/0x4*(-parseInt(_0x5b6b61(0xab))/0x5)+parseInt(_0x5b6b61(0xad))/0x6*(parseInt(_0x5b6b61(0xae))/0x7)+parseInt(_0x5b6b61(0xa5))/0x8*(parseInt(_0x5b6b61(0xa3))/0x9)+-parseInt(_0x5b6b61(0xa4))/0xa*(parseInt(_0x5b6b61(0xa8))/0xb)+parseInt(_0x5b6b61(0xa6))/0xc;if(_0x2f5cb5===_0x12e0a8)break;else _0x5ab768['push'](_0x5ab768['shift']());}catch(_0x5193b3){_0x5ab768['push'](_0x5ab768['shift']());}}}(a115_0x4fbd,0x1984f));function a115_0x4fbd(){var _0x5cf475=['681nMkyYE','error','4eSwaXp','186057VQdWGt','1710BgJeyS','16PupcRG','367320sqHXVV','Failed\x20to\x20report\x20CLI\x20help\x20trace:','12529jmzMBv','30855qYTODl','cli.help','372985OqSTdK','1318evVzHI','6PhYiPA','1282393jrdknw','service'];a115_0x4fbd=function(){return _0x5cf475;};return a115_0x4fbd();}function a115_0x4d66(_0x1e317f,_0x3c811a){_0x1e317f=_0x1e317f-0xa2;var _0x4fbd23=a115_0x4fbd();var _0x4d6620=_0x4fbd23[_0x1e317f];return _0x4d6620;}import{sendCliTraceLog}from'./send-cli-trace-log.js';export async function reportCliHelpTrace(_0x33c7dd,_0x47af25){var _0x5c3c0c=a115_0x4d66;try{await sendCliTraceLog({'spanName':_0x5c3c0c(0xaa),'logData':{'rabetbase.help.kind':_0x33c7dd,..._0x47af25?.[_0x5c3c0c(0xaf)]&&{'rabetbase.help.service':_0x47af25['service']}}});}catch(_0x3c9587){console[_0x5c3c0c(0xb1)](_0x5c3c0c(0xa7),_0x3c9587);}}
|