@lovrabet/rabetbase-cli 2.3.3 → 2.3.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -560
- 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/login-success-html.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/generate.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/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.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/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.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/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.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/params.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/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +19 -3
- package/lib/commands/app/use.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16d0f4,_0x192b9d){const _0x404dc3=a192_0x155b,_0x24972d=_0x16d0f4();while(!![]){try{const _0x49c25f=parseInt(_0x404dc3(0x127))/0x1+-parseInt(_0x404dc3(0x12b))/0x2*(-parseInt(_0x404dc3(0x128))/0x3)+-parseInt(_0x404dc3(0x12e))/0x4*(-parseInt(_0x404dc3(0x120))/0x5)+parseInt(_0x404dc3(0x130))/0x6*(-parseInt(_0x404dc3(0x131))/0x7)+parseInt(_0x404dc3(0x124))/0x8+-parseInt(_0x404dc3(0x12f))/0x9+-parseInt(_0x404dc3(0x123))/0xa;if(_0x49c25f===_0x192b9d)break;else _0x24972d['push'](_0x24972d['shift']());}catch(_0x35d8c7){_0x24972d['push'](_0x24972d['shift']());}}}(a192_0x13f7,0xac0d5));function a192_0x13f7(){const _0x49433e=['command','durationMs','7056770vXudta','6344832pVGLVj','entries','some','722813vNLiSZ','951OLasPW','[REDACTED]','flags','2644oJtoQq','error','service','4SYnLIr','622395rlCYgX','2951514EwPrFT','7JhmxlB','182425kVPorL'];a192_0x13f7=function(){return _0x49433e;};return a192_0x13f7();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function a192_0x155b(_0x4b98e5,_0x39210f){_0x4b98e5=_0x4b98e5-0x120;const _0x13f7a1=a192_0x13f7();let _0x155bf3=_0x13f7a1[_0x4b98e5];return _0x155bf3;}function isSensitiveKey(_0x82c394){const _0xd22b4d=a192_0x155b;return SENSITIVE_PATTERNS[_0xd22b4d(0x126)](_0x1d2727=>_0x1d2727['test'](_0x82c394));}function sanitizeFlags(_0x22e4df){const _0x5a04b2=a192_0x155b,_0x1a0a28={};for(const [_0x518732,_0xa529c5]of Object[_0x5a04b2(0x125)](_0x22e4df)){isSensitiveKey(_0x518732)?_0x1a0a28[_0x518732]=_0xa529c5!=null&&_0xa529c5!==''?_0x5a04b2(0x129):_0xa529c5:_0x1a0a28[_0x518732]=_0xa529c5;}return _0x1a0a28;}export async function reportCommandTrace(_0x1491b0){const _0x29e950=a192_0x155b;try{const _0x4436e5=sanitizeFlags(_0x1491b0[_0x29e950(0x12a)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x1491b0[_0x29e950(0x12d)],'command.name':_0x1491b0[_0x29e950(0x121)],'command.flags':JSON['stringify'](_0x4436e5),..._0x1491b0['durationMs']!=null?{'command.duration_ms':_0x1491b0[_0x29e950(0x122)]}:{},..._0x1491b0[_0x29e950(0x12c)]?{'command.error':_0x1491b0[_0x29e950(0x12c)]instanceof Error?_0x1491b0[_0x29e950(0x12c)]['message']:String(_0x1491b0[_0x29e950(0x12c)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5680da,_0x414d6c){var _0x20ee0f=a193_0x31b8,_0x1dd1e5=_0x5680da();while(!![]){try{var _0x379782=-parseInt(_0x20ee0f(0x1bf))/0x1+parseInt(_0x20ee0f(0x1be))/0x2+-parseInt(_0x20ee0f(0x1bd))/0x3*(parseInt(_0x20ee0f(0x1bc))/0x4)+parseInt(_0x20ee0f(0x1c4))/0x5+parseInt(_0x20ee0f(0x1bb))/0x6+-parseInt(_0x20ee0f(0x1c3))/0x7*(parseInt(_0x20ee0f(0x1c5))/0x8)+-parseInt(_0x20ee0f(0x1c1))/0x9*(-parseInt(_0x20ee0f(0x1c7))/0xa);if(_0x379782===_0x414d6c)break;else _0x1dd1e5['push'](_0x1dd1e5['shift']());}catch(_0x562318){_0x1dd1e5['push'](_0x1dd1e5['shift']());}}}(a193_0x3e35,0x87e26));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a193_0x31b8(_0x2ddf2a,_0x1798ef){_0x2ddf2a=_0x2ddf2a-0x1bb;var _0x3e351b=a193_0x3e35();var _0x31b812=_0x3e351b[_0x2ddf2a];return _0x31b812;}export async function reportCliHelpTrace(_0x55d436,_0x429333){var _0x4e5086=a193_0x31b8;try{await sendCliTraceLog({'spanName':_0x4e5086(0x1c6),'logData':{'rabetbase.help.kind':_0x55d436,..._0x429333?.[_0x4e5086(0x1c2)]&&{'rabetbase.help.service':_0x429333[_0x4e5086(0x1c2)]}}});}catch(_0x96ba2c){console[_0x4e5086(0x1c0)](_0x4e5086(0x1c8),_0x96ba2c);}}function a193_0x3e35(){var _0x276394=['2244GtVZFp','5130LfGyUp','1354682SrvftX','102972YEDgEk','error','4605462IHZAGz','service','28jlVTTg','1499895gBtnlM','1925528yaEIRW','cli.help','20PmpFdU','Failed\x20to\x20report\x20CLI\x20help\x20trace:','3485232MmTepd'];a193_0x3e35=function(){return _0x276394;};return a193_0x3e35();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a194_0x521e(){const _0x577101=['email','421353bVKlnK','nickname','66qAwbvp','473010wStFHF','unknown','1497840MGbNfi','2692655RiitVZ','3486ygsDbq','daily','3205DRKJsw','user','384308xpqVck','username','51528ajrHgo','60kckOdd','production'];a194_0x521e=function(){return _0x577101;};return a194_0x521e();}(function(_0x457f27,_0x880b2){const _0x536854=a194_0x2aa1,_0x388e82=_0x457f27();while(!![]){try{const _0xde7816=parseInt(_0x536854(0x154))/0x1+parseInt(_0x536854(0x14c))/0x2+parseInt(_0x536854(0x15c))/0x3*(parseInt(_0x536854(0x156))/0x4)+parseInt(_0x536854(0x152))/0x5*(-parseInt(_0x536854(0x150))/0x6)+-parseInt(_0x536854(0x14f))/0x7+-parseInt(_0x536854(0x14e))/0x8+parseInt(_0x536854(0x15a))/0x9*(parseInt(_0x536854(0x157))/0xa);if(_0xde7816===_0x880b2)break;else _0x388e82['push'](_0x388e82['shift']());}catch(_0x19f403){_0x388e82['push'](_0x388e82['shift']());}}}(a194_0x521e,0x3aca3));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a194_0x2aa1(_0x399796,_0x199f79){_0x399796=_0x399796-0x14c;const _0x521ee5=a194_0x521e();let _0x2aa12b=_0x521ee5[_0x399796];return _0x2aa12b;}import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5cde6f=a194_0x2aa1,_0x58c123=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x42a356=_0x58c123?.[_0x5cde6f(0x153)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x5cde6f(0x14d)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x5cde6f(0x151):_0x5cde6f(0x158))}),setUserContext({'id':_0x42a356?.['id'],'username':_0x42a356?.[_0x5cde6f(0x155)],'nickname':_0x42a356?.[_0x5cde6f(0x15b)],'email':_0x42a356?.[_0x5cde6f(0x159)],'tenantCode':_0x42a356?.['tenant']['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x58c123;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x192b58,_0xfd006){const _0x11db9a=a195_0x1109,_0x12ecef=_0x192b58();while(!![]){try{const _0x1ac1aa=-parseInt(_0x11db9a(0xbd))/0x1+-parseInt(_0x11db9a(0xc1))/0x2+-parseInt(_0x11db9a(0xb9))/0x3+-parseInt(_0x11db9a(0xc6))/0x4+-parseInt(_0x11db9a(0xbc))/0x5+parseInt(_0x11db9a(0xba))/0x6*(-parseInt(_0x11db9a(0xbf))/0x7)+-parseInt(_0x11db9a(0xb8))/0x8*(-parseInt(_0x11db9a(0xbb))/0x9);if(_0x1ac1aa===_0xfd006)break;else _0x12ecef['push'](_0x12ecef['shift']());}catch(_0x3cce76){_0x12ecef['push'](_0x12ecef['shift']());}}}(a195_0x5273,0xb5524));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a195_0x5273(){const _0x261e11=['once','2480264XapETT','80OfuBFe','406467YRJYMw','4520856rlXmBi','4791429QIiVNb','7339775BSDQhI','1294782BvngZP','beforeExit','7CeePMS','then','618700WovnJS','exit','SIGINT','SIGTERM'];a195_0x5273=function(){return _0x261e11;};return a195_0x5273();}export function registerOtelShutdownOnExit(){const _0x50a0ba=a195_0x1109;process[_0x50a0ba(0xc5)](_0x50a0ba(0xbe),()=>{void flushOtelNodeIfUsed();});const _0x322552=()=>{const _0x466824=_0x50a0ba;void flushOtelNodeIfUsed()[_0x466824(0xc0)](()=>process['exit'](0x0));};process[_0x50a0ba(0xc5)](_0x50a0ba(0xc3),_0x322552),process['once'](_0x50a0ba(0xc4),_0x322552);}function a195_0x1109(_0x383916,_0x256baf){_0x383916=_0x383916-0xb8;const _0x5273b9=a195_0x5273();let _0x110904=_0x5273b9[_0x383916];return _0x110904;}export async function exitWithOtelShutdown(_0x30367f){const _0x29f00f=a195_0x1109;await flushOtelNodeIfUsed(),process[_0x29f00f(0xc2)](_0x30367f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3cb56b,_0x4bcfcf){const _0x31a9c9=a196_0xaada,_0x3b8b80=_0x3cb56b();while(!![]){try{const _0x419738=parseInt(_0x31a9c9(0x1e6))/0x1*(parseInt(_0x31a9c9(0x1e1))/0x2)+-parseInt(_0x31a9c9(0x1e3))/0x3+-parseInt(_0x31a9c9(0x1ed))/0x4+-parseInt(_0x31a9c9(0x1e0))/0x5*(parseInt(_0x31a9c9(0x1e4))/0x6)+-parseInt(_0x31a9c9(0x1ec))/0x7+-parseInt(_0x31a9c9(0x1e7))/0x8*(-parseInt(_0x31a9c9(0x1ea))/0x9)+parseInt(_0x31a9c9(0x1e5))/0xa;if(_0x419738===_0x4bcfcf)break;else _0x3b8b80['push'](_0x3b8b80['shift']());}catch(_0x383167){_0x3b8b80['push'](_0x3b8b80['shift']());}}}(a196_0x105b,0x323ce));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME='rabetbase-cli';function a196_0xaada(_0x45e202,_0x341714){_0x45e202=_0x45e202-0x1e0;const _0x105bbe=a196_0x105b();let _0xaada5b=_0x105bbe[_0x45e202];return _0xaada5b;}export async function sendCliTraceLog(_0x4f9601){const _0x1dc040=a196_0xaada;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x4f9601[_0x1dc040(0x1eb)]??DEFAULT_TRACE_NAME,'version':_0x4f9601[_0x1dc040(0x1e9)]??getCliVersion(),'spanName':_0x4f9601['spanName'],'eventType':_0x1dc040(0x1e8),'logData':_0x4f9601['logData'],..._0x4f9601[_0x1dc040(0x1e2)]&&{'traceparent':_0x4f9601[_0x1dc040(0x1e2)]}});}function a196_0x105b(){const _0x51909c=['traceparent','897810NFTRnC','30nyBHkQ','4295960HxLtCO','61BYwXBz','2408CsjRNs','manual','version','10863pFYNzG','traceName','1844024KwlBNj','618504UIXzUP','29255Iexpif','5228JcOrle'];a196_0x105b=function(){return _0x51909c;};return a196_0x105b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a197_0x5ab2a4=a197_0x2245;function a197_0x2f5a(){const _0x9cdac3=['issue.log.collect','59449UXLhwC','truncated','1696156hejvZD','join','sanitize','686495PkVZuA','originalBytes','platform-issue-log-collect','4106216LkDvIk','72FEJYiF','1525932GqfTLK','redactionCount','1035096zJmvHs','25114PaFJvL'];a197_0x2f5a=function(){return _0x9cdac3;};return a197_0x2f5a();}(function(_0x1aab8f,_0x1db511){const _0x3277e2=a197_0x2245,_0x29c76e=_0x1aab8f();while(!![]){try{const _0x15e419=-parseInt(_0x3277e2(0x184))/0x1+parseInt(_0x3277e2(0x182))/0x2*(-parseInt(_0x3277e2(0x17e))/0x3)+parseInt(_0x3277e2(0x181))/0x4+-parseInt(_0x3277e2(0x189))/0x5+-parseInt(_0x3277e2(0x17f))/0x6+parseInt(_0x3277e2(0x186))/0x7+parseInt(_0x3277e2(0x17d))/0x8;if(_0x15e419===_0x1db511)break;else _0x29c76e['push'](_0x29c76e['shift']());}catch(_0x77dfd6){_0x29c76e['push'](_0x29c76e['shift']());}}}(a197_0x2f5a,0x3ff21));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a197_0x5ab2a4(0x17c);export const PLATFORM_ISSUE_SPAN_NAME=a197_0x5ab2a4(0x183);function a197_0x2245(_0x952844,_0x1f296c){_0x952844=_0x952844-0x17c;const _0x2f5a0f=a197_0x2f5a();let _0x2245b2=_0x2f5a0f[_0x952844];return _0x2245b2;}export async function sendPlatformIssueCollectLog(_0x45cdf8){const _0x39b1a3=a197_0x5ab2a4;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x45cdf8['title'],'issue.description':_0x45cdf8['description'],..._0x45cdf8['sanitize']?{'issue.description_original_bytes':_0x45cdf8[_0x39b1a3(0x188)][_0x39b1a3(0x18a)],'issue.description_truncated':_0x45cdf8[_0x39b1a3(0x188)][_0x39b1a3(0x185)],'issue.description_redactions':_0x45cdf8[_0x39b1a3(0x188)][_0x39b1a3(0x180)],'issue.description_redaction_kinds':_0x45cdf8[_0x39b1a3(0x188)]['redactionKinds'][_0x39b1a3(0x187)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x44d023=a199_0x46f0;(function(_0xe01274,_0x4e2b22){const _0x3ce413=a199_0x46f0,_0x3731f3=_0xe01274();while(!![]){try{const _0xa26a49=parseInt(_0x3ce413(0x1c7))/0x1*(-parseInt(_0x3ce413(0x1b6))/0x2)+-parseInt(_0x3ce413(0x1da))/0x3+-parseInt(_0x3ce413(0x1c0))/0x4*(-parseInt(_0x3ce413(0x1ba))/0x5)+parseInt(_0x3ce413(0x1e2))/0x6*(-parseInt(_0x3ce413(0x1b3))/0x7)+-parseInt(_0x3ce413(0x1db))/0x8+-parseInt(_0x3ce413(0x1b5))/0x9+parseInt(_0x3ce413(0x1e1))/0xa;if(_0xa26a49===_0x4e2b22)break;else _0x3731f3['push'](_0x3731f3['shift']());}catch(_0x380f47){_0x3731f3['push'](_0x3731f3['shift']());}}}(a199_0x3856,0x90f12));export const CORE_IDE_CONFIGS={'cursor':{'name':a199_0x44d023(0x1b9),'description':a199_0x44d023(0x1d9),'folders':['.cursorrules',a199_0x44d023(0x1ac)],'files':[{'type':'file','path':a199_0x44d023(0x1c5),'template':a199_0x44d023(0x1bf)}]},'windsurf':{'name':'Windsurf','description':a199_0x44d023(0x1ae),'folders':[a199_0x44d023(0x1de)],'files':[{'type':a199_0x44d023(0x1d0),'path':a199_0x44d023(0x1b2),'template':a199_0x44d023(0x1bf)}]},'claude':{'name':a199_0x44d023(0x1dd),'description':'Claude\x20Code','folders':[a199_0x44d023(0x1c2)],'files':[{'type':'file','path':a199_0x44d023(0x1d2),'template':'SKILL.md.tpl'}]},'cline':{'name':'Cline','description':a199_0x44d023(0x1cb),'folders':[a199_0x44d023(0x1c6)],'files':[{'type':a199_0x44d023(0x1d0),'path':a199_0x44d023(0x1c3),'template':a199_0x44d023(0x1bf)}]},'codex':{'name':a199_0x44d023(0x1c8),'description':a199_0x44d023(0x1c4),'folders':[a199_0x44d023(0x1ab)],'files':[{'type':a199_0x44d023(0x1d0),'path':a199_0x44d023(0x1b4),'template':a199_0x44d023(0x1bf)}]},'opencode':{'name':a199_0x44d023(0x1bd),'description':a199_0x44d023(0x1d1),'folders':[a199_0x44d023(0x1bc)],'files':[{'type':a199_0x44d023(0x1d0),'path':a199_0x44d023(0x1b0),'template':'SKILL.md.tpl'}]},'qoder':{'name':a199_0x44d023(0x1dc),'description':'Qoder\x20IDE','folders':[a199_0x44d023(0x1c1)],'files':[{'type':a199_0x44d023(0x1d0),'path':a199_0x44d023(0x1ca),'template':'SKILL.md.tpl'},{'type':a199_0x44d023(0x1d0),'path':'.qoder/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'codebuddy':{'name':a199_0x44d023(0x1d4),'description':a199_0x44d023(0x1ad),'folders':['.codebuddy'],'files':[{'type':'file','path':a199_0x44d023(0x1c9),'template':a199_0x44d023(0x1bf)}]},'trae':{'name':a199_0x44d023(0x1d5),'description':a199_0x44d023(0x1cc),'folders':[a199_0x44d023(0x1bb)],'files':[{'type':a199_0x44d023(0x1d0),'path':'.trae/skills/lovrabet/SKILL.md','template':a199_0x44d023(0x1bf)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a199_0x44d023(0x1ce),'description':a199_0x44d023(0x1cd),'folders':['.agent'],'files':[{'type':'file','path':'.agent/skills/lovrabet/SKILL.md','template':a199_0x44d023(0x1bf)}]},'antigravity':{'name':a199_0x44d023(0x1d8),'description':a199_0x44d023(0x1cf),'folders':['.agent'],'files':[{'type':a199_0x44d023(0x1d0),'path':a199_0x44d023(0x1b8),'template':a199_0x44d023(0x1bf)}]}};export const CORE_IDE_LIST=[a199_0x44d023(0x1df),a199_0x44d023(0x1b1),a199_0x44d023(0x1d7),a199_0x44d023(0x1d3),a199_0x44d023(0x1af),a199_0x44d023(0x1e0),'qoder',a199_0x44d023(0x1be),a199_0x44d023(0x1b7)];export const IDE_LIST=[a199_0x44d023(0x1e3),'claude',a199_0x44d023(0x1b1),'codebuddy',a199_0x44d023(0x1d3),'cursor','opencode',a199_0x44d023(0x1d6),a199_0x44d023(0x1be),'windsurf',a199_0x44d023(0x1e4)];function a199_0x46f0(_0x11ffbf,_0x8624a8){_0x11ffbf=_0x11ffbf-0x1ab;const _0x38565f=a199_0x3856();let _0x46f02c=_0x38565f[_0x11ffbf];return _0x46f02c;}export const ALL_CORE_IDES=['cursor',a199_0x44d023(0x1b7),a199_0x44d023(0x1df),a199_0x44d023(0x1b1),a199_0x44d023(0x1d3),a199_0x44d023(0x1e0),'qoder','codebuddy','trae'];function a199_0x3856(){const _0x1f3286=['29284040gEeouF','1638wVmTDL','antigravity','agent','.codex','.cursor','CodeBuddy\x20IDE','Windsurf\x20IDE','cursor','.opencode/skills/lovrabet/SKILL.md','cline','.windsurf/workflows/rabetbase.md','21238ONjwxV','.codex/skills/lovrabet/SKILL.md','4630482vovQLg','172nvyZVd','windsurf','.agent/skills/lovrabet/SKILL.md','Cursor','35xSLBRs','.trae','.opencode','OpenCode','trae','SKILL.md.tpl','91628XfvLBe','.qoder','.claude','.cline/skills/lovrabet/SKILL.md','Codex\x20IDE','.cursor/skills/rabetbase.md','.cline','3986CATyVg','Codex','.codebuddy/skills/lovrabet/SKILL.md','.qoder/rules/rabetbase.md','Cline\x20IDE','Trae\x20IDE','通用模板\x20-\x20兜底方案','其他\x20(通用模板)','Antigravity\x20IDE','file','OpenCode\x20IDE','.claude/skills/lovrabet/SKILL.md','codex','CodeBuddy','Trae','qoder','codebuddy','Antigravity','Cursor\x20IDE','408150krgsga','5387560sTrzwR','Qoder','Claude\x20Code','.windsurf','claude','opencode'];a199_0x3856=function(){return _0x1f3286;};return a199_0x3856();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2a8699,_0x2ca1f3){const _0x31ccd3=a200_0x5cee,_0x5729f9=_0x2a8699();while(!![]){try{const _0x235a63=parseInt(_0x31ccd3(0x11b))/0x1*(parseInt(_0x31ccd3(0x11a))/0x2)+parseInt(_0x31ccd3(0x11c))/0x3+parseInt(_0x31ccd3(0x116))/0x4*(-parseInt(_0x31ccd3(0x115))/0x5)+parseInt(_0x31ccd3(0x11d))/0x6+-parseInt(_0x31ccd3(0x117))/0x7+parseInt(_0x31ccd3(0x11e))/0x8*(parseInt(_0x31ccd3(0x119))/0x9)+-parseInt(_0x31ccd3(0x118))/0xa;if(_0x235a63===_0x2ca1f3)break;else _0x5729f9['push'](_0x5729f9['shift']());}catch(_0x208d47){_0x5729f9['push'](_0x5729f9['shift']());}}}(a200_0x3c4b,0xf0ae4));function a200_0x5cee(_0x4e953e,_0x1f851d){_0x4e953e=_0x4e953e-0x115;const _0x3c4b26=a200_0x3c4b();let _0x5cee12=_0x3c4b26[_0x4e953e];return _0x5cee12;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a200_0x3c4b(){const _0x595050=['33938PDsxVS','4276149oTBuyY','3833628lOyQzg','2244304KRvhOc','5rYXNIK','770164fDsFzt','4169109UWJODn','16500830rgYkyI','36gXrRKm','14fUAqMm'];a200_0x3c4b=function(){return _0x595050;};return a200_0x3c4b();}
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x995d39,_0x3e7cf1){const _0x2cca43=a201_0x2113,_0x4d39b9=_0x995d39();while(!![]){try{const _0x5ea7b2=parseInt(_0x2cca43(0x9d))/0x1*(parseInt(_0x2cca43(0xa9))/0x2)+parseInt(_0x2cca43(0xaf))/0x3*(-parseInt(_0x2cca43(0xae))/0x4)+parseInt(_0x2cca43(0xa2))/0x5*(-parseInt(_0x2cca43(0xa6))/0x6)+-parseInt(_0x2cca43(0xa1))/0x7*(parseInt(_0x2cca43(0xa5))/0x8)+-parseInt(_0x2cca43(0xa8))/0x9+parseInt(_0x2cca43(0xaa))/0xa+parseInt(_0x2cca43(0xa0))/0xb;if(_0x5ea7b2===_0x3e7cf1)break;else _0x4d39b9['push'](_0x4d39b9['shift']());}catch(_0x107cfa){_0x4d39b9['push'](_0x4d39b9['shift']());}}}(a201_0x1c85,0x94287));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x320f05=a201_0x2113,_0x208623=getTemplateBaseUrl(),_0x343949=[_0x208623+_0x320f05(0xa7),_0x208623+_0x320f05(0xac)];for(const _0x1b0d2a of _0x343949){try{const _0x54bbad=await fetch(_0x1b0d2a,{'headers':{'Accept':'application/json'}});if(!_0x54bbad['ok'])continue;const _0x54c9f3=await _0x54bbad[_0x320f05(0xab)]();if(!_0x54c9f3[_0x320f05(0x9e)]?.[_0x320f05(0xad)]||!_0x54c9f3[_0x320f05(0xa3)]?.[_0x320f05(0xa4)]?.[_0x320f05(0xad)])continue;return _0x54c9f3;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x4646ca=a201_0x2113,_0xfae68=Date[_0x4646ca(0x9f)]();if(hasCachedConfig){const _0x342d9f=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0xfae68-cacheTime<_0x342d9f)return cachedConfig;}const _0x42804c=await fetchCdnConfig();return cachedConfig=_0x42804c,cacheTime=_0xfae68,hasCachedConfig=!![],_0x42804c;}function a201_0x1c85(){const _0xc8adce=['/config/index.json','stableVersion','1402012ABbQiB','3AHkKKO','388djAKGR','cli','now','22528022mqOfNO','595arFoNe','332945HRyIYC','sdk','node','53864ZUFnqf','78huQSnh','/config.json','8799993EQKSAu','5636INXAzR','2317110jUSJvz','json'];a201_0x1c85=function(){return _0xc8adce;};return a201_0x1c85();}function a201_0x2113(_0x21de9b,_0x2612cb){_0x21de9b=_0x21de9b-0x9d;const _0x1c856b=a201_0x1c85();let _0x21139e=_0x1c856b[_0x21de9b];return _0x21139e;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a202_0x5221a1=a202_0x1116;(function(_0xbc6dc7,_0x1473d4){const _0x23fe5a=a202_0x1116,_0x5f00b3=_0xbc6dc7();while(!![]){try{const _0x458ffc=-parseInt(_0x23fe5a(0x17e))/0x1+-parseInt(_0x23fe5a(0x173))/0x2*(-parseInt(_0x23fe5a(0x15f))/0x3)+parseInt(_0x23fe5a(0x180))/0x4*(parseInt(_0x23fe5a(0x17c))/0x5)+-parseInt(_0x23fe5a(0x184))/0x6*(-parseInt(_0x23fe5a(0x16f))/0x7)+-parseInt(_0x23fe5a(0x186))/0x8+parseInt(_0x23fe5a(0x168))/0x9*(parseInt(_0x23fe5a(0x179))/0xa)+-parseInt(_0x23fe5a(0x17f))/0xb*(-parseInt(_0x23fe5a(0x164))/0xc);if(_0x458ffc===_0x1473d4)break;else _0x5f00b3['push'](_0x5f00b3['shift']());}catch(_0x2ce167){_0x5f00b3['push'](_0x5f00b3['shift']());}}}(a202_0x3bdb,0x83b64));import a202_0x237889 from'node:fs';import a202_0x263ba4 from'node:path';import a202_0x333ba6 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';function a202_0x3bdb(){const _0x19069d=['latest','test','13599kMxxSA','\x20\x20\x20Stable\x20version:\x20','devDependencies','node_modules','some','utf8','parse','28UMOrQY','packageName','\x1b[1m','version','4gxJfeS','package.json','\x20\x20\x20Upgrade\x20command:\x20','log','\x20\x20\x20Current\x20version:\x20','↪\x20SDK\x20update\x20available','510JnkWJs','utf-8','join','5htcfWo','all','188446XhwgqA','8712mgHzLW','1329828XbDKgv','dependencies','coerce','node','19806oaAZDH','sdk','4856336ipoUyU','stableVersion','383535UhHmHA','needsUpgrade','1.2.0','existsSync','@lovrabet/sdk','9948NYjRbR','readFileSync'];a202_0x3bdb=function(){return _0x19069d;};return a202_0x3bdb();}const FALLBACK_MIN_SDK_VERSION=a202_0x5221a1(0x161);function isNonNumericVersion(_0x4a7ad0){const _0xa60422=a202_0x5221a1,_0xfeb4fd=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0xfeb4fd[_0xa60422(0x16c)](_0x285659=>_0x285659[_0xa60422(0x167)](_0x4a7ad0));}function getInstalledVersion(_0x23786f,_0x4441b9){const _0xfdf290=a202_0x5221a1;try{const _0x22cf5=a202_0x263ba4['join'](_0x23786f,_0xfdf290(0x16b),_0x4441b9,'package.json');if(a202_0x237889['existsSync'](_0x22cf5)){const _0x463d48=JSON['parse'](a202_0x237889[_0xfdf290(0x165)](_0x22cf5,_0xfdf290(0x17a)));return _0x463d48[_0xfdf290(0x172)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1c2942=a202_0x5221a1;try{const _0x5ab53c=await getCdnConfig();return _0x5ab53c?.[_0x1c2942(0x185)]?.[_0x1c2942(0x183)]?.[_0x1c2942(0x15e)]||null;}catch{return null;}}function a202_0x1116(_0x4955bb,_0xfafbca){_0x4955bb=_0x4955bb-0x15e;const _0x3bdb82=a202_0x3bdb();let _0x11163d=_0x3bdb82[_0x4955bb];return _0x11163d;}async function getSdkPackageName(){const _0x9f0133=a202_0x5221a1;try{const _0x686f4b=await getCdnConfig();return _0x686f4b?.[_0x9f0133(0x185)]?.[_0x9f0133(0x183)]?.[_0x9f0133(0x170)]||_0x9f0133(0x163);}catch{return _0x9f0133(0x163);}}export async function checkSdkVersion(_0x1bca75){const _0x4e6fd6=a202_0x5221a1,_0x32f7ee=a202_0x263ba4['join'](_0x1bca75,_0x4e6fd6(0x174)),[_0x220e5c,_0x3c4215]=await Promise[_0x4e6fd6(0x17d)]([getSdkStableVersion(),getSdkPackageName()]),_0x28c3ed=_0x220e5c||FALLBACK_MIN_SDK_VERSION;if(!a202_0x237889[_0x4e6fd6(0x162)](_0x32f7ee))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x28c3ed,'packageName':_0x3c4215,'stableVersion':_0x220e5c};try{const _0x1c44ba=JSON[_0x4e6fd6(0x16e)](a202_0x237889[_0x4e6fd6(0x165)](_0x32f7ee,_0x4e6fd6(0x16d))),_0x976a6a=_0x1c44ba[_0x4e6fd6(0x181)]||{},_0x48f55f=_0x1c44ba[_0x4e6fd6(0x16a)]||{},_0x470339=_0x976a6a[_0x3c4215]||_0x48f55f[_0x3c4215];if(!_0x470339)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x28c3ed,'packageName':_0x3c4215,'stableVersion':_0x220e5c};let _0xdbdb53=getInstalledVersion(_0x1bca75,_0x3c4215);!_0xdbdb53&&(_0xdbdb53=_0x470339);if(isNonNumericVersion(_0x470339))return{'installed':!![],'version':_0xdbdb53,'needsUpgrade':![],'minVersion':_0x28c3ed,'packageName':_0x3c4215,'stableVersion':_0x220e5c};const _0x41ef54=a202_0x333ba6[_0x4e6fd6(0x182)](_0xdbdb53),_0x38afd9=a202_0x333ba6[_0x4e6fd6(0x182)](_0x28c3ed),_0x32e676=_0x41ef54&&_0x38afd9?a202_0x333ba6['lt'](_0x41ef54,_0x38afd9):![];return{'installed':!![],'version':_0xdbdb53,'needsUpgrade':_0x32e676,'minVersion':_0x28c3ed,'packageName':_0x3c4215,'stableVersion':_0x220e5c};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x28c3ed,'packageName':_0x3c4215,'stableVersion':_0x220e5c};}}export function checkSdkVersionSync(_0x32b9c6){const _0x4bd7b2=a202_0x5221a1,_0x5c9574=a202_0x263ba4[_0x4bd7b2(0x17b)](_0x32b9c6,_0x4bd7b2(0x174)),_0x32ca44=_0x4bd7b2(0x163);if(!a202_0x237889[_0x4bd7b2(0x162)](_0x5c9574))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x32ca44,'stableVersion':null};try{const _0x3c19a0=JSON['parse'](a202_0x237889[_0x4bd7b2(0x165)](_0x5c9574,_0x4bd7b2(0x16d))),_0xcb5bb7=_0x3c19a0[_0x4bd7b2(0x181)]||{},_0x34ae1f=_0x3c19a0[_0x4bd7b2(0x16a)]||{},_0x115997=_0xcb5bb7[_0x32ca44]||_0x34ae1f[_0x32ca44];if(!_0x115997)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x32ca44,'stableVersion':null};let _0x1376e3=getInstalledVersion(_0x32b9c6,_0x32ca44);!_0x1376e3&&(_0x1376e3=_0x115997);if(isNonNumericVersion(_0x115997))return{'installed':!![],'version':_0x1376e3,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x32ca44,'stableVersion':null};const _0x5f0f25=a202_0x333ba6[_0x4bd7b2(0x182)](_0x1376e3),_0x6673f9=_0x5f0f25?a202_0x333ba6['lt'](_0x5f0f25,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1376e3,'needsUpgrade':_0x6673f9,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x32ca44,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x32ca44,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x56c8a0){const _0x5a9d47=a202_0x5221a1;if(!_0x56c8a0[_0x5a9d47(0x160)])return;const _0x16f956='\x1b[33m',_0x5aab6d='\x1b[0m',_0x1d22ad=_0x5a9d47(0x171),_0x5f284e=_0x56c8a0['packageName']||'@lovrabet/sdk',_0x38ade3=_0x56c8a0[_0x5a9d47(0x15e)]||_0x56c8a0['minVersion'],_0x1106c5='npm\x20install\x20'+_0x5f284e+'@'+(_0x38ade3||_0x5a9d47(0x166));console[_0x5a9d47(0x176)](),console['log'](''+_0x16f956+_0x1d22ad+_0x5a9d47(0x178)+_0x5aab6d),console[_0x5a9d47(0x176)](_0x16f956+_0x5a9d47(0x177)+_0x5f284e+'@'+_0x56c8a0[_0x5a9d47(0x172)]+_0x5aab6d),console[_0x5a9d47(0x176)](_0x16f956+_0x5a9d47(0x169)+_0x38ade3+_0x5aab6d),console['log'](_0x16f956+_0x5a9d47(0x175)+_0x1106c5+_0x5aab6d),console[_0x5a9d47(0x176)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34d1f5,_0x53b332){const _0x2e5adb=a203_0x353e,_0x1ae3ce=_0x34d1f5();while(!![]){try{const _0x2cf7d8=-parseInt(_0x2e5adb(0x1d8))/0x1*(-parseInt(_0x2e5adb(0x1f5))/0x2)+-parseInt(_0x2e5adb(0x1d0))/0x3*(-parseInt(_0x2e5adb(0x1f8))/0x4)+-parseInt(_0x2e5adb(0x1ec))/0x5*(parseInt(_0x2e5adb(0x1da))/0x6)+parseInt(_0x2e5adb(0x1e6))/0x7+-parseInt(_0x2e5adb(0x1de))/0x8+parseInt(_0x2e5adb(0x1ed))/0x9*(parseInt(_0x2e5adb(0x1dc))/0xa)+parseInt(_0x2e5adb(0x1ef))/0xb*(-parseInt(_0x2e5adb(0x1e1))/0xc);if(_0x2cf7d8===_0x53b332)break;else _0x1ae3ce['push'](_0x1ae3ce['shift']());}catch(_0x7893fb){_0x1ae3ce['push'](_0x1ae3ce['shift']());}}}(a203_0x1c7e,0x7e4c2));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a203_0x2259e1 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a203_0x1c7e(){const _0x20a032=['\x1b[0m','version','needsUpgrade','upgradeMessage','2837105fwsQrs','1161NLxdBx','belowMinimum','966845nmdOtZ','\x1b[1m','log','npm\x20install\x20-g\x20','filter','utf-8','22Oazykq','Minimum\x20supported:\x20','\x20\x20\x20Upgrade\x20command:\x20','4Mrposq','2800929iTmoSV','\x20\x20\x20Stable\x20version:\x20','\x20\x20\x20','join','parse','\x1b[33m','stableVersion','coerce','25762TaRtXd','package.json','6DCqEol','1.0.0','38050ugjixw','Current\x20version:\x20','6155640fXLHQU','↪\x20Critical\x20CLI\x20upgrade\x20required','currentVersion','24vomiNA','minimumVersionMessage','↪\x20New\x20version\x20available','minimumVersion','\x20\x20\x20Current\x20CLI\x20version:\x20','2254770zJcMic','\x20\x20\x20Recommended\x20stable:\x20'];a203_0x1c7e=function(){return _0x20a032;};return a203_0x1c7e();}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x367087){const _0x286a14=a203_0x353e,_0x40598c=_0x367087[_0x286a14(0x1d6)]||'latest';return _0x286a14(0x1f2)+NPM_PACKAGE_NAME+'@'+_0x40598c;}function a203_0x353e(_0x2a5b93,_0x4ec064){_0x2a5b93=_0x2a5b93-0x1d0;const _0x1c7e6a=a203_0x1c7e();let _0x353ec7=_0x1c7e6a[_0x2a5b93];return _0x353ec7;}function getCurrentCliVersion(){const _0x2c5c30=a203_0x353e;try{const _0x1476ae=fileURLToPath(import.meta.url),_0x584432=resolve(dirname(_0x1476ae),'../..'),_0x211bfa=resolve(_0x584432,_0x2c5c30(0x1d9)),_0x43b123=JSON[_0x2c5c30(0x1d4)](readFileSync(_0x211bfa,_0x2c5c30(0x1f4)));return _0x43b123[_0x2c5c30(0x1e9)]||_0x2c5c30(0x1db);}catch{return _0x2c5c30(0x1db);}}export async function checkCliVersion(){const _0x420c23=a203_0x353e,_0x2b704f=getCurrentCliVersion(),_0x4836af=await getCliVersionPolicy(),_0xe8fc0c=_0x4836af?.[_0x420c23(0x1d6)]||null,_0x223a07=_0x4836af?.[_0x420c23(0x1e4)]||null;let _0x5b06f5=![],_0x55097f=![];const _0x2818e3=a203_0x2259e1[_0x420c23(0x1d7)](_0x2b704f);if(_0x2818e3&&_0xe8fc0c)try{const _0x20cdf5=a203_0x2259e1['coerce'](_0xe8fc0c);if(_0x20cdf5)_0x5b06f5=a203_0x2259e1['lt'](_0x2818e3,_0x20cdf5);}catch{}if(_0x2818e3&&_0x223a07)try{const _0x1c174f=a203_0x2259e1[_0x420c23(0x1d7)](_0x223a07);if(_0x1c174f)_0x55097f=a203_0x2259e1['lt'](_0x2818e3,_0x1c174f);}catch{}return _0x55097f&&(_0x5b06f5=!![]),{'currentVersion':_0x2b704f,'stableVersion':_0xe8fc0c,'minimumVersion':_0x223a07,'needsUpgrade':_0x5b06f5,'belowMinimum':_0x55097f,'isPreRelease':![],'upgradeMessage':_0x4836af?.[_0x420c23(0x1eb)],'minimumVersionMessage':_0x4836af?.[_0x420c23(0x1e2)]};}export function printCliUpgradeWarning(_0x5bd3f2){const _0x3adb3f=a203_0x353e;if(!_0x5bd3f2[_0x3adb3f(0x1ea)]&&!_0x5bd3f2[_0x3adb3f(0x1ee)])return;const _0x43cb83='\x1b[31m',_0x4057a6=_0x3adb3f(0x1d5),_0x1687ee=_0x3adb3f(0x1e8),_0x23fa79=_0x3adb3f(0x1f0),_0x4be4df=getCliUpgradeCommand(_0x5bd3f2);console[_0x3adb3f(0x1f1)](),_0x5bd3f2['belowMinimum']?(console[_0x3adb3f(0x1f1)](''+_0x43cb83+_0x23fa79+_0x3adb3f(0x1df)+_0x1687ee),console[_0x3adb3f(0x1f1)](_0x43cb83+_0x3adb3f(0x1e5)+_0x5bd3f2[_0x3adb3f(0x1e0)]+_0x1687ee),_0x5bd3f2['minimumVersion']&&console[_0x3adb3f(0x1f1)](_0x43cb83+'\x20\x20\x20Minimum\x20supported:\x20'+_0x5bd3f2['minimumVersion']+_0x1687ee),_0x5bd3f2[_0x3adb3f(0x1d6)]&&_0x5bd3f2[_0x3adb3f(0x1d6)]!==_0x5bd3f2[_0x3adb3f(0x1e4)]&&console['log'](_0x43cb83+_0x3adb3f(0x1e7)+_0x5bd3f2[_0x3adb3f(0x1d6)]+_0x1687ee),_0x5bd3f2[_0x3adb3f(0x1e2)]&&console[_0x3adb3f(0x1f1)](_0x43cb83+_0x3adb3f(0x1d2)+_0x5bd3f2[_0x3adb3f(0x1e2)]+_0x1687ee),console[_0x3adb3f(0x1f1)](_0x43cb83+_0x3adb3f(0x1f7)+_0x4be4df+_0x1687ee)):(console[_0x3adb3f(0x1f1)](''+_0x4057a6+_0x23fa79+_0x3adb3f(0x1e3)+_0x1687ee),console[_0x3adb3f(0x1f1)](_0x4057a6+_0x3adb3f(0x1e5)+_0x5bd3f2[_0x3adb3f(0x1e0)]+_0x1687ee),console[_0x3adb3f(0x1f1)](_0x4057a6+_0x3adb3f(0x1d1)+_0x5bd3f2['stableVersion']+_0x1687ee),_0x5bd3f2['upgradeMessage']&&console[_0x3adb3f(0x1f1)](_0x4057a6+_0x3adb3f(0x1d2)+_0x5bd3f2['upgradeMessage']+_0x1687ee),console[_0x3adb3f(0x1f1)](_0x4057a6+'\x20\x20\x20Upgrade\x20command:\x20'+_0x4be4df+_0x1687ee)),console['log']();}export function assertCliVersionSupported(_0x573305){const _0x117c2b=a203_0x353e;if(!_0x573305[_0x117c2b(0x1ee)])return;const _0x4965b9=[_0x573305[_0x117c2b(0x1e2)],_0x117c2b(0x1dd)+_0x573305[_0x117c2b(0x1e0)],_0x573305[_0x117c2b(0x1e4)]?_0x117c2b(0x1f6)+_0x573305['minimumVersion']:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x573305)][_0x117c2b(0x1f3)](Boolean)[_0x117c2b(0x1d3)]('\x0a');throw CliErrors['validation']('Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.',_0x4965b9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x533318,_0x54691a){const _0x81486f=a204_0x43f8,_0x221951=_0x533318();while(!![]){try{const _0x1d5838=parseInt(_0x81486f(0x152))/0x1+parseInt(_0x81486f(0x159))/0x2*(-parseInt(_0x81486f(0x15f))/0x3)+parseInt(_0x81486f(0x15c))/0x4*(-parseInt(_0x81486f(0x168))/0x5)+parseInt(_0x81486f(0x151))/0x6+-parseInt(_0x81486f(0x15a))/0x7*(parseInt(_0x81486f(0x164))/0x8)+parseInt(_0x81486f(0x163))/0x9+-parseInt(_0x81486f(0x167))/0xa*(-parseInt(_0x81486f(0x162))/0xb);if(_0x1d5838===_0x54691a)break;else _0x221951['push'](_0x221951['shift']());}catch(_0x592bae){_0x221951['push'](_0x221951['shift']());}}}(a204_0x3e37,0x3042c));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x4fad56){const _0x20e97c=a204_0x43f8;return typeof _0x4fad56===_0x20e97c(0x153)&&_0x4fad56['trim']()[_0x20e97c(0x161)]>0x0?_0x4fad56[_0x20e97c(0x166)]():null;}function normalizeCliVersionPolicy(_0x1e096b){const _0x16fd23=a204_0x43f8;if(!_0x1e096b||typeof _0x1e096b!=='object')return null;const _0x2a9755=_0x1e096b,_0x457920=_0x2a9755[_0x16fd23(0x165)]&&typeof _0x2a9755['cli']==='object'?_0x2a9755[_0x16fd23(0x165)]:_0x2a9755,_0xc5cc98=pickString(_0x457920[_0x16fd23(0x157)])||pickString(_0x457920[_0x16fd23(0x15d)])||pickString(_0x457920[_0x16fd23(0x155)]),_0x19380e=pickString(_0x457920['minimumVersion'])||pickString(_0x457920[_0x16fd23(0x160)]);if(!_0xc5cc98&&!_0x19380e)return null;return{'stableVersion':_0xc5cc98,'minimumVersion':_0x19380e,'upgradeMessage':pickString(_0x457920[_0x16fd23(0x156)])||undefined,'minimumVersionMessage':pickString(_0x457920[_0x16fd23(0x158)])||undefined};}export async function fetchCliVersionPolicy(){const _0x1663bd=a204_0x43f8,_0x3c8764=new AbortController(),_0x5c786b=setTimeout(()=>_0x3c8764[_0x1663bd(0x15b)](),FETCH_TIMEOUT_MS);try{const _0x5bf5bf=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x1663bd(0x154)},'signal':_0x3c8764['signal']});if(!_0x5bf5bf['ok'])return null;const _0x64892b=await _0x5bf5bf[_0x1663bd(0x15e)]();return normalizeCliVersionPolicy(_0x64892b);}catch{return null;}finally{clearTimeout(_0x5c786b);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];function a204_0x43f8(_0x2cd59,_0x5dff2d){_0x2cd59=_0x2cd59-0x151;const _0x3e37de=a204_0x3e37();let _0x43f871=_0x3e37de[_0x2cd59];return _0x43f871;}function a204_0x3e37(){const _0x2cda10=['minimumVersionMessage','2TRnybU','1635599FaRXlB','abort','16QwrJhf','latestVersion','json','485697VFYxZk','minVersion','length','3163809AYwalf','2667654AFRRVq','8uhKldc','cli','trim','10SUQbXN','351460TcBoTf','926460HPmDje','135965HfuInW','string','application/json','recommendedVersion','upgradeMessage','stableVersion'];a204_0x3e37=function(){return _0x2cda10;};return a204_0x3e37();}export async function getCliVersionPolicy(){const _0x465c32=Date['now']();if(hasCachedPolicy){const _0x5756e0=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x465c32-cacheTime<_0x5756e0)return cachedPolicy;}const _0x4b1ccb=await fetchCliVersionPolicy();return cachedPolicy=_0x4b1ccb,cacheTime=_0x465c32,hasCachedPolicy=!![],_0x4b1ccb;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a205_0x2580a3=a205_0x458e;(function(_0x49f460,_0x1b8910){const _0x23b12e=a205_0x458e,_0x400bea=_0x49f460();while(!![]){try{const _0x264dff=-parseInt(_0x23b12e(0x72))/0x1+parseInt(_0x23b12e(0x69))/0x2+-parseInt(_0x23b12e(0x66))/0x3*(-parseInt(_0x23b12e(0x6a))/0x4)+-parseInt(_0x23b12e(0x6c))/0x5+parseInt(_0x23b12e(0x6d))/0x6*(parseInt(_0x23b12e(0x68))/0x7)+parseInt(_0x23b12e(0x6e))/0x8+parseInt(_0x23b12e(0x70))/0x9*(-parseInt(_0x23b12e(0x71))/0xa);if(_0x264dff===_0x1b8910)break;else _0x400bea['push'](_0x400bea['shift']());}catch(_0x4890fe){_0x400bea['push'](_0x400bea['shift']());}}}(a205_0x4d5f,0x9c856));import{initEnv}from'../constant/env.js';function a205_0x458e(_0x592d92,_0x46f796){_0x592d92=_0x592d92-0x66;const _0x4d5ff8=a205_0x4d5f();let _0x458eeb=_0x4d5ff8[_0x592d92];return _0x458eeb;}import{readRawConfig,getConfigAppCode as a205_0x2ff11d,getMultiAppConfigs as a205_0x30d6b4,getTemplateBaseUrl as a205_0xd7f540}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x1c2421){const _0x996ee7=a205_0x458e,_0x2af68e=readRawConfig(_0x1c2421);return _0x2af68e['env']&&typeof _0x2af68e[_0x996ee7(0x6f)]===_0x996ee7(0x6b)&&initEnv(_0x2af68e[_0x996ee7(0x6f)]),_0x2af68e;}export function getConfigAppCode(){return a205_0x2ff11d();}function a205_0x4d5f(){const _0x52d393=['27517dhBxVd','2235700KeZZIF','312888HeePOA','string','4253355KiOkmC','474LuciKx','1168464rChTeZ','env','459guRJZq','33500ZCMKEK','68270ZVAfsK','6aLopSH','project'];a205_0x4d5f=function(){return _0x52d393;};return a205_0x4d5f();}export function getMultiAppConfigs(_0x2fd936=a205_0x2580a3(0x67)){return a205_0x30d6b4(_0x2fd936);}export function getTemplateBaseUrl(){return a205_0xd7f540();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3147ef,_0x206e81){const _0x259205=a206_0xcf21,_0x2741c2=_0x3147ef();while(!![]){try{const _0x2d5ecf=parseInt(_0x259205(0x164))/0x1*(parseInt(_0x259205(0x166))/0x2)+-parseInt(_0x259205(0x16c))/0x3+-parseInt(_0x259205(0x161))/0x4*(parseInt(_0x259205(0x165))/0x5)+-parseInt(_0x259205(0x170))/0x6+parseInt(_0x259205(0x163))/0x7*(-parseInt(_0x259205(0x167))/0x8)+-parseInt(_0x259205(0x162))/0x9+parseInt(_0x259205(0x168))/0xa*(parseInt(_0x259205(0x16d))/0xb);if(_0x2d5ecf===_0x206e81)break;else _0x2741c2['push'](_0x2741c2['shift']());}catch(_0x57d6b7){_0x2741c2['push'](_0x2741c2['shift']());}}}(a206_0xe562,0x85dc6));function a206_0xe562(){const _0x62f4f=['1059352zTniMz','83120ydOCwA','name','error','readdirSync','2913408SVqEfc','3729FBgmet','join','copyFileSync','1442754GWMCAR','20bTnjit','2105217kaTRgV','14ZVaBLt','19157YXwQHC','578285LQujcf','2awbjQJ'];a206_0xe562=function(){return _0x62f4f;};return a206_0xe562();}import a206_0xbf399 from'node:path';function a206_0xcf21(_0x25425b,_0x280104){_0x25425b=_0x25425b-0x161;const _0xe562f8=a206_0xe562();let _0xcf21d7=_0xe562f8[_0x25425b];return _0xcf21d7;}import a206_0x3a3a17 from'node:fs';export async function copyDirectory(_0x2511ec,_0x28a880){const _0x353301=a206_0xcf21;try{const _0x109161=a206_0x3a3a17[_0x353301(0x16b)](_0x2511ec,{'withFileTypes':!![]});a206_0x3a3a17['mkdirSync'](_0x28a880,{'recursive':!![]});for(const _0x14142c of _0x109161){const _0x139be3=a206_0xbf399[_0x353301(0x16e)](_0x2511ec,_0x14142c[_0x353301(0x169)]),_0x5f148=a206_0xbf399[_0x353301(0x16e)](_0x28a880,_0x14142c['name']);_0x14142c['isDirectory']()?await copyDirectory(_0x139be3,_0x5f148):a206_0x3a3a17[_0x353301(0x16f)](_0x139be3,_0x5f148);}}catch(_0x585773){console[_0x353301(0x16a)]('复制目录时出错:',_0x585773);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x520120,_0x3eef1f){const _0x569a7d=a207_0x5ba7,_0x42d019=_0x520120();while(!![]){try{const _0x18e37e=-parseInt(_0x569a7d(0x1e4))/0x1*(-parseInt(_0x569a7d(0x1ea))/0x2)+parseInt(_0x569a7d(0x1ee))/0x3*(parseInt(_0x569a7d(0x1e3))/0x4)+parseInt(_0x569a7d(0x1ef))/0x5+-parseInt(_0x569a7d(0x1ed))/0x6*(parseInt(_0x569a7d(0x1e8))/0x7)+parseInt(_0x569a7d(0x1e2))/0x8+parseInt(_0x569a7d(0x1e9))/0x9+parseInt(_0x569a7d(0x1e1))/0xa*(-parseInt(_0x569a7d(0x1f0))/0xb);if(_0x18e37e===_0x3eef1f)break;else _0x42d019['push'](_0x42d019['shift']());}catch(_0x42c6d4){_0x42d019['push'](_0x42d019['shift']());}}}(a207_0x535a,0x2ca13));function a207_0x5ba7(_0x464e33,_0x39ad21){_0x464e33=_0x464e33-0x1e1;const _0x535a9c=a207_0x535a();let _0x5ba7a2=_0x535a9c[_0x464e33];return _0x5ba7a2;}function toFiniteNumber(_0x254445){const _0x2fcb2f=a207_0x5ba7;if(typeof _0x254445===_0x2fcb2f(0x1ec)&&Number[_0x2fcb2f(0x1eb)](_0x254445))return _0x254445;if(typeof _0x254445===_0x2fcb2f(0x1e7)){const _0x4debf4=_0x254445[_0x2fcb2f(0x1e6)]();if(!_0x4debf4)return undefined;const _0x88a48b=Number(_0x4debf4);if(Number[_0x2fcb2f(0x1eb)](_0x88a48b))return _0x88a48b;}return undefined;}function a207_0x535a(){const _0x54432d=['string','7kPSpzi','3121902MwcCAK','90378mWHYAd','isFinite','number','1631046aukLvX','46887nqlome','1670175yZdgNH','7224173OeKEOF','10exSBWt','2457120sRumXD','20eTWezX','1QYXcfr','object','trim'];a207_0x535a=function(){return _0x54432d;};return a207_0x535a();}export function normalizeEntityWithIdResponse(_0x24c72f){const _0x2c299b=a207_0x5ba7,_0x48648a=toFiniteNumber(_0x24c72f);if(_0x48648a!==undefined)return{'id':_0x48648a,'entity':{'id':_0x48648a}};if(!_0x24c72f||typeof _0x24c72f!==_0x2c299b(0x1e5))return{'id':undefined,'entity':{}};const _0x29fcf0={..._0x24c72f},_0x1160e4=toFiniteNumber(_0x29fcf0['id']);return _0x1160e4!==undefined&&(_0x29fcf0['id']=_0x1160e4),{'id':_0x1160e4,'entity':_0x29fcf0};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x304b52,_0x4b6783){const _0x348310=a208_0x2617,_0x1c31d5=_0x304b52();while(!![]){try{const _0x551be3=parseInt(_0x348310(0x117))/0x1+parseInt(_0x348310(0x11c))/0x2+parseInt(_0x348310(0x119))/0x3+parseInt(_0x348310(0x11a))/0x4+-parseInt(_0x348310(0x11e))/0x5+-parseInt(_0x348310(0x116))/0x6*(parseInt(_0x348310(0x115))/0x7)+-parseInt(_0x348310(0x118))/0x8*(-parseInt(_0x348310(0x11b))/0x9);if(_0x551be3===_0x4b6783)break;else _0x1c31d5['push'](_0x1c31d5['shift']());}catch(_0x103a70){_0x1c31d5['push'](_0x1c31d5['shift']());}}}(a208_0xe2a8,0x56f3d));function a208_0xe2a8(){const _0x36b1d5=['798evUWGs','151452ixhrWU','33016KAGiOh','1649196EtuTdN','1559344XyIWJy','18gHsObt','399296niCdpv','isDirectory','3106520PlWYlV','16919ztNmTo'];a208_0xe2a8=function(){return _0x36b1d5;};return a208_0xe2a8();}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a208_0x2617(_0xd338de,_0x36d474){_0xd338de=_0xd338de-0x115;const _0xe2a801=a208_0xe2a8();let _0x2617c1=_0xe2a801[_0xd338de];return _0x2617c1;}import{join}from'node:path';export async function copyDir(_0x588ed1,_0x21b412){const _0x4f9a7b=a208_0x2617,_0x51a185=statSync(_0x588ed1);if(_0x51a185[_0x4f9a7b(0x11d)]()){!existsSync(_0x21b412)&&mkdirSync(_0x21b412,{'recursive':!![]});const _0x4aaccc=readdirSync(_0x588ed1);for(const _0x59448a of _0x4aaccc){await copyDir(join(_0x588ed1,_0x59448a),join(_0x21b412,_0x59448a));}}else copyFileSync(_0x588ed1,_0x21b412);}export function ensureDir(_0x2b821c){!existsSync(_0x2b821c)&&mkdirSync(_0x2b821c,{'recursive':!![]});}export function pathExists(_0x3c1950){return existsSync(_0x3c1950);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a209_0x3f2e(_0x58ccbc,_0x197b72){_0x58ccbc=_0x58ccbc-0x187;const _0x354b3f=a209_0x354b();let _0x3f2e7d=_0x354b3f[_0x58ccbc];return _0x3f2e7d;}const a209_0x949a09=a209_0x3f2e;(function(_0x2ccb3d,_0x4203f6){const _0x2c5567=a209_0x3f2e,_0x198c2c=_0x2ccb3d();while(!![]){try{const _0x2ff956=parseInt(_0x2c5567(0x1a1))/0x1+parseInt(_0x2c5567(0x197))/0x2*(parseInt(_0x2c5567(0x1aa))/0x3)+parseInt(_0x2c5567(0x192))/0x4*(-parseInt(_0x2c5567(0x18e))/0x5)+parseInt(_0x2c5567(0x19d))/0x6+-parseInt(_0x2c5567(0x18f))/0x7*(parseInt(_0x2c5567(0x1a3))/0x8)+parseInt(_0x2c5567(0x188))/0x9+-parseInt(_0x2c5567(0x199))/0xa;if(_0x2ff956===_0x4203f6)break;else _0x198c2c['push'](_0x198c2c['shift']());}catch(_0x36d480){_0x198c2c['push'](_0x198c2c['shift']());}}}(a209_0x354b,0x72b86));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x15dfc8=a209_0x3f2e,_0x1c7d46=getTemplateBaseUrl();return _0x1c7d46+_0x15dfc8(0x195);}const CACHE_DIR=join(homedir(),a209_0x949a09(0x1a0),a209_0x949a09(0x1a7));export async function fetchGuidesFromCDN(){const _0x574935=a209_0x949a09,_0x14473c=getGuidesCdnUrl(),_0x45cdbc=await fetch(_0x14473c,{'headers':{'Accept':'application/json'}});if(!_0x45cdbc['ok'])throw new Error(_0x574935(0x190)+_0x45cdbc['status']+'\x20'+_0x45cdbc[_0x574935(0x19f)]);const _0x2d071b=await _0x45cdbc[_0x574935(0x19c)]();if(!_0x2d071b[_0x574935(0x19b)]||typeof _0x2d071b[_0x574935(0x19b)]!==_0x574935(0x191))throw new Error(_0x574935(0x18c));return _0x2d071b;}export function writeGuidesToProject(_0x3dc1ee,_0x4a20e4,_0x17e4e8=a209_0x949a09(0x189),_0x47c864){const _0x545812=a209_0x949a09,_0x3299f3=join(_0x4a20e4,_0x17e4e8);mkdirSync(_0x3299f3,{'recursive':!![]});for(const [_0x30f09f,_0x1db583]of Object[_0x545812(0x1a8)](_0x3dc1ee[_0x545812(0x19b)])){let _0xc420b6=_0x1db583[_0x545812(0x1a9)];_0x1db583[_0x545812(0x18d)]&&(_0xc420b6=appendUpdateTime(_0xc420b6,_0x1db583[_0x545812(0x18d)])),writeFileSync(join(_0x3299f3,_0x30f09f+'.md'),_0xc420b6,_0x545812(0x193));}}export function appendUpdateTime(_0x4b015e,_0x3e80c3){const _0x13f1bf=a209_0x949a09;return _0x4b015e=_0x4b015e[_0x13f1bf(0x18b)](/\n*>更新时间:.*$/m,''),_0x4b015e[_0x13f1bf(0x187)]()+(_0x13f1bf(0x1a4)+_0x3e80c3);}export function getSkillTemplate(_0x4e88ae){return _0x4e88ae['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x1381c6,_0x15deda,_0x5b0a7d){const _0xf175d6=a209_0x949a09,_0x3f693d=[];for(const [,_0x102337]of Object[_0xf175d6(0x1a8)](_0x15deda[_0xf175d6(0x19b)])){_0x102337[_0xf175d6(0x1a2)]&&_0x3f693d[_0xf175d6(0x1a5)](_0x102337[_0xf175d6(0x1a2)][_0xf175d6(0x187)]());}if(_0x3f693d['length']===0x0)return _0x1381c6;return _0x1381c6[_0xf175d6(0x187)]()+'\x0a\x0a'+_0x3f693d[_0xf175d6(0x18a)]('\x0a\x0a')+'\x0a';}function a209_0x354b(){const _0x59e5b2=['json','2867052bHIOxf','length','statusText','.lovrabet','457161INOziQ','extendContent','8JiRyjL','\x0a\x0a>更新时间:','push','title','cache','entries','content','3OIiKzV','CDN\x20数据中缺少\x20skillTemplate','trimEnd','8202474qVwsxT','.lovrabet/skill/guides','join','replace','CDN\x20返回数据格式错误','lastUpdated','2525455iZmjMI','325724hYJxOM','CDN\x20请求失败:\x20','object','4xasCYI','utf-8','skillTemplate','/skills/guides.json','path','570476VsRsse','keys','11101100ASaXpG','map','guides'];a209_0x354b=function(){return _0x59e5b2;};return a209_0x354b();}export function writeSkillFile(_0x18955e,_0xd33837,_0x384f10){const _0x49a437=a209_0x949a09,_0x20fe5e=getSkillTemplate(_0x18955e);if(!_0x20fe5e)throw new Error(_0x49a437(0x1ab));const _0x2c7b9d=dirname(_0xd33837);mkdirSync(_0x2c7b9d,{'recursive':!![]});let _0x108ab8=_0x20fe5e['replace'](/\{\{IDE_NAME\}\}/g,_0x384f10);_0x108ab8=appendExtendContents(_0x108ab8,_0x18955e),_0x18955e[_0x49a437(0x194)][_0x49a437(0x18d)]&&(_0x108ab8=appendUpdateTime(_0x108ab8,_0x18955e['skillTemplate']['lastUpdated'])),writeFileSync(_0xd33837,_0x108ab8,'utf-8');}export async function installGuides(_0x2c2069){const _0x2d3694=a209_0x949a09,_0x420b60=await fetchGuidesFromCDN();return writeGuidesToProject(_0x420b60,_0x2c2069),Object[_0x2d3694(0x198)](_0x420b60[_0x2d3694(0x19b)])[_0x2d3694(0x19e)];}export function getGuidesSummary(_0x5d6420){const _0x37ff0e=a209_0x949a09;return Object['entries'](_0x5d6420['guides'])[_0x37ff0e(0x19a)](([_0x5b5198,_0x2b8c31])=>({'key':_0x5b5198,'title':_0x2b8c31[_0x37ff0e(0x1a6)],'path':_0x2b8c31[_0x37ff0e(0x196)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x216148,_0x2bc519){const _0x5b3109=a210_0x4473,_0x68f624=_0x216148();while(!![]){try{const _0x3cc4c5=parseInt(_0x5b3109(0x1c1))/0x1+parseInt(_0x5b3109(0x1bb))/0x2*(-parseInt(_0x5b3109(0x1c7))/0x3)+-parseInt(_0x5b3109(0x1b8))/0x4+parseInt(_0x5b3109(0x1b7))/0x5*(parseInt(_0x5b3109(0x1cf))/0x6)+-parseInt(_0x5b3109(0x1c9))/0x7+parseInt(_0x5b3109(0x1c5))/0x8*(parseInt(_0x5b3109(0x1c0))/0x9)+parseInt(_0x5b3109(0x1bc))/0xa;if(_0x3cc4c5===_0x2bc519)break;else _0x68f624['push'](_0x68f624['shift']());}catch(_0x137ee6){_0x68f624['push'](_0x68f624['shift']());}}}(a210_0x4578,0x991b4));export async function httpRequest(_0x21bcd2,_0x2dfc25={}){const _0x1424a6=a210_0x4473,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x2dfc25;let _0x26a8e1=null;for(let _0x543eb1=0x0;_0x543eb1<=retries;_0x543eb1++){try{const _0x3531b7=new AbortController(),_0x4c27e8=setTimeout(()=>_0x3531b7[_0x1424a6(0x1c6)](),timeout),_0x5d5655=await fetch(_0x21bcd2,{'headers':headers,'signal':_0x3531b7[_0x1424a6(0x1cd)]});clearTimeout(_0x4c27e8);let _0x3c47dc;const _0x41b9f7=_0x5d5655[_0x1424a6(0x1bd)]['get'](_0x1424a6(0x1c3));return _0x41b9f7?.[_0x1424a6(0x1c8)]('application/json')?_0x3c47dc=await _0x5d5655[_0x1424a6(0x1cb)]():_0x3c47dc=await _0x5d5655['text'](),{'ok':_0x5d5655['ok'],'status':_0x5d5655['status'],'statusText':_0x5d5655[_0x1424a6(0x1c4)],'data':_0x3c47dc,'headers':_0x5d5655['headers'],'url':_0x5d5655['url'],'text':()=>_0x5d5655[_0x1424a6(0x1be)]()};}catch(_0x1f3347){_0x26a8e1=_0x1f3347 instanceof Error?_0x1f3347:new Error(String(_0x1f3347));if(_0x543eb1===retries)break;if(shouldRetry(_0x1f3347)){console[_0x1424a6(0x1c2)](_0x1424a6(0x1ce)+retryDelay+'ms\x20后进行第\x20'+(_0x543eb1+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x26a8e1||new Error(_0x1424a6(0x1ca));}function shouldRetry(_0x2ff76e){const _0xcc69f5=a210_0x4473;if(_0x2ff76e instanceof Error){if(_0x2ff76e[_0xcc69f5(0x1cc)]===_0xcc69f5(0x1b9))return![];if(_0x2ff76e[_0xcc69f5(0x1cc)]==='TypeError'&&_0x2ff76e['message'][_0xcc69f5(0x1c8)](_0xcc69f5(0x1ba)))return!![];if(_0x2ff76e[_0xcc69f5(0x1bf)][_0xcc69f5(0x1c8)]('ECONNRESET'))return!![];if(_0x2ff76e[_0xcc69f5(0x1bf)]['includes']('ENOTFOUND'))return![];}return![];}function a210_0x4473(_0x360fe4,_0xde450d){_0x360fe4=_0x360fe4-0x1b7;const _0x4578c2=a210_0x4578();let _0x447337=_0x4578c2[_0x360fe4];return _0x447337;}function a210_0x4578(){const _0x4166a3=['statusText','448008FlKJrX','abort','93ebQEtf','includes','1832586fTTjro','Request\x20failed','json','name','signal','*\x20请求失败,','4158402qRxjkc','5QIgfrD','3585732toUTbm','AbortError','fetch','62044hMkIkR','7685820IFJCbK','headers','text','message','135tiamVp','445373JoJEbf','log','content-type'];a210_0x4578=function(){return _0x4166a3;};return a210_0x4578();}function sleep(_0x4195a0){return new Promise(_0x740dda=>setTimeout(_0x740dda,_0x4195a0));}export function validateUrl(_0x3f7583){try{return new URL(_0x3f7583),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a211_0x50d2(){const _0x4e8126=['100zWqdfo','stdin','nonInteractive','753648PyerSO','225057bAPYOU','35zfCdSe','setRawMode','30fGcpaG','26412CKYJmk','isTTY','true','672bctwLV','1443156aMMFTt','1771HdMDbn','isRaw','40236BlqiDB','16ynIEPh','stdout','805644hlsgMR'];a211_0x50d2=function(){return _0x4e8126;};return a211_0x50d2();}(function(_0x4a836a,_0x515e95){const _0x38f461=a211_0xff5f,_0x370fb6=_0x4a836a();while(!![]){try{const _0xea7698=-parseInt(_0x38f461(0x190))/0x1*(parseInt(_0x38f461(0x185))/0x2)+-parseInt(_0x38f461(0x189))/0x3+-parseInt(_0x38f461(0x18d))/0x4*(parseInt(_0x38f461(0x18a))/0x5)+parseInt(_0x38f461(0x191))/0x6+-parseInt(_0x38f461(0x188))/0x7*(parseInt(_0x38f461(0x195))/0x8)+-parseInt(_0x38f461(0x184))/0x9*(parseInt(_0x38f461(0x18c))/0xa)+parseInt(_0x38f461(0x192))/0xb*(parseInt(_0x38f461(0x194))/0xc);if(_0xea7698===_0x515e95)break;else _0x370fb6['push'](_0x370fb6['shift']());}catch(_0x48a7da){_0x370fb6['push'](_0x370fb6['shift']());}}}(a211_0x50d2,0x2294b));function env(_0x44a0e3){return process.env[`RABETBASE_${_0x44a0e3}`]||process.env[`LOVRABET_${_0x44a0e3}`]||undefined;}function a211_0xff5f(_0x8ada77,_0x210e5e){_0x8ada77=_0x8ada77-0x184;const _0x50d27e=a211_0x50d2();let _0xff5f05=_0x50d27e[_0x8ada77];return _0xff5f05;}export function isNonInteractive(_0x66d6de){const _0x590a2f=a211_0xff5f;return!!(_0x66d6de[_0x590a2f(0x187)]||_0x66d6de['ci']||env('CI')===_0x590a2f(0x18f)||process.env.CI===_0x590a2f(0x18f)||!process[_0x590a2f(0x196)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x564943=a211_0xff5f;if(!process['stdin'][_0x564943(0x18e)])return![];try{const _0x458434=process[_0x564943(0x186)][_0x564943(0x193)];return process['stdin'][_0x564943(0x18b)](!![]),process[_0x564943(0x186)][_0x564943(0x18b)](_0x458434??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a212_0x225750=a212_0xb445;(function(_0x19b22a,_0x7749a4){const _0x4e5fcd=a212_0xb445,_0x5368b0=_0x19b22a();while(!![]){try{const _0x486e38=-parseInt(_0x4e5fcd(0xd1))/0x1*(parseInt(_0x4e5fcd(0xc6))/0x2)+parseInt(_0x4e5fcd(0xce))/0x3+-parseInt(_0x4e5fcd(0xf2))/0x4*(parseInt(_0x4e5fcd(0xdc))/0x5)+-parseInt(_0x4e5fcd(0xee))/0x6+-parseInt(_0x4e5fcd(0xe5))/0x7*(parseInt(_0x4e5fcd(0xc3))/0x8)+parseInt(_0x4e5fcd(0xe9))/0x9*(parseInt(_0x4e5fcd(0xdb))/0xa)+parseInt(_0x4e5fcd(0xd8))/0xb;if(_0x486e38===_0x7749a4)break;else _0x5368b0['push'](_0x5368b0['shift']());}catch(_0xfd6074){_0x5368b0['push'](_0x5368b0['shift']());}}}(a212_0xcf83,0x83cce));import a212_0x1347ab from'winston';function a212_0xb445(_0x547cc5,_0x5f2ff0){_0x547cc5=_0x547cc5-0xc1;const _0xcf83a9=a212_0xcf83();let _0xb445f0=_0xcf83a9[_0x547cc5];return _0xb445f0;}import a212_0x5ba08d from'node:fs';import a212_0x358b1d from'node:path';class Logger{[a212_0x225750(0xe2)];[a212_0x225750(0xe4)];[a212_0x225750(0xc5)]='';constructor(){const _0x42cd41=a212_0x225750;this[_0x42cd41(0xe4)]='';}[a212_0x225750(0xed)](_0x59a9f0){const _0x5a4d4d=a212_0x225750;this[_0x5a4d4d(0xc5)]=_0x59a9f0;}[a212_0x225750(0xe8)](){const _0x5f0a84=a212_0x225750,_0x5225d9=a212_0x358b1d[_0x5f0a84(0xca)](this[_0x5f0a84(0xe4)]);!a212_0x5ba08d['existsSync'](_0x5225d9)&&a212_0x5ba08d[_0x5f0a84(0xef)](_0x5225d9,{'recursive':!![]});const _0x4a72cc=a212_0x1347ab[_0x5f0a84(0xdf)][_0x5f0a84(0xf8)](a212_0x1347ab[_0x5f0a84(0xdf)][_0x5f0a84(0xf5)](),a212_0x1347ab[_0x5f0a84(0xdf)][_0x5f0a84(0xc4)]({'stack':!![]}),a212_0x1347ab[_0x5f0a84(0xdf)][_0x5f0a84(0xe1)](_0x3132a8=>{const _0x5bfe30=_0x5f0a84,_0x5555e5={'timestamp':_0x3132a8['timestamp']||new Date()[_0x5bfe30(0xf6)](),'level':_0x3132a8['level']||_0x5bfe30(0xc7),'command':_0x3132a8[_0x5bfe30(0xcb)]||'unknown','rawCommand':_0x3132a8[_0x5bfe30(0xf3)]||this[_0x5bfe30(0xc5)]||undefined,'message':_0x3132a8[_0x5bfe30(0xd0)]||'','duration':_0x3132a8[_0x5bfe30(0xcc)]||undefined,'details':_0x3132a8['details']||undefined};return JSON['stringify'](_0x5555e5);}));this[_0x5f0a84(0xe2)]=a212_0x1347ab[_0x5f0a84(0xde)]({'level':_0x5f0a84(0xc7),'format':_0x4a72cc,'transports':[new a212_0x1347ab[(_0x5f0a84(0xea))][(_0x5f0a84(0xe0))]({'filename':this[_0x5f0a84(0xe4)],'level':'info'})],'silent':![]}),a212_0x1347ab[_0x5f0a84(0xd5)]({'success':'green','error':_0x5f0a84(0xd6),'warn':_0x5f0a84(0xeb),'info':_0x5f0a84(0xd2)});}[a212_0x225750(0xe3)](_0x5f17c2){const _0xf8b47e=a212_0x225750;this[_0xf8b47e(0xe4)]=a212_0x358b1d['join'](_0x5f17c2,_0xf8b47e(0xcd)),this['winstonLogger']&&this['winstonLogger'][_0xf8b47e(0xda)](),this['initWinstonLogger']();}[a212_0x225750(0xc7)](_0x55ccea,_0x15fd36,_0x1fd1ec){const _0x5e9a0e=a212_0x225750;if(!this[_0x5e9a0e(0xe4)]||!this['winstonLogger'])return;this[_0x5e9a0e(0xe2)]['info'](_0x15fd36,{'command':_0x55ccea,'details':_0x1fd1ec});}[a212_0x225750(0xf7)](_0xcadac3,_0x21ce1f,_0x5f14b6,_0xc4ec8a){const _0x141218=a212_0x225750;if(!this[_0x141218(0xe4)]||!this[_0x141218(0xe2)])return;this['winstonLogger'][_0x141218(0xf4)](_0x141218(0xc7),_0x21ce1f,{'level':'success','command':_0xcadac3,'duration':_0x5f14b6,'details':_0xc4ec8a});}[a212_0x225750(0xe6)](_0x30e097,_0x361c9f,_0x1eb64c){const _0x4d3b39=a212_0x225750;if(!this[_0x4d3b39(0xe4)]||!this['winstonLogger'])return;this[_0x4d3b39(0xe2)]['error'](_0x361c9f,{'command':_0x30e097,'details':_0x1eb64c});}[a212_0x225750(0xc9)](_0x1090a4,_0x3286c3,_0x392e2b){const _0x444b92=a212_0x225750;if(!this['logFilePath']||!this[_0x444b92(0xe2)])return;this[_0x444b92(0xe2)]['warn'](_0x3286c3,{'command':_0x1090a4,'details':_0x392e2b});}async[a212_0x225750(0xd7)](_0x2f1562,_0x363290,_0xcbf8ff){const _0x2f6f0e=a212_0x225750,_0x302765=Date['now']();this[_0x2f6f0e(0xc7)](_0x2f1562,_0x2f6f0e(0xc8)+_0x363290);try{const _0x219ce7=await _0xcbf8ff(),_0x181e33=Date[_0x2f6f0e(0xe7)]()-_0x302765;return this[_0x2f6f0e(0xf7)](_0x2f1562,_0x2f6f0e(0xd9)+_0x363290,_0x181e33),_0x219ce7;}catch(_0x2f3413){const _0x1b8999=Date[_0x2f6f0e(0xe7)]()-_0x302765;this[_0x2f6f0e(0xe6)](_0x2f1562,_0x2f6f0e(0xec)+_0x363290,{'error':_0x2f3413 instanceof Error?_0x2f3413[_0x2f6f0e(0xd0)]:String(_0x2f3413),'duration':_0x1b8999});throw _0x2f3413;}}[a212_0x225750(0xc1)](){const _0x6c2f30=a212_0x225750;try{if(!a212_0x5ba08d['existsSync'](this[_0x6c2f30(0xe4)]))return[];const _0x3b69e3=a212_0x5ba08d['readFileSync'](this['logFilePath'],'utf8');return _0x3b69e3[_0x6c2f30(0xd4)]('\x0a')[_0x6c2f30(0xdd)](_0x10aa91=>_0x10aa91[_0x6c2f30(0xf1)]())[_0x6c2f30(0xcf)](_0xcffa4d=>JSON['parse'](_0xcffa4d));}catch(_0x2cb342){return console[_0x6c2f30(0xc9)]('Failed\x20to\x20read\x20logs:',_0x2cb342),[];}}['clearLogs'](){const _0x53b60e=a212_0x225750;try{a212_0x5ba08d[_0x53b60e(0xf0)](this[_0x53b60e(0xe4)])&&a212_0x5ba08d['writeFileSync'](this[_0x53b60e(0xe4)],'',_0x53b60e(0xc2));}catch(_0x5cac29){console['warn']('Failed\x20to\x20clear\x20logs:',_0x5cac29);}}[a212_0x225750(0xd3)](){const _0x4227b0=a212_0x225750;return this[_0x4227b0(0xe2)];}}function a212_0xcf83(){const _0x10a2bf=['toISOString','success','combine','readLogs','utf8','8YjZEBy','errors','currentRawCommand','23118ODYIPC','info','开始执行:\x20','warn','dirname','command','duration','.lovrabet.log','3041955MFeopE','map','message','1mqVPUp','blue','getWinstonInstance','split','addColors','red','logTask','7475237oIQjYP','完成:\x20','clear','50dodJtu','116395ufOUXy','filter','createLogger','format','File','printf','winstonLogger','setLogPath','logFilePath','1146334qnfuNm','error','now','initWinstonLogger','1191087vaIrfY','transports','yellow','失败:\x20','setRawCommand','5929680oqbEqI','mkdirSync','existsSync','trim','112wIGDqG','rawCommand','log','timestamp'];a212_0xcf83=function(){return _0x10a2bf;};return a212_0xcf83();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e0a05,_0x1b683b){const _0x2504b0=a213_0x1bc3,_0x7df4e3=_0x5e0a05();while(!![]){try{const _0x39cba4=-parseInt(_0x2504b0(0x194))/0x1*(parseInt(_0x2504b0(0x195))/0x2)+parseInt(_0x2504b0(0x18f))/0x3*(parseInt(_0x2504b0(0x191))/0x4)+parseInt(_0x2504b0(0x19a))/0x5+-parseInt(_0x2504b0(0x19c))/0x6+-parseInt(_0x2504b0(0x190))/0x7+parseInt(_0x2504b0(0x19b))/0x8*(parseInt(_0x2504b0(0x193))/0x9)+-parseInt(_0x2504b0(0x196))/0xa;if(_0x39cba4===_0x1b683b)break;else _0x7df4e3['push'](_0x7df4e3['shift']());}catch(_0x217f31){_0x7df4e3['push'](_0x7df4e3['shift']());}}}(a213_0x1cc4,0x8759e));function a213_0x1cc4(){const _0x2a50af=['parse','validation','4513360jFJqsW','41880tMhImK','3253266wntSRu','isArray','--params\x20must\x20be\x20a\x20JSON\x20object','12MXVVDN','4679584jaPTYI','562540RTrBLN','object','1062eRaPNM','398LrxGvo','1464lCLhmO','264850nCcKwh','Invalid\x20JSON\x20for\x20--params:\x20'];a213_0x1cc4=function(){return _0x2a50af;};return a213_0x1cc4();}import{CliErrors}from'../errors.js';function a213_0x1bc3(_0x4cf019,_0x33e586){_0x4cf019=_0x4cf019-0x18f;const _0x1cc4ef=a213_0x1cc4();let _0x1bc3db=_0x1cc4ef[_0x4cf019];return _0x1bc3db;}export function parseJsonParams(_0x3194bc){const _0x257804=a213_0x1bc3;if(!_0x3194bc)return undefined;let _0xe93ca5;try{_0xe93ca5=JSON[_0x257804(0x198)](_0x3194bc);}catch{throw CliErrors[_0x257804(0x199)](_0x257804(0x197)+_0x3194bc);}if(!_0xe93ca5||typeof _0xe93ca5!==_0x257804(0x192)||Array[_0x257804(0x19d)](_0xe93ca5))throw CliErrors[_0x257804(0x199)](_0x257804(0x19e),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0xe93ca5;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a214_0x1b36bd=a214_0x4bf3;function a214_0x4bf3(_0x5e82f4,_0x34c5ac){_0x5e82f4=_0x5e82f4-0x100;const _0x3c4eb3=a214_0x3c4e();let _0x4bf3fe=_0x3c4eb3[_0x5e82f4];return _0x4bf3fe;}function a214_0x3c4e(){const _0x57c954=['297170gyOBsH','8ayMJfF','63060fOjyaW','platform','60tFNjaX','win32','48omzllO','3342dYwGHT','892375qNgQra','.cmd','8509572iYirfP','264MqOjUA','4528174vOQnNk','1843834HlVhde'];a214_0x3c4e=function(){return _0x57c954;};return a214_0x3c4e();}(function(_0x49e7c2,_0x149608){const _0x2053a2=a214_0x4bf3,_0x59a73b=_0x49e7c2();while(!![]){try{const _0x47bcfb=-parseInt(_0x2053a2(0x10b))/0x1+parseInt(_0x2053a2(0x102))/0x2+parseInt(_0x2053a2(0x10a))/0x3*(-parseInt(_0x2053a2(0x109))/0x4)+parseInt(_0x2053a2(0x107))/0x5*(parseInt(_0x2053a2(0x105))/0x6)+-parseInt(_0x2053a2(0x101))/0x7*(-parseInt(_0x2053a2(0x104))/0x8)+-parseInt(_0x2053a2(0x10d))/0x9+-parseInt(_0x2053a2(0x103))/0xa*(-parseInt(_0x2053a2(0x100))/0xb);if(_0x47bcfb===_0x149608)break;else _0x59a73b['push'](_0x59a73b['shift']());}catch(_0x49b34d){_0x59a73b['push'](_0x59a73b['shift']());}}}(a214_0x3c4e,0x87f4c));export const isWindows=process[a214_0x1b36bd(0x106)]===a214_0x1b36bd(0x108);export function resolveNpmBin(_0x3c7aa1){const _0x181c65=a214_0x1b36bd;return isWindows?_0x3c7aa1+_0x181c65(0x10c):_0x3c7aa1;}
|