@lovrabet/rabetbase-cli 2.1.9 → 2.1.10-beta.0
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/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/use.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-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/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -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/report.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/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/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/skill/index.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/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.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/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xc7b859,_0x20c19a){const _0x20d335=a182_0x19fd,_0x78ad41=_0xc7b859();while(!![]){try{const _0x398d2c=parseInt(_0x20d335(0x1e5))/0x1*(-parseInt(_0x20d335(0x1c3))/0x2)+parseInt(_0x20d335(0x1cb))/0x3+-parseInt(_0x20d335(0x1cd))/0x4+-parseInt(_0x20d335(0x1d3))/0x5+parseInt(_0x20d335(0x1c2))/0x6+-parseInt(_0x20d335(0x1c9))/0x7+-parseInt(_0x20d335(0x1e1))/0x8*(-parseInt(_0x20d335(0x1d7))/0x9);if(_0x398d2c===_0x20c19a)break;else _0x78ad41['push'](_0x78ad41['shift']());}catch(_0x5137a1){_0x78ad41['push'](_0x78ad41['shift']());}}}(a182_0x48a8,0x7254c));import a182_0x23f84f from'node:fs';import a182_0x41edb1 from'node:path';import a182_0x543fe2 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x141ab9){const _0x29df00=a182_0x19fd,_0x125c03=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x125c03[_0x29df00(0x1d0)](_0x6708ce=>_0x6708ce['test'](_0x141ab9));}function a182_0x19fd(_0x534c5f,_0x340d91){_0x534c5f=_0x534c5f-0x1c2;const _0x48a88f=a182_0x48a8();let _0x19fd45=_0x48a88f[_0x534c5f];return _0x19fd45;}function getInstalledVersion(_0x3fa9ed,_0x31b6b6){const _0xaab95d=a182_0x19fd;try{const _0x23d795=a182_0x41edb1[_0xaab95d(0x1df)](_0x3fa9ed,'node_modules',_0x31b6b6,_0xaab95d(0x1de));if(a182_0x23f84f[_0xaab95d(0x1dc)](_0x23d795)){const _0xd38e90=JSON[_0xaab95d(0x1c6)](a182_0x23f84f[_0xaab95d(0x1ce)](_0x23d795,_0xaab95d(0x1cf)));return _0xd38e90[_0xaab95d(0x1da)]||null;}}catch{}return null;}function a182_0x48a8(){const _0x383f03=['394805YaYGEm','↪\x20SDK\x20update\x20available','minVersion','\x1b[1m','869049sCdfEL','node','dependencies','version','coerce','existsSync','npm\x20install\x20','package.json','join','\x1b[33m','80nGzhvp','stableVersion','\x20\x20\x20Stable\x20version:\x20','log','457519oTJvsq','2638380vPKcGy','2YoEQUr','\x20\x20\x20Current\x20version:\x20','\x20\x20\x20Upgrade\x20command:\x20','parse','packageName','@lovrabet/sdk','4991469eZbdiU','utf8','2395470NEQJrX','sdk','1943932iRCAUo','readFileSync','utf-8','some','\x1b[0m','devDependencies'];a182_0x48a8=function(){return _0x383f03;};return a182_0x48a8();}async function getSdkStableVersion(){const _0x5729b8=a182_0x19fd;try{const _0x5994c7=await getCdnConfig();return _0x5994c7?.[_0x5729b8(0x1cc)]?.[_0x5729b8(0x1d8)]?.[_0x5729b8(0x1e2)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x3f990b=a182_0x19fd;try{const _0x171349=await getCdnConfig();return _0x171349?.['sdk']?.[_0x3f990b(0x1d8)]?.[_0x3f990b(0x1c7)]||'@lovrabet/sdk';}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x2a2aa7){const _0x43586a=a182_0x19fd,_0x122972=a182_0x41edb1[_0x43586a(0x1df)](_0x2a2aa7,_0x43586a(0x1de)),[_0x1e2d73,_0x27615f]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x104d29=_0x1e2d73||FALLBACK_MIN_SDK_VERSION;if(!a182_0x23f84f['existsSync'](_0x122972))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x104d29,'packageName':_0x27615f,'stableVersion':_0x1e2d73};try{const _0x131ecc=JSON[_0x43586a(0x1c6)](a182_0x23f84f[_0x43586a(0x1ce)](_0x122972,_0x43586a(0x1ca))),_0x10f6cd=_0x131ecc[_0x43586a(0x1d9)]||{},_0x3029ed=_0x131ecc[_0x43586a(0x1d2)]||{},_0x58ff06=_0x10f6cd[_0x27615f]||_0x3029ed[_0x27615f];if(!_0x58ff06)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x104d29,'packageName':_0x27615f,'stableVersion':_0x1e2d73};let _0x118e3a=getInstalledVersion(_0x2a2aa7,_0x27615f);!_0x118e3a&&(_0x118e3a=_0x58ff06);if(isNonNumericVersion(_0x58ff06))return{'installed':!![],'version':_0x118e3a,'needsUpgrade':![],'minVersion':_0x104d29,'packageName':_0x27615f,'stableVersion':_0x1e2d73};const _0x22a1b5=a182_0x543fe2[_0x43586a(0x1db)](_0x118e3a),_0x2e6ab5=a182_0x543fe2[_0x43586a(0x1db)](_0x104d29),_0x454ba8=_0x22a1b5&&_0x2e6ab5?a182_0x543fe2['lt'](_0x22a1b5,_0x2e6ab5):![];return{'installed':!![],'version':_0x118e3a,'needsUpgrade':_0x454ba8,'minVersion':_0x104d29,'packageName':_0x27615f,'stableVersion':_0x1e2d73};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x104d29,'packageName':_0x27615f,'stableVersion':_0x1e2d73};}}export function checkSdkVersionSync(_0x5230df){const _0x9abd2=a182_0x19fd,_0x2d9719=a182_0x41edb1[_0x9abd2(0x1df)](_0x5230df,_0x9abd2(0x1de)),_0x1be0ad=_0x9abd2(0x1c8);if(!a182_0x23f84f[_0x9abd2(0x1dc)](_0x2d9719))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1be0ad,'stableVersion':null};try{const _0x34fd7a=JSON[_0x9abd2(0x1c6)](a182_0x23f84f[_0x9abd2(0x1ce)](_0x2d9719,_0x9abd2(0x1ca))),_0x56fcd8=_0x34fd7a[_0x9abd2(0x1d9)]||{},_0x24dece=_0x34fd7a[_0x9abd2(0x1d2)]||{},_0x4c4dfc=_0x56fcd8[_0x1be0ad]||_0x24dece[_0x1be0ad];if(!_0x4c4dfc)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1be0ad,'stableVersion':null};let _0x1ecf1e=getInstalledVersion(_0x5230df,_0x1be0ad);!_0x1ecf1e&&(_0x1ecf1e=_0x4c4dfc);if(isNonNumericVersion(_0x4c4dfc))return{'installed':!![],'version':_0x1ecf1e,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1be0ad,'stableVersion':null};const _0x4ec568=a182_0x543fe2[_0x9abd2(0x1db)](_0x1ecf1e),_0x5f4efb=_0x4ec568?a182_0x543fe2['lt'](_0x4ec568,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1ecf1e,'needsUpgrade':_0x5f4efb,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1be0ad,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1be0ad,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x3cf3da){const _0x183997=a182_0x19fd;if(!_0x3cf3da['needsUpgrade'])return;const _0x382cd2=_0x183997(0x1e0),_0xb86389=_0x183997(0x1d1),_0x157faf=_0x183997(0x1d6),_0x55f9a3=_0x3cf3da['packageName']||'@lovrabet/sdk',_0x4ad1b1=_0x3cf3da[_0x183997(0x1e2)]||_0x3cf3da[_0x183997(0x1d5)],_0x55e6e9=_0x183997(0x1dd)+_0x55f9a3+'@'+(_0x4ad1b1||'latest');console[_0x183997(0x1e4)](),console['log'](''+_0x382cd2+_0x157faf+_0x183997(0x1d4)+_0xb86389),console[_0x183997(0x1e4)](_0x382cd2+_0x183997(0x1c4)+_0x55f9a3+'@'+_0x3cf3da[_0x183997(0x1da)]+_0xb86389),console[_0x183997(0x1e4)](_0x382cd2+_0x183997(0x1e3)+_0x4ad1b1+_0xb86389),console[_0x183997(0x1e4)](_0x382cd2+_0x183997(0x1c5)+_0x55e6e9+_0xb86389),console[_0x183997(0x1e4)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x538a5a,_0x107b3a){const _0x45c7ae=a183_0x5a76,_0x1cf64d=_0x538a5a();while(!![]){try{const _0x13d120=-parseInt(_0x45c7ae(0x1d9))/0x1+-parseInt(_0x45c7ae(0x1ec))/0x2*(parseInt(_0x45c7ae(0x1da))/0x3)+parseInt(_0x45c7ae(0x1ed))/0x4+parseInt(_0x45c7ae(0x1e1))/0x5+parseInt(_0x45c7ae(0x1e4))/0x6+-parseInt(_0x45c7ae(0x1ee))/0x7*(parseInt(_0x45c7ae(0x1e9))/0x8)+parseInt(_0x45c7ae(0x1ea))/0x9;if(_0x13d120===_0x107b3a)break;else _0x1cf64d['push'](_0x1cf64d['shift']());}catch(_0x16de4a){_0x1cf64d['push'](_0x1cf64d['shift']());}}}(a183_0x1ff5,0xd6550));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a183_0x564dd7 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a183_0x1ff5(){const _0x58fed8=['../..','\x1b[1m','\x20\x20\x20Current\x20CLI\x20version:\x20','version','\x20\x20\x20','validation','coerce','utf-8','\x20\x20\x20Minimum\x20required:\x20','minimumVersion','1.0.0','502676dQqAjV','3YrrfyL','npm\x20install\x20-g\x20','belowMinimum','upgradeMessage','\x20\x20\x20Stable\x20version:\x20','\x1b[0m','↪\x20New\x20version\x20available','5803160puUrue','\x20\x20\x20Upgrade\x20command:\x20','join','4718658RRkFUF','\x20\x20\x20Recommended\x20stable:\x20','currentVersion','Current\x20version:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','1253088FpwjiB','3596265RjEGDZ','stableVersion','2752124uGTekB','6652280zbzwey','56EyPKRY','\x1b[31m','minimumVersionMessage','log','Upgrade\x20command:\x20','latest','parse','Minimum\x20required:\x20','package.json'];a183_0x1ff5=function(){return _0x58fed8;};return a183_0x1ff5();}function a183_0x5a76(_0x59a503,_0x37f06b){_0x59a503=_0x59a503-0x1d4;const _0x1ff5ee=a183_0x1ff5();let _0x5a7684=_0x1ff5ee[_0x59a503];return _0x5a7684;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x197543){const _0x13bb7d=a183_0x5a76,_0x10344a=_0x197543[_0x13bb7d(0x1eb)]||_0x13bb7d(0x1f3);return _0x13bb7d(0x1db)+NPM_PACKAGE_NAME+'@'+_0x10344a;}function getCurrentCliVersion(){const _0x2ba697=a183_0x5a76;try{const _0x362842=fileURLToPath(import.meta.url),_0x229e8e=resolve(dirname(_0x362842),_0x2ba697(0x1f7)),_0x5b9bff=resolve(_0x229e8e,_0x2ba697(0x1f6)),_0x29cd9e=JSON[_0x2ba697(0x1f4)](readFileSync(_0x5b9bff,_0x2ba697(0x1d5)));return _0x29cd9e[_0x2ba697(0x1fa)]||'1.0.0';}catch{return _0x2ba697(0x1d8);}}export async function checkCliVersion(){const _0x6d127c=a183_0x5a76,_0x1e8afa=getCurrentCliVersion(),_0x32e810=await getCliVersionPolicy(),_0x3e0038=_0x32e810?.[_0x6d127c(0x1eb)]||null,_0x445701=_0x32e810?.['minimumVersion']||null;let _0x404bfa=![],_0x1af360=![];const _0x2a5e1f=a183_0x564dd7['coerce'](_0x1e8afa);if(_0x2a5e1f&&_0x3e0038)try{const _0x232e78=a183_0x564dd7[_0x6d127c(0x1d4)](_0x3e0038);if(_0x232e78)_0x404bfa=a183_0x564dd7['lt'](_0x2a5e1f,_0x232e78);}catch{}if(_0x2a5e1f&&_0x445701)try{const _0x3cca6e=a183_0x564dd7[_0x6d127c(0x1d4)](_0x445701);if(_0x3cca6e)_0x1af360=a183_0x564dd7['lt'](_0x2a5e1f,_0x3cca6e);}catch{}return _0x1af360&&(_0x404bfa=!![]),{'currentVersion':_0x1e8afa,'stableVersion':_0x3e0038,'minimumVersion':_0x445701,'needsUpgrade':_0x404bfa,'belowMinimum':_0x1af360,'isPreRelease':![],'upgradeMessage':_0x32e810?.[_0x6d127c(0x1dd)],'minimumVersionMessage':_0x32e810?.[_0x6d127c(0x1f0)]};}export function printCliUpgradeWarning(_0x2b1420){const _0x59a2e3=a183_0x5a76;if(!_0x2b1420['needsUpgrade']&&!_0x2b1420[_0x59a2e3(0x1dc)])return;const _0x1147ac=_0x59a2e3(0x1ef),_0x39f383='\x1b[33m',_0x5b2b8c=_0x59a2e3(0x1df),_0x18b272=_0x59a2e3(0x1f8),_0x18dc8d=getCliUpgradeCommand(_0x2b1420);console[_0x59a2e3(0x1f1)](),_0x2b1420[_0x59a2e3(0x1dc)]?(console[_0x59a2e3(0x1f1)](''+_0x1147ac+_0x18b272+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x5b2b8c),console[_0x59a2e3(0x1f1)](_0x1147ac+_0x59a2e3(0x1f9)+_0x2b1420[_0x59a2e3(0x1e6)]+_0x5b2b8c),_0x2b1420[_0x59a2e3(0x1d7)]&&console[_0x59a2e3(0x1f1)](_0x1147ac+_0x59a2e3(0x1d6)+_0x2b1420[_0x59a2e3(0x1d7)]+_0x5b2b8c),_0x2b1420[_0x59a2e3(0x1eb)]&&_0x2b1420[_0x59a2e3(0x1eb)]!==_0x2b1420[_0x59a2e3(0x1d7)]&&console[_0x59a2e3(0x1f1)](_0x1147ac+_0x59a2e3(0x1e5)+_0x2b1420[_0x59a2e3(0x1eb)]+_0x5b2b8c),_0x2b1420['minimumVersionMessage']&&console['log'](_0x1147ac+_0x59a2e3(0x1fb)+_0x2b1420[_0x59a2e3(0x1f0)]+_0x5b2b8c),console[_0x59a2e3(0x1f1)](_0x1147ac+'\x20\x20\x20Upgrade\x20command:\x20'+_0x18dc8d+_0x5b2b8c)):(console[_0x59a2e3(0x1f1)](''+_0x39f383+_0x18b272+_0x59a2e3(0x1e0)+_0x5b2b8c),console[_0x59a2e3(0x1f1)](_0x39f383+_0x59a2e3(0x1f9)+_0x2b1420[_0x59a2e3(0x1e6)]+_0x5b2b8c),console[_0x59a2e3(0x1f1)](_0x39f383+_0x59a2e3(0x1de)+_0x2b1420[_0x59a2e3(0x1eb)]+_0x5b2b8c),_0x2b1420[_0x59a2e3(0x1dd)]&&console[_0x59a2e3(0x1f1)](_0x39f383+_0x59a2e3(0x1fb)+_0x2b1420[_0x59a2e3(0x1dd)]+_0x5b2b8c),console[_0x59a2e3(0x1f1)](_0x39f383+_0x59a2e3(0x1e2)+_0x18dc8d+_0x5b2b8c)),console[_0x59a2e3(0x1f1)]();}export function assertCliVersionSupported(_0x36e2ab){const _0x1c5c6e=a183_0x5a76;if(!_0x36e2ab[_0x1c5c6e(0x1dc)])return;const _0x50d700=[_0x36e2ab['minimumVersionMessage'],_0x1c5c6e(0x1e7)+_0x36e2ab[_0x1c5c6e(0x1e6)],_0x36e2ab['minimumVersion']?_0x1c5c6e(0x1f5)+_0x36e2ab[_0x1c5c6e(0x1d7)]:null,_0x1c5c6e(0x1f2)+getCliUpgradeCommand(_0x36e2ab)]['filter'](Boolean)[_0x1c5c6e(0x1e3)]('\x0a');throw CliErrors[_0x1c5c6e(0x1fc)](_0x1c5c6e(0x1e8),_0x50d700);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x177955,_0x58fc42){const _0x11f3fe=a184_0xa3f3,_0x529a7b=_0x177955();while(!![]){try{const _0x2dc35c=parseInt(_0x11f3fe(0x7e))/0x1+parseInt(_0x11f3fe(0x8e))/0x2*(parseInt(_0x11f3fe(0x89))/0x3)+parseInt(_0x11f3fe(0x78))/0x4+-parseInt(_0x11f3fe(0x7a))/0x5*(parseInt(_0x11f3fe(0x86))/0x6)+parseInt(_0x11f3fe(0x84))/0x7+-parseInt(_0x11f3fe(0x7d))/0x8*(-parseInt(_0x11f3fe(0x7c))/0x9)+-parseInt(_0x11f3fe(0x82))/0xa;if(_0x2dc35c===_0x58fc42)break;else _0x529a7b['push'](_0x529a7b['shift']());}catch(_0xca8a7a){_0x529a7b['push'](_0x529a7b['shift']());}}}(a184_0x22b0,0x9b004));function a184_0x22b0(){const _0x4084fe=['316218YrHgWJ','cli','1406352jOtizt','stableVersion','latestVersion','282zIofIG','json','object','string','abort','24086SKgVOq','1912780YvDXVX','minimumVersionMessage','15RsWtGO','signal','90GBKsVW','805384XyfzAW','356812xOycmG','length','recommendedVersion','application/json','16808930RpfQrF','now'];a184_0x22b0=function(){return _0x4084fe;};return a184_0x22b0();}function a184_0xa3f3(_0x3e81db,_0x345cad){_0x3e81db=_0x3e81db-0x78;const _0x22b0de=a184_0x22b0();let _0xa3f338=_0x22b0de[_0x3e81db];return _0xa3f338;}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(_0x561967){const _0x3ecb47=a184_0xa3f3;return typeof _0x561967===_0x3ecb47(0x8c)&&_0x561967['trim']()[_0x3ecb47(0x7f)]>0x0?_0x561967['trim']():null;}function normalizeCliVersionPolicy(_0x20d9c8){const _0x3aac61=a184_0xa3f3;if(!_0x20d9c8||typeof _0x20d9c8!==_0x3aac61(0x8b))return null;const _0x3bccaa=_0x20d9c8,_0x203266=_0x3bccaa[_0x3aac61(0x85)]&&typeof _0x3bccaa[_0x3aac61(0x85)]==='object'?_0x3bccaa[_0x3aac61(0x85)]:_0x3bccaa,_0x4011d1=pickString(_0x203266[_0x3aac61(0x87)])||pickString(_0x203266[_0x3aac61(0x88)])||pickString(_0x203266[_0x3aac61(0x80)]),_0x245d93=pickString(_0x203266['minimumVersion'])||pickString(_0x203266['minVersion']);if(!_0x4011d1&&!_0x245d93)return null;return{'stableVersion':_0x4011d1,'minimumVersion':_0x245d93,'upgradeMessage':pickString(_0x203266['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x203266[_0x3aac61(0x79)])||undefined};}export async function fetchCliVersionPolicy(){const _0x454be8=a184_0xa3f3,_0x48c2cd=new AbortController(),_0x38153f=setTimeout(()=>_0x48c2cd[_0x454be8(0x8d)](),FETCH_TIMEOUT_MS);try{const _0x47861e=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x454be8(0x81)},'signal':_0x48c2cd[_0x454be8(0x7b)]});if(!_0x47861e['ok'])return null;const _0x32aadf=await _0x47861e[_0x454be8(0x8a)]();return normalizeCliVersionPolicy(_0x32aadf);}catch{return null;}finally{clearTimeout(_0x38153f);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x1dd375=a184_0xa3f3,_0x2ebd66=Date[_0x1dd375(0x83)]();if(hasCachedPolicy){const _0x55478e=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2ebd66-cacheTime<_0x55478e)return cachedPolicy;}const _0x7b0f27=await fetchCliVersionPolicy();return cachedPolicy=_0x7b0f27,cacheTime=_0x2ebd66,hasCachedPolicy=!![],_0x7b0f27;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x467389=a185_0x3977;function a185_0x3f5f(){const _0x59b9e1=['16fQOcrU','385BuzaAu','1328724KfoBdG','18164FtOZqY','21kReLDd','3530TVetAk','6410400HcBokn','1157682PUqhIE','2ziAIgn','314367wDbNjY','39DFlbwD','string','project','978450twxUkD','env'];a185_0x3f5f=function(){return _0x59b9e1;};return a185_0x3f5f();}(function(_0x27ed56,_0x563e3d){const _0x376e46=a185_0x3977,_0x304aa7=_0x27ed56();while(!![]){try{const _0x4c67c7=parseInt(_0x376e46(0x14e))/0x1*(-parseInt(_0x376e46(0x14d))/0x2)+parseInt(_0x376e46(0x14f))/0x3*(parseInt(_0x376e46(0x157))/0x4)+-parseInt(_0x376e46(0x152))/0x5+parseInt(_0x376e46(0x14c))/0x6*(parseInt(_0x376e46(0x149))/0x7)+parseInt(_0x376e46(0x154))/0x8*(-parseInt(_0x376e46(0x156))/0x9)+parseInt(_0x376e46(0x14a))/0xa*(-parseInt(_0x376e46(0x155))/0xb)+parseInt(_0x376e46(0x14b))/0xc;if(_0x4c67c7===_0x563e3d)break;else _0x304aa7['push'](_0x304aa7['shift']());}catch(_0x45f1dc){_0x304aa7['push'](_0x304aa7['shift']());}}}(a185_0x3f5f,0x56856));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a185_0x5b0f1f,getMultiAppConfigs as a185_0x54f02b,getTemplateBaseUrl as a185_0xe107fe}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x58a2f8){const _0x4cea03=a185_0x3977,_0x5a6212=readRawConfig(_0x58a2f8);return _0x5a6212[_0x4cea03(0x153)]&&typeof _0x5a6212[_0x4cea03(0x153)]===_0x4cea03(0x150)&&initEnv(_0x5a6212['env']),_0x5a6212;}export function getConfigAppCode(){return a185_0x5b0f1f();}export function getMultiAppConfigs(_0x5ccab0=a185_0x467389(0x151)){return a185_0x54f02b(_0x5ccab0);}function a185_0x3977(_0x5e67c9,_0x1b148e){_0x5e67c9=_0x5e67c9-0x149;const _0x3f5fb4=a185_0x3f5f();let _0x397709=_0x3f5fb4[_0x5e67c9];return _0x397709;}export function getTemplateBaseUrl(){return a185_0xe107fe();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfbbe43,_0x4c4346){const _0x110928=a186_0xc5b0,_0x2b75fa=_0xfbbe43();while(!![]){try{const _0x5dc02e=-parseInt(_0x110928(0x158))/0x1+-parseInt(_0x110928(0x14f))/0x2*(parseInt(_0x110928(0x15c))/0x3)+-parseInt(_0x110928(0x156))/0x4*(parseInt(_0x110928(0x15e))/0x5)+parseInt(_0x110928(0x153))/0x6+-parseInt(_0x110928(0x15d))/0x7+parseInt(_0x110928(0x150))/0x8*(parseInt(_0x110928(0x159))/0x9)+parseInt(_0x110928(0x154))/0xa;if(_0x5dc02e===_0x4c4346)break;else _0x2b75fa['push'](_0x2b75fa['shift']());}catch(_0x5e0f68){_0x2b75fa['push'](_0x2b75fa['shift']());}}}(a186_0xb479,0xa7e2e));import a186_0x13bd50 from'node:path';function a186_0xb479(){const _0x3df17d=['6470148CuGBfO','23641420XsXBti','join','8dBPHBG','mkdirSync','1356335DXZTDK','871551MSaGhJ','copyFileSync','error','2605062zLbVjZ','1989820AmrQpo','856820tOfpcW','2kFpDGb','8vZQmSv','name','isDirectory'];a186_0xb479=function(){return _0x3df17d;};return a186_0xb479();}function a186_0xc5b0(_0x538853,_0x529e38){_0x538853=_0x538853-0x14f;const _0xb4795f=a186_0xb479();let _0xc5b03b=_0xb4795f[_0x538853];return _0xc5b03b;}import a186_0x336558 from'node:fs';export async function copyDirectory(_0x558ab5,_0x1647f9){const _0x3b7b54=a186_0xc5b0;try{const _0x7652fb=a186_0x336558['readdirSync'](_0x558ab5,{'withFileTypes':!![]});a186_0x336558[_0x3b7b54(0x157)](_0x1647f9,{'recursive':!![]});for(const _0x5847ad of _0x7652fb){const _0x4ae7b5=a186_0x13bd50[_0x3b7b54(0x155)](_0x558ab5,_0x5847ad[_0x3b7b54(0x151)]),_0x33e66f=a186_0x13bd50[_0x3b7b54(0x155)](_0x1647f9,_0x5847ad[_0x3b7b54(0x151)]);_0x5847ad[_0x3b7b54(0x152)]()?await copyDirectory(_0x4ae7b5,_0x33e66f):a186_0x336558[_0x3b7b54(0x15a)](_0x4ae7b5,_0x33e66f);}}catch(_0x50d45c){console[_0x3b7b54(0x15b)]('复制目录时出错:',_0x50d45c);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a187_0x41eb(){const _0x36bca5=['10412148sOhpZH','2RBqdJK','10MKFRxb','11LcbVGz','1479393avSJPP','15hTEzhr','260698zsykcb','1947096UdzFyu','21632JvzRhA','285156YxwlNA','object','trim','217083otNqsh','574PksZnu','number','isFinite'];a187_0x41eb=function(){return _0x36bca5;};return a187_0x41eb();}(function(_0x4bf5bc,_0x607836){const _0x5ec565=a187_0x98cd,_0x45f9ab=_0x4bf5bc();while(!![]){try{const _0x8d6855=-parseInt(_0x5ec565(0xfa))/0x1*(parseInt(_0x5ec565(0xef))/0x2)+parseInt(_0x5ec565(0xf5))/0x3+parseInt(_0x5ec565(0xf2))/0x4*(-parseInt(_0x5ec565(0xee))/0x5)+-parseInt(_0x5ec565(0xf0))/0x6+-parseInt(_0x5ec565(0xf6))/0x7*(-parseInt(_0x5ec565(0xf1))/0x8)+-parseInt(_0x5ec565(0xfd))/0x9*(parseInt(_0x5ec565(0xfb))/0xa)+-parseInt(_0x5ec565(0xfc))/0xb*(-parseInt(_0x5ec565(0xf9))/0xc);if(_0x8d6855===_0x607836)break;else _0x45f9ab['push'](_0x45f9ab['shift']());}catch(_0x4cb9ef){_0x45f9ab['push'](_0x45f9ab['shift']());}}}(a187_0x41eb,0x306a6));function toFiniteNumber(_0x3ee8c9){const _0x2e67ff=a187_0x98cd;if(typeof _0x3ee8c9===_0x2e67ff(0xf7)&&Number[_0x2e67ff(0xf8)](_0x3ee8c9))return _0x3ee8c9;if(typeof _0x3ee8c9==='string'){const _0xa10af6=_0x3ee8c9[_0x2e67ff(0xf4)]();if(!_0xa10af6)return undefined;const _0x3f0219=Number(_0xa10af6);if(Number[_0x2e67ff(0xf8)](_0x3f0219))return _0x3f0219;}return undefined;}function a187_0x98cd(_0x3a76f2,_0x4b9ae4){_0x3a76f2=_0x3a76f2-0xee;const _0x41ebfc=a187_0x41eb();let _0x98cde1=_0x41ebfc[_0x3a76f2];return _0x98cde1;}export function normalizeEntityWithIdResponse(_0x3a582a){const _0x14ff8c=a187_0x98cd,_0x29cc9f=toFiniteNumber(_0x3a582a);if(_0x29cc9f!==undefined)return{'id':_0x29cc9f,'entity':{'id':_0x29cc9f}};if(!_0x3a582a||typeof _0x3a582a!==_0x14ff8c(0xf3))return{'id':undefined,'entity':{}};const _0x4e77e5={..._0x3a582a},_0x752e2d=toFiniteNumber(_0x4e77e5['id']);return _0x752e2d!==undefined&&(_0x4e77e5['id']=_0x752e2d),{'id':_0x752e2d,'entity':_0x4e77e5};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a188_0x2f98(_0x85ea82,_0x5c589f){_0x85ea82=_0x85ea82-0x19a;const _0x3d7a30=a188_0x3d7a();let _0x2f98aa=_0x3d7a30[_0x85ea82];return _0x2f98aa;}(function(_0x3a6cca,_0x223432){const _0x89f36b=a188_0x2f98,_0x232946=_0x3a6cca();while(!![]){try{const _0x28dbfd=parseInt(_0x89f36b(0x1a0))/0x1*(parseInt(_0x89f36b(0x1a3))/0x2)+parseInt(_0x89f36b(0x19e))/0x3+parseInt(_0x89f36b(0x19a))/0x4+parseInt(_0x89f36b(0x19d))/0x5+parseInt(_0x89f36b(0x1a2))/0x6*(-parseInt(_0x89f36b(0x19b))/0x7)+parseInt(_0x89f36b(0x19f))/0x8*(parseInt(_0x89f36b(0x19c))/0x9)+-parseInt(_0x89f36b(0x1a1))/0xa;if(_0x28dbfd===_0x223432)break;else _0x232946['push'](_0x232946['shift']());}catch(_0x33f92e){_0x232946['push'](_0x232946['shift']());}}}(a188_0x3d7a,0x24b77));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x3ed0ea,_0x1b7840){const _0x54db31=statSync(_0x3ed0ea);if(_0x54db31['isDirectory']()){!existsSync(_0x1b7840)&&mkdirSync(_0x1b7840,{'recursive':!![]});const _0x14220a=readdirSync(_0x3ed0ea);for(const _0x3854dc of _0x14220a){await copyDir(join(_0x3ed0ea,_0x3854dc),join(_0x1b7840,_0x3854dc));}}else copyFileSync(_0x3ed0ea,_0x1b7840);}export function ensureDir(_0x42a132){!existsSync(_0x42a132)&&mkdirSync(_0x42a132,{'recursive':!![]});}export function pathExists(_0x31fd04){return existsSync(_0x31fd04);}function a188_0x3d7a(){const _0x27daf7=['768771FrOfTf','88peeDpN','1IRVTfF','6621870goSYBm','6GvSDhZ','552554QvyUal','725084RVYznk','744989MjyOZA','918nsraGM','1020390dIdaWT'];a188_0x3d7a=function(){return _0x27daf7;};return a188_0x3d7a();}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x484aae=a189_0x10bd;(function(_0x21b434,_0x5c6a5e){const _0xe602bf=a189_0x10bd,_0x3a929d=_0x21b434();while(!![]){try{const _0x466d20=-parseInt(_0xe602bf(0x1f0))/0x1+-parseInt(_0xe602bf(0x1f5))/0x2*(parseInt(_0xe602bf(0x1fb))/0x3)+parseInt(_0xe602bf(0x200))/0x4*(-parseInt(_0xe602bf(0x1fe))/0x5)+-parseInt(_0xe602bf(0x1f6))/0x6*(-parseInt(_0xe602bf(0x1fc))/0x7)+parseInt(_0xe602bf(0x1e8))/0x8*(-parseInt(_0xe602bf(0x1f9))/0x9)+parseInt(_0xe602bf(0x1ee))/0xa*(-parseInt(_0xe602bf(0x1ef))/0xb)+parseInt(_0xe602bf(0x1f7))/0xc;if(_0x466d20===_0x5c6a5e)break;else _0x3a929d['push'](_0x3a929d['shift']());}catch(_0x182a10){_0x3a929d['push'](_0x3a929d['shift']());}}}(a189_0x3649,0x37ad0));import{mkdirSync,writeFileSync}from'node:fs';function a189_0x10bd(_0x9defbc,_0x432ea7){_0x9defbc=_0x9defbc-0x1db;const _0x3649ca=a189_0x3649();let _0x10bd38=_0x3649ca[_0x9defbc];return _0x10bd38;}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x13094f=getTemplateBaseUrl();return _0x13094f+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a189_0x484aae(0x1fa),'cache');export async function fetchGuidesFromCDN(){const _0x5682e5=a189_0x484aae,_0x2495ec=getGuidesCdnUrl(),_0x2a9042=await fetch(_0x2495ec,{'headers':{'Accept':_0x5682e5(0x1e3)}});if(!_0x2a9042['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x2a9042[_0x5682e5(0x1f8)]+'\x20'+_0x2a9042[_0x5682e5(0x1e0)]);const _0x4e37ec=await _0x2a9042[_0x5682e5(0x1f1)]();if(!_0x4e37ec[_0x5682e5(0x1e6)]||typeof _0x4e37ec['guides']!==_0x5682e5(0x1f3))throw new Error(_0x5682e5(0x1dc));return _0x4e37ec;}export function writeGuidesToProject(_0x3d66f6,_0x2f834b,_0xa99644=a189_0x484aae(0x1eb),_0x5b000a){const _0x4ce292=a189_0x484aae,_0xf80e8=join(_0x2f834b,_0xa99644);mkdirSync(_0xf80e8,{'recursive':!![]});for(const [_0x2f3f81,_0x411b64]of Object[_0x4ce292(0x1e1)](_0x3d66f6[_0x4ce292(0x1e6)])){let _0x297825=_0x411b64[_0x4ce292(0x1dd)];_0x411b64[_0x4ce292(0x1ec)]&&(_0x297825=appendUpdateTime(_0x297825,_0x411b64['lastUpdated'])),writeFileSync(join(_0xf80e8,_0x2f3f81+_0x4ce292(0x1e4)),_0x297825,_0x4ce292(0x1de));}}function a189_0x3649(){const _0x40e638=['length','1340025rcFxSz','trimEnd','4WfiIWn','replace','CDN\x20返回数据格式错误','content','utf-8','keys','statusText','entries','CDN\x20数据中缺少\x20skillTemplate','application/json','.md','title','guides','map','16dSZOAE','push','extendContent','.lovrabet/skill/guides','lastUpdated','skillTemplate','30dxGDeA','340923QDaDWq','66394pTGFzf','json','\x0a\x0a>更新时间:','object','join','1890TdtjTL','114YKhzre','14317416HjJzHw','status','2035926gKFfdK','.lovrabet','1179HswrJa','105413mDFWgx'];a189_0x3649=function(){return _0x40e638;};return a189_0x3649();}export function appendUpdateTime(_0x260e1b,_0x585ea2){const _0x530fa6=a189_0x484aae;return _0x260e1b=_0x260e1b[_0x530fa6(0x1db)](/\n*>更新时间:.*$/m,''),_0x260e1b[_0x530fa6(0x1ff)]()+(_0x530fa6(0x1f2)+_0x585ea2);}export function getSkillTemplate(_0x5267c9){const _0x23dd4e=a189_0x484aae;return _0x5267c9['skillTemplate']?.[_0x23dd4e(0x1dd)]||'';}export function appendExtendContents(_0x2fad50,_0x501c69,_0x2d45c1){const _0x201adc=a189_0x484aae,_0x1eb4d9=[];for(const [,_0x24db6b]of Object[_0x201adc(0x1e1)](_0x501c69[_0x201adc(0x1e6)])){_0x24db6b[_0x201adc(0x1ea)]&&_0x1eb4d9[_0x201adc(0x1e9)](_0x24db6b[_0x201adc(0x1ea)][_0x201adc(0x1ff)]());}if(_0x1eb4d9['length']===0x0)return _0x2fad50;return _0x2fad50[_0x201adc(0x1ff)]()+'\x0a\x0a'+_0x1eb4d9[_0x201adc(0x1f4)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x49b8c9,_0x4bfd26,_0x236073){const _0x3884db=a189_0x484aae,_0x1a8d16=getSkillTemplate(_0x49b8c9);if(!_0x1a8d16)throw new Error(_0x3884db(0x1e2));const _0x27aaa8=dirname(_0x4bfd26);mkdirSync(_0x27aaa8,{'recursive':!![]});let _0x16f7cd=_0x1a8d16[_0x3884db(0x1db)](/\{\{IDE_NAME\}\}/g,_0x236073);_0x16f7cd=appendExtendContents(_0x16f7cd,_0x49b8c9),_0x49b8c9[_0x3884db(0x1ed)][_0x3884db(0x1ec)]&&(_0x16f7cd=appendUpdateTime(_0x16f7cd,_0x49b8c9[_0x3884db(0x1ed)][_0x3884db(0x1ec)])),writeFileSync(_0x4bfd26,_0x16f7cd,'utf-8');}export async function installGuides(_0x30a6fb){const _0x1a5053=a189_0x484aae,_0x47a74c=await fetchGuidesFromCDN();return writeGuidesToProject(_0x47a74c,_0x30a6fb),Object[_0x1a5053(0x1df)](_0x47a74c[_0x1a5053(0x1e6)])[_0x1a5053(0x1fd)];}export function getGuidesSummary(_0x4b19a4){const _0x5805a8=a189_0x484aae;return Object[_0x5805a8(0x1e1)](_0x4b19a4[_0x5805a8(0x1e6)])[_0x5805a8(0x1e7)](([_0x2f2202,_0x4ffe37])=>({'key':_0x2f2202,'title':_0x4ffe37[_0x5805a8(0x1e5)],'path':_0x4ffe37['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x298e6e,_0x3c2c69){const _0x57588b=a190_0x5891,_0x4390bf=_0x298e6e();while(!![]){try{const _0x1bd8f6=parseInt(_0x57588b(0x1ec))/0x1*(-parseInt(_0x57588b(0x1f6))/0x2)+-parseInt(_0x57588b(0x1ff))/0x3*(-parseInt(_0x57588b(0x1fd))/0x4)+-parseInt(_0x57588b(0x1f1))/0x5+parseInt(_0x57588b(0x1ea))/0x6+parseInt(_0x57588b(0x203))/0x7*(-parseInt(_0x57588b(0x1f2))/0x8)+-parseInt(_0x57588b(0x206))/0x9*(-parseInt(_0x57588b(0x1e8))/0xa)+parseInt(_0x57588b(0x1ee))/0xb;if(_0x1bd8f6===_0x3c2c69)break;else _0x4390bf['push'](_0x4390bf['shift']());}catch(_0x22aac9){_0x4390bf['push'](_0x4390bf['shift']());}}}(a190_0x3074,0x4513d));export async function httpRequest(_0x53e36b,_0x33d96f={}){const _0x106081=a190_0x5891,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x33d96f;let _0x1afd67=null;for(let _0x1ccec8=0x0;_0x1ccec8<=retries;_0x1ccec8++){try{const _0x28b344=new AbortController(),_0x3a95d4=setTimeout(()=>_0x28b344[_0x106081(0x1f4)](),timeout),_0x30f057=await fetch(_0x53e36b,{'headers':headers,'signal':_0x28b344[_0x106081(0x1fe)]});clearTimeout(_0x3a95d4);let _0x1c4de1;const _0x24a6e2=_0x30f057['headers']['get'](_0x106081(0x1f8));return _0x24a6e2?.['includes'](_0x106081(0x1eb))?_0x1c4de1=await _0x30f057[_0x106081(0x1f0)]():_0x1c4de1=await _0x30f057[_0x106081(0x1e9)](),{'ok':_0x30f057['ok'],'status':_0x30f057[_0x106081(0x1fb)],'statusText':_0x30f057['statusText'],'data':_0x1c4de1,'headers':_0x30f057[_0x106081(0x1f9)],'url':_0x30f057[_0x106081(0x200)],'text':()=>_0x30f057[_0x106081(0x1e9)]()};}catch(_0x5e9507){_0x1afd67=_0x5e9507 instanceof Error?_0x5e9507:new Error(String(_0x5e9507));if(_0x1ccec8===retries)break;if(shouldRetry(_0x5e9507)){console[_0x106081(0x204)](_0x106081(0x1ed)+retryDelay+'ms\x20后进行第\x20'+(_0x1ccec8+0x1)+_0x106081(0x1f5)),await sleep(retryDelay);continue;}else break;}}throw _0x1afd67||new Error(_0x106081(0x1fc));}function shouldRetry(_0x438f6f){const _0x54add0=a190_0x5891;if(_0x438f6f instanceof Error){if(_0x438f6f[_0x54add0(0x1ef)]===_0x54add0(0x1f3))return![];if(_0x438f6f[_0x54add0(0x1ef)]===_0x54add0(0x202)&&_0x438f6f['message'][_0x54add0(0x205)]('fetch'))return!![];if(_0x438f6f[_0x54add0(0x1fa)][_0x54add0(0x205)](_0x54add0(0x201)))return!![];if(_0x438f6f['message'][_0x54add0(0x205)](_0x54add0(0x1f7)))return![];}return![];}function sleep(_0x1a3c77){return new Promise(_0x2475aa=>setTimeout(_0x2475aa,_0x1a3c77));}function a190_0x5891(_0x514f10,_0x520ec1){_0x514f10=_0x514f10-0x1e8;const _0x307461=a190_0x3074();let _0x5891ea=_0x307461[_0x514f10];return _0x5891ea;}export function validateUrl(_0x2d271b){try{return new URL(_0x2d271b),!![];}catch{return![];}}function a190_0x3074(){const _0x5b066a=['json','1405115kJDGru','224NjiIIp','AbortError','abort','\x20次重试...','509098tzpbDt','ENOTFOUND','content-type','headers','message','status','Request\x20failed','32qZyfVp','signal','107496xxPHnJ','url','ECONNRESET','TypeError','85645qBoCRr','log','includes','27pFbfsR','359410aBcWPA','text','2168718dDvnCW','application/json','2NuhQzJ','*\x20请求失败,','7256810kIqWRH','name'];a190_0x3074=function(){return _0x5b066a;};return a190_0x3074();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a191_0x21a1(_0x4ae5c4,_0x278002){_0x4ae5c4=_0x4ae5c4-0x181;const _0x265150=a191_0x2651();let _0x21a1c5=_0x265150[_0x4ae5c4];return _0x21a1c5;}function a191_0x2651(){const _0x4c359c=['9234036NtNeik','2460OtjVtM','nonInteractive','stdin','284WZlfot','497FjPTaw','1231703CNfTuk','stdout','true','208KqZHtO','388586qGTQtL','160FqMjCA','isTTY','isRaw','5211472fGeHHY','18325WldtLF','12246DvhLEg'];a191_0x2651=function(){return _0x4c359c;};return a191_0x2651();}(function(_0x4ceb5b,_0x318346){const _0x2a0c2a=a191_0x21a1,_0x38f050=_0x4ceb5b();while(!![]){try{const _0x430e18=parseInt(_0x2a0c2a(0x189))/0x1+parseInt(_0x2a0c2a(0x188))/0x2*(parseInt(_0x2a0c2a(0x18f))/0x3)+-parseInt(_0x2a0c2a(0x183))/0x4*(parseInt(_0x2a0c2a(0x18e))/0x5)+parseInt(_0x2a0c2a(0x191))/0x6*(-parseInt(_0x2a0c2a(0x184))/0x7)+-parseInt(_0x2a0c2a(0x18d))/0x8+-parseInt(_0x2a0c2a(0x190))/0x9+-parseInt(_0x2a0c2a(0x18a))/0xa*(-parseInt(_0x2a0c2a(0x185))/0xb);if(_0x430e18===_0x318346)break;else _0x38f050['push'](_0x38f050['shift']());}catch(_0x1b2479){_0x38f050['push'](_0x38f050['shift']());}}}(a191_0x2651,0x9bbdf));function env(_0x80937b){return process.env[`RABETBASE_${_0x80937b}`]||process.env[`LOVRABET_${_0x80937b}`]||undefined;}export function isNonInteractive(_0x44ed04){const _0x448759=a191_0x21a1;return!!(_0x44ed04[_0x448759(0x181)]||_0x44ed04['ci']||env('CI')===_0x448759(0x187)||process.env.CI===_0x448759(0x187)||!process[_0x448759(0x186)][_0x448759(0x18b)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x4a7388=a191_0x21a1;if(!process[_0x4a7388(0x182)][_0x4a7388(0x18b)])return![];try{const _0xb8d83=process[_0x4a7388(0x182)][_0x4a7388(0x18c)];return process[_0x4a7388(0x182)]['setRawMode'](!![]),process[_0x4a7388(0x182)]['setRawMode'](_0xb8d83??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x2f3e6d=a192_0x3fb7;function a192_0x3c4a(){const _0x2af577=['toISOString','info','Failed\x20to\x20clear\x20logs:','duration','red','format','warn','rawCommand','success','unknown','message','map','File','combine','filter','1794359HaDdzz','logFilePath','readLogs','addColors','17505lYPELz','winstonLogger','开始执行:\x20','green','getWinstonInstance','clearLogs','16topwpB','2085635fcoHdt','setRawCommand','split','createLogger','完成:\x20','yellow','stringify','transports','失败:\x20','trim','join','setLogPath','blue','currentRawCommand','now','Failed\x20to\x20read\x20logs:','readFileSync','clear','8584776jRwYTv','1562136qgRGFq','error','mkdirSync','command','954502SFNXlN','utf8','76DBdCpz','timestamp','details','initWinstonLogger','414307vfUKrL','.lovrabet.log','existsSync'];a192_0x3c4a=function(){return _0x2af577;};return a192_0x3c4a();}(function(_0x3db5c1,_0x51a983){const _0x415df7=a192_0x3fb7,_0x4f5c86=_0x3db5c1();while(!![]){try{const _0x1cf682=-parseInt(_0x415df7(0x1cf))/0x1+-parseInt(_0x415df7(0x1c9))/0x2+-parseInt(_0x415df7(0x1e5))/0x3*(parseInt(_0x415df7(0x1cb))/0x4)+-parseInt(_0x415df7(0x1ec))/0x5+parseInt(_0x415df7(0x1c5))/0x6+parseInt(_0x415df7(0x1e1))/0x7*(parseInt(_0x415df7(0x1eb))/0x8)+parseInt(_0x415df7(0x1c4))/0x9;if(_0x1cf682===_0x51a983)break;else _0x4f5c86['push'](_0x4f5c86['shift']());}catch(_0x227d6b){_0x4f5c86['push'](_0x4f5c86['shift']());}}}(a192_0x3c4a,0x4b090));import a192_0x294632 from'winston';import a192_0xd695de from'node:fs';import a192_0x2f9090 from'node:path';function a192_0x3fb7(_0x2bf9bd,_0x22e57d){_0x2bf9bd=_0x2bf9bd-0x1c2;const _0x3c4ac6=a192_0x3c4a();let _0x3fb780=_0x3c4ac6[_0x2bf9bd];return _0x3fb780;}class Logger{[a192_0x2f3e6d(0x1e6)];[a192_0x2f3e6d(0x1e2)];[a192_0x2f3e6d(0x1f9)]='';constructor(){const _0xf919f6=a192_0x2f3e6d;this[_0xf919f6(0x1e2)]='';}[a192_0x2f3e6d(0x1ed)](_0x1aed6a){const _0x2684dc=a192_0x2f3e6d;this[_0x2684dc(0x1f9)]=_0x1aed6a;}[a192_0x2f3e6d(0x1ce)](){const _0x33cdb8=a192_0x2f3e6d,_0x16dd30=a192_0x2f9090['dirname'](this['logFilePath']);!a192_0xd695de[_0x33cdb8(0x1d1)](_0x16dd30)&&a192_0xd695de[_0x33cdb8(0x1c7)](_0x16dd30,{'recursive':!![]});const _0x27762e=a192_0x294632[_0x33cdb8(0x1d7)][_0x33cdb8(0x1df)](a192_0x294632['format'][_0x33cdb8(0x1cc)](),a192_0x294632[_0x33cdb8(0x1d7)]['errors']({'stack':!![]}),a192_0x294632['format']['printf'](_0x3144de=>{const _0x4c6b9d=_0x33cdb8,_0x5a64c4={'timestamp':_0x3144de[_0x4c6b9d(0x1cc)]||new Date()[_0x4c6b9d(0x1d2)](),'level':_0x3144de['level']||_0x4c6b9d(0x1d3),'command':_0x3144de[_0x4c6b9d(0x1c8)]||_0x4c6b9d(0x1db),'rawCommand':_0x3144de[_0x4c6b9d(0x1d9)]||this[_0x4c6b9d(0x1f9)]||undefined,'message':_0x3144de[_0x4c6b9d(0x1dc)]||'','duration':_0x3144de[_0x4c6b9d(0x1d5)]||undefined,'details':_0x3144de[_0x4c6b9d(0x1cd)]||undefined};return JSON[_0x4c6b9d(0x1f2)](_0x5a64c4);}));this[_0x33cdb8(0x1e6)]=a192_0x294632[_0x33cdb8(0x1ef)]({'level':_0x33cdb8(0x1d3),'format':_0x27762e,'transports':[new a192_0x294632[(_0x33cdb8(0x1f3))][(_0x33cdb8(0x1de))]({'filename':this[_0x33cdb8(0x1e2)],'level':'info'})],'silent':![]}),a192_0x294632[_0x33cdb8(0x1e4)]({'success':_0x33cdb8(0x1e8),'error':_0x33cdb8(0x1d6),'warn':_0x33cdb8(0x1f1),'info':_0x33cdb8(0x1f8)});}[a192_0x2f3e6d(0x1f7)](_0x209814){const _0x4683a2=a192_0x2f3e6d;this[_0x4683a2(0x1e2)]=a192_0x2f9090[_0x4683a2(0x1f6)](_0x209814,_0x4683a2(0x1d0)),this[_0x4683a2(0x1e6)]&&this['winstonLogger'][_0x4683a2(0x1c3)](),this[_0x4683a2(0x1ce)]();}[a192_0x2f3e6d(0x1d3)](_0x8fd862,_0x5bb09e,_0x5f46c4){const _0x132342=a192_0x2f3e6d;if(!this[_0x132342(0x1e2)]||!this[_0x132342(0x1e6)])return;this[_0x132342(0x1e6)][_0x132342(0x1d3)](_0x5bb09e,{'command':_0x8fd862,'details':_0x5f46c4});}[a192_0x2f3e6d(0x1da)](_0x3c5b3c,_0x545b92,_0x5aa044,_0x2e9bf1){const _0x203950=a192_0x2f3e6d;if(!this['logFilePath']||!this[_0x203950(0x1e6)])return;this[_0x203950(0x1e6)]['log']('info',_0x545b92,{'level':'success','command':_0x3c5b3c,'duration':_0x5aa044,'details':_0x2e9bf1});}['error'](_0x2ab848,_0x499309,_0x385b13){const _0x3d9347=a192_0x2f3e6d;if(!this[_0x3d9347(0x1e2)]||!this[_0x3d9347(0x1e6)])return;this[_0x3d9347(0x1e6)][_0x3d9347(0x1c6)](_0x499309,{'command':_0x2ab848,'details':_0x385b13});}[a192_0x2f3e6d(0x1d8)](_0x1fa87f,_0x27b124,_0x337998){const _0x465d68=a192_0x2f3e6d;if(!this[_0x465d68(0x1e2)]||!this[_0x465d68(0x1e6)])return;this[_0x465d68(0x1e6)][_0x465d68(0x1d8)](_0x27b124,{'command':_0x1fa87f,'details':_0x337998});}async['logTask'](_0x3f42ea,_0x45e43f,_0x56af79){const _0x4ed8a2=a192_0x2f3e6d,_0x3ec780=Date[_0x4ed8a2(0x1fa)]();this[_0x4ed8a2(0x1d3)](_0x3f42ea,_0x4ed8a2(0x1e7)+_0x45e43f);try{const _0xbe5353=await _0x56af79(),_0x3f5f97=Date[_0x4ed8a2(0x1fa)]()-_0x3ec780;return this[_0x4ed8a2(0x1da)](_0x3f42ea,_0x4ed8a2(0x1f0)+_0x45e43f,_0x3f5f97),_0xbe5353;}catch(_0x3cb8f0){const _0x27fcd3=Date[_0x4ed8a2(0x1fa)]()-_0x3ec780;this[_0x4ed8a2(0x1c6)](_0x3f42ea,_0x4ed8a2(0x1f4)+_0x45e43f,{'error':_0x3cb8f0 instanceof Error?_0x3cb8f0[_0x4ed8a2(0x1dc)]:String(_0x3cb8f0),'duration':_0x27fcd3});throw _0x3cb8f0;}}[a192_0x2f3e6d(0x1e3)](){const _0x14d9c9=a192_0x2f3e6d;try{if(!a192_0xd695de[_0x14d9c9(0x1d1)](this['logFilePath']))return[];const _0x847fe8=a192_0xd695de[_0x14d9c9(0x1c2)](this[_0x14d9c9(0x1e2)],_0x14d9c9(0x1ca));return _0x847fe8[_0x14d9c9(0x1ee)]('\x0a')[_0x14d9c9(0x1e0)](_0x3457d3=>_0x3457d3[_0x14d9c9(0x1f5)]())[_0x14d9c9(0x1dd)](_0x3e25fd=>JSON['parse'](_0x3e25fd));}catch(_0x10f412){return console[_0x14d9c9(0x1d8)](_0x14d9c9(0x1fb),_0x10f412),[];}}[a192_0x2f3e6d(0x1ea)](){const _0x48a785=a192_0x2f3e6d;try{a192_0xd695de[_0x48a785(0x1d1)](this[_0x48a785(0x1e2)])&&a192_0xd695de['writeFileSync'](this['logFilePath'],'',_0x48a785(0x1ca));}catch(_0x252964){console['warn'](_0x48a785(0x1d4),_0x252964);}}[a192_0x2f3e6d(0x1e9)](){const _0x132d25=a192_0x2f3e6d;return this[_0x132d25(0x1e6)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a193_0x1896(_0x4d3fd3,_0x1c73b9){_0x4d3fd3=_0x4d3fd3-0x8e;const _0x252f19=a193_0x252f();let _0x1896ca=_0x252f19[_0x4d3fd3];return _0x1896ca;}(function(_0x5598b5,_0x5ba9dd){const _0x2a8344=a193_0x1896,_0x206525=_0x5598b5();while(!![]){try{const _0x34c3be=-parseInt(_0x2a8344(0x8e))/0x1*(parseInt(_0x2a8344(0x8f))/0x2)+-parseInt(_0x2a8344(0x9c))/0x3+parseInt(_0x2a8344(0x95))/0x4*(parseInt(_0x2a8344(0x93))/0x5)+-parseInt(_0x2a8344(0x94))/0x6*(parseInt(_0x2a8344(0x9b))/0x7)+parseInt(_0x2a8344(0x9e))/0x8*(-parseInt(_0x2a8344(0x98))/0x9)+-parseInt(_0x2a8344(0x99))/0xa*(parseInt(_0x2a8344(0x96))/0xb)+parseInt(_0x2a8344(0x92))/0xc*(parseInt(_0x2a8344(0x97))/0xd);if(_0x34c3be===_0x5ba9dd)break;else _0x206525['push'](_0x206525['shift']());}catch(_0x288cef){_0x206525['push'](_0x206525['shift']());}}}(a193_0x252f,0xd5aa6));function a193_0x252f(){const _0x239b10=['12qWTjxi','70xSyfAQ','4015662ZwvaVx','128236EkgNqO','746988LortNR','69215263LauiPY','31959iiiBpO','230jBWWZb','Invalid\x20JSON\x20for\x20--params:\x20','7bJfLwP','1022343efFVxh','isArray','2720uFjSbN','617mrTcxi','3626KsOBvC','validation','parse'];a193_0x252f=function(){return _0x239b10;};return a193_0x252f();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x520691){const _0x3f52e3=a193_0x1896;if(!_0x520691)return undefined;let _0x4b8c87;try{_0x4b8c87=JSON[_0x3f52e3(0x91)](_0x520691);}catch{throw CliErrors[_0x3f52e3(0x90)](_0x3f52e3(0x9a)+_0x520691);}if(!_0x4b8c87||typeof _0x4b8c87!=='object'||Array[_0x3f52e3(0x9d)](_0x4b8c87))throw CliErrors[_0x3f52e3(0x90)]('--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x4b8c87;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a194_0x4980(_0x27f26e,_0x517e20){_0x27f26e=_0x27f26e-0x176;const _0x1ecdfb=a194_0x1ecd();let _0x49802d=_0x1ecdfb[_0x27f26e];return _0x49802d;}function a194_0x1ecd(){const _0x582fb1=['3218vghRSr','win32','4806648doaQxC','133IcIMQo','2718267vpGLtD','.cmd','9499734HpkrXI','2177368xtbGoa','52798440MGIHNJ','8868420KtgCga'];a194_0x1ecd=function(){return _0x582fb1;};return a194_0x1ecd();}const a194_0x41ebdb=a194_0x4980;(function(_0x4b471c,_0x147522){const _0x5f2ab8=a194_0x4980,_0x3341ac=_0x4b471c();while(!![]){try{const _0x296d71=-parseInt(_0x5f2ab8(0x176))/0x1*(parseInt(_0x5f2ab8(0x17d))/0x2)+-parseInt(_0x5f2ab8(0x177))/0x3+-parseInt(_0x5f2ab8(0x17a))/0x4+-parseInt(_0x5f2ab8(0x17c))/0x5+-parseInt(_0x5f2ab8(0x179))/0x6+-parseInt(_0x5f2ab8(0x17f))/0x7+parseInt(_0x5f2ab8(0x17b))/0x8;if(_0x296d71===_0x147522)break;else _0x3341ac['push'](_0x3341ac['shift']());}catch(_0x4adbe3){_0x3341ac['push'](_0x3341ac['shift']());}}}(a194_0x1ecd,0xd9b5c));export const isWindows=process['platform']===a194_0x41ebdb(0x17e);export function resolveNpmBin(_0x1622ed){const _0x3f2d0b=a194_0x41ebdb;return isWindows?_0x1622ed+_0x3f2d0b(0x178):_0x1622ed;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x1da88d=a195_0x42db;(function(_0x3ecba8,_0x10fcc5){const _0x22b576=a195_0x42db,_0x1478d2=_0x3ecba8();while(!![]){try{const _0x1bf5c1=-parseInt(_0x22b576(0x11e))/0x1*(parseInt(_0x22b576(0x10f))/0x2)+-parseInt(_0x22b576(0x116))/0x3*(-parseInt(_0x22b576(0x112))/0x4)+-parseInt(_0x22b576(0x121))/0x5+-parseInt(_0x22b576(0x113))/0x6+parseInt(_0x22b576(0x120))/0x7+parseInt(_0x22b576(0x122))/0x8+-parseInt(_0x22b576(0x11d))/0x9*(-parseInt(_0x22b576(0x11f))/0xa);if(_0x1bf5c1===_0x10fcc5)break;else _0x1478d2['push'](_0x1478d2['shift']());}catch(_0x57576e){_0x1478d2['push'](_0x1478d2['shift']());}}}(a195_0x1323,0xba417));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x4b016e=getTemplateBaseUrl();return _0x4b016e+'/rules/rules.json';}function a195_0x1323(){const _0x324641=['15108qhpGoB','本地模板文件不存在:\x20','status','3OuQSSN','content','lovrabet_rules.mdc','agents.md','json','lastUpdated','CDN\x20请求失败:\x20','9MXDcKe','1KnnWPd','13580380DtbTLC','2278640RgRNmc','4776850laYDUN','2380000lFZZMY','catch','statusText','utf-8','1966740pSLDCJ','../../templates/rules/lovrabet_rules.mdc.tpl','string','2892412UPEZxZ'];a195_0x1323=function(){return _0x324641;};return a195_0x1323();}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a195_0x1da88d(0x110));export async function fetchRulesFromCDN(){const _0x42b767=a195_0x1da88d,_0x465f78=getRulesCdnUrl(),_0x2389d8=await fetch(_0x465f78,{'headers':{'Accept':'application/json'}});if(!_0x2389d8['ok'])throw new Error(_0x42b767(0x11c)+_0x2389d8[_0x42b767(0x115)]+'\x20'+_0x2389d8[_0x42b767(0x124)]);const _0x305a88=await _0x2389d8[_0x42b767(0x11a)]();if(!_0x305a88[_0x42b767(0x117)]||typeof _0x305a88[_0x42b767(0x117)]!==_0x42b767(0x111))throw new Error('CDN\x20返回数据格式错误');return _0x305a88;}export async function getRulesContent(){const _0x531316=a195_0x1da88d;try{const _0x1a8b7a=await fetchRulesFromCDN();return _0x1a8b7a[_0x531316(0x117)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x4e8f95=a195_0x1da88d;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x4e8f95(0x125));throw new Error(_0x4e8f95(0x114)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x2a1a77){const _0x1f1340=a195_0x1da88d,_0x499945=await fetchRulesFromCDN()[_0x1f1340(0x123)](()=>null);let _0x3c5465;_0x499945?(_0x3c5465=_0x499945[_0x1f1340(0x117)],_0x499945[_0x1f1340(0x11b)]&&(_0x3c5465=appendUpdateTime(_0x3c5465,_0x499945['lastUpdated']))):_0x3c5465=readLocalTemplate();const _0x180628=dirname(_0x2a1a77);!existsSync(_0x180628)&&mkdirSync(_0x180628,{'recursive':!![]}),writeFileSync(_0x2a1a77,_0x3c5465,'utf-8');}export async function copyRulesToCursor(_0x251631){const _0x5ec827=a195_0x1da88d,_0x553272=join(_0x251631,'.cursor/rules'),_0x3d6a16=join(_0x553272,_0x5ec827(0x118));if(existsSync(_0x3d6a16))return![];return await writeRulesFile(_0x3d6a16),!![];}function a195_0x42db(_0x37f8a3,_0x4ec20c){_0x37f8a3=_0x37f8a3-0x10f;const _0x13237b=a195_0x1323();let _0x42db06=_0x13237b[_0x37f8a3];return _0x42db06;}export async function copyRulesToAgentsMd(_0x27aa81){const _0x28f863=a195_0x1da88d,_0x34a9d5=join(_0x27aa81,_0x28f863(0x119));if(existsSync(_0x34a9d5))return![];return await writeRulesFile(_0x34a9d5),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x3cebc7){return new Promise(_0x22858b=>setTimeout(_0x22858b,_0x3cebc7));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a197_0x138a(_0xbcfb57,_0x1f435e){_0xbcfb57=_0xbcfb57-0x6f;const _0xd2ebb7=a197_0xd2eb();let _0x138aa1=_0xd2ebb7[_0xbcfb57];return _0x138aa1;}const a197_0x4c18dc=a197_0x138a;(function(_0x17b0dd,_0x1b0455){const _0x51a6b1=a197_0x138a,_0x522b04=_0x17b0dd();while(!![]){try{const _0x5a921d=-parseInt(_0x51a6b1(0x71))/0x1*(-parseInt(_0x51a6b1(0x74))/0x2)+-parseInt(_0x51a6b1(0xa2))/0x3+parseInt(_0x51a6b1(0xa8))/0x4*(-parseInt(_0x51a6b1(0xa3))/0x5)+-parseInt(_0x51a6b1(0xa7))/0x6+parseInt(_0x51a6b1(0x9b))/0x7*(parseInt(_0x51a6b1(0x8e))/0x8)+parseInt(_0x51a6b1(0x79))/0x9+-parseInt(_0x51a6b1(0xa5))/0xa*(parseInt(_0x51a6b1(0x93))/0xb);if(_0x5a921d===_0x1b0455)break;else _0x522b04['push'](_0x522b04['shift']());}catch(_0x1b0927){_0x522b04['push'](_0x522b04['shift']());}}}(a197_0xd2eb,0xddb5d));import a197_0x4818de from'node:fs';import a197_0x373aef from'node:path';import{logger}from'../utils/logger.js';function a197_0xd2eb(){const _0x4512b0=['replace','getFullYear','processFile','开始处理模板内容替换','.ts','40KNHbhs','.tsx','readdir','tableName:\x20\x22','toISOString','2277tRJqTx','\x20},','split','replaceContent','processTemplate','formatLocalTimestamp','getMinutes','replaceApiContent','877163DkgwlE','template','readFile','promises','toUpperCase','.jsx','toDisplayTitle','1217700DPBWdF','15chblso','push','670eDJJjU','endsWith','2077632cvfFmI','986156GOJBSG','tableName','pad','error','.css','toComponentName','isDirectory','getSeconds','slice','.js','30ZEoDCJ','charAt','mkdir','82028apdgoe','pop','utf8','map','.scss','5011362xXjdRx','message','getDate','name','模板内容替换失败','processDirectory','.tpl','toLowerCase','alias','now','datasetCode:\x20\x22','includes','getMonth','copyFile','join','writeFile'];a197_0xd2eb=function(){return _0x4512b0;};return a197_0xd2eb();}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x409694){return String(_0x409694)['padStart'](0x2,'0');}static['formatLocalTimestamp'](_0x528188){const _0xbc82a=a197_0x138a,_0x566352=_0x528188[_0xbc82a(0x8a)](),_0x6c00fa=this[_0xbc82a(0xaa)](_0x528188[_0xbc82a(0x85)]()+0x1),_0x4699fc=this[_0xbc82a(0xaa)](_0x528188[_0xbc82a(0x7b)]()),_0x3caa12=this[_0xbc82a(0xaa)](_0x528188['getHours']()),_0x3689cb=this['pad'](_0x528188[_0xbc82a(0x99)]()),_0x48f7ee=this[_0xbc82a(0xaa)](_0x528188[_0xbc82a(0xaf)]());return{'createdAt':_0x566352+'-'+_0x6c00fa+'-'+_0x4699fc+'\x20'+_0x3caa12+':'+_0x3689cb+':'+_0x48f7ee,'createdDate':_0x566352+'-'+_0x6c00fa+'-'+_0x4699fc,'createdTime':_0x3caa12+':'+_0x3689cb+':'+_0x48f7ee};}static[a197_0x4c18dc(0xad)](_0x516485){const _0x56d794=a197_0x4c18dc,_0x4bc301=_0x516485[_0x56d794(0x95)]('/')['pop']()||_0x516485;return _0x4bc301[_0x56d794(0x95)]('-')[_0x56d794(0x77)](_0x24deb4=>_0x24deb4[_0x56d794(0x72)](0x0)[_0x56d794(0x9f)]()+_0x24deb4['slice'](0x1)[_0x56d794(0x80)]())['join']('');}static[a197_0x4c18dc(0xa1)](_0x335efb){const _0x317ef8=a197_0x4c18dc,_0x2fd923=_0x335efb[_0x317ef8(0x95)]('/')[_0x317ef8(0x75)]()||_0x335efb;return _0x2fd923[_0x317ef8(0x95)]('-')[_0x317ef8(0x77)](_0x1a1d5e=>_0x1a1d5e[_0x317ef8(0x72)](0x0)[_0x317ef8(0x9f)]()+_0x1a1d5e[_0x317ef8(0x6f)](0x1)[_0x317ef8(0x80)]())[_0x317ef8(0x87)]('\x20');}static[a197_0x4c18dc(0x96)](_0x41c5f8,_0x322ecb,_0x36f5b9){const _0x509399=a197_0x4c18dc,_0x5aaae2=this[_0x509399(0xad)](_0x322ecb),_0x1acb75=this[_0x509399(0xa1)](_0x322ecb),{createdAt:_0x305947,createdDate:_0x3b4a28,createdTime:_0x90471a}=this[_0x509399(0x98)](new Date());let _0x478b1a=_0x41c5f8[_0x509399(0x89)](/\{CliVersion\}/g,CLI_VERSION)[_0x509399(0x89)](/\{ComponentName\}/g,_0x5aaae2)[_0x509399(0x89)](/\{DisplayTitle\}/g,_0x1acb75)[_0x509399(0x89)](/\{PageName\}/g,_0x322ecb)[_0x509399(0x89)](/\{TemplateName\}/g,_0x36f5b9)[_0x509399(0x89)](/\{CreatedAt\}/g,_0x305947)[_0x509399(0x89)](/\{CreatedDate\}/g,_0x3b4a28)[_0x509399(0x89)](/\{CreatedTime\}/g,_0x90471a);return _0x478b1a;}static[a197_0x4c18dc(0x9a)](_0x1930c3,_0x375965,_0x3be8ec,_0x10bf10,_0x4c7c66,_0xa44653,_0x16559f,_0x32a991){const _0x5af90c=a197_0x4c18dc,_0x4eb02c=new Date(),_0x4d5073=_0x4eb02c[_0x5af90c(0x92)](),_0x4bd6c2=_0x3be8ec[_0x5af90c(0x77)](_0x3c8624=>{const _0x324068=_0x5af90c,_0x4bd64c=[_0x324068(0x83)+_0x3c8624['datasetCode']+'\x22',_0x324068(0x91)+_0x3c8624[_0x324068(0xa9)]+'\x22','name:\x20\x22'+_0x3c8624[_0x324068(0x7c)]+'\x22'];return _0x3c8624['alias']&&_0x4bd64c[_0x324068(0xa4)]('alias:\x20\x22'+_0x3c8624[_0x324068(0x81)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x4bd64c[_0x324068(0x87)](',\x20')+_0x324068(0x94);})[_0x5af90c(0x87)](''),_0x2d402b=_0x10bf10||_0x3be8ec[0x0]?.['alias']||'YourModel';let _0x3a0055=_0x1930c3['replace'](/\{AppCode\}/g,_0x375965)[_0x5af90c(0x89)](/\{ModelConfigs\}/g,_0x4bd6c2)['replace'](/\{ExampleModelName\}/g,_0x2d402b)['replace'](/\{ApiFileName\}/g,_0x4c7c66||'api')['replace'](/\{ConfigName\}/g,_0xa44653||'default')[_0x5af90c(0x89)](/\{ClientConfigParam\}/g,_0x16559f||'')[_0x5af90c(0x89)](/\{VarPrefix\}/g,_0x32a991||'LOVRABET')[_0x5af90c(0x89)](/\{CreatedAt\}/g,_0x4d5073);return _0x3a0055;}static async[a197_0x4c18dc(0x97)](_0x1e6459,_0x163e66,_0x404880,_0xc2aed5,_0x575597=!![]){const _0x5d048d=a197_0x4c18dc,_0x3e3985=Date[_0x5d048d(0x82)]();try{_0x575597&&logger['info'](_0x5d048d(0x9c),_0x5d048d(0x8c),{'templatePath':_0x1e6459,'targetPath':_0x163e66,'pageName':_0x404880,'templateName':_0xc2aed5});await a197_0x4818de[_0x5d048d(0x9e)][_0x5d048d(0x73)](_0x163e66,{'recursive':!![]}),await this['processDirectory'](_0x1e6459,_0x163e66,_0x404880,_0xc2aed5);if(_0x575597){const _0x21e70a=Date['now']()-_0x3e3985;logger['success'](_0x5d048d(0x9c),'模板内容替换完成',_0x21e70a,{'pageName':_0x404880,'templateName':_0xc2aed5});}}catch(_0xa3bedc){if(_0x575597){const _0x200ee3=Date[_0x5d048d(0x82)]()-_0x3e3985;logger[_0x5d048d(0xab)](_0x5d048d(0x9c),_0x5d048d(0x7d),{'templatePath':_0x1e6459,'targetPath':_0x163e66,'pageName':_0x404880,'templateName':_0xc2aed5,'error':_0xa3bedc instanceof Error?_0xa3bedc[_0x5d048d(0x7a)]:String(_0xa3bedc),'duration':_0x200ee3});}throw _0xa3bedc;}}static async[a197_0x4c18dc(0x7e)](_0x49ebcf,_0x28f9b5,_0x44f727,_0x5a9c8d){const _0x3ce448=a197_0x4c18dc,_0x5856a1=await a197_0x4818de[_0x3ce448(0x9e)][_0x3ce448(0x90)](_0x49ebcf,{'withFileTypes':!![]});for(const _0xc3f826 of _0x5856a1){const _0x273067=a197_0x373aef['join'](_0x49ebcf,_0xc3f826[_0x3ce448(0x7c)]);let _0x36a61c=a197_0x373aef[_0x3ce448(0x87)](_0x28f9b5,_0xc3f826[_0x3ce448(0x7c)]);_0xc3f826[_0x3ce448(0x7c)][_0x3ce448(0xa6)]('.tpl')&&(_0x36a61c=a197_0x373aef[_0x3ce448(0x87)](_0x28f9b5,_0xc3f826[_0x3ce448(0x7c)]['replace'](/\.tpl$/,'')));if(_0xc3f826[_0x3ce448(0xae)]())await a197_0x4818de[_0x3ce448(0x9e)][_0x3ce448(0x73)](_0x36a61c,{'recursive':!![]}),await this[_0x3ce448(0x7e)](_0x273067,_0x36a61c,_0x44f727,_0x5a9c8d);else _0xc3f826['isFile']()&&await this['processFile'](_0x273067,_0x36a61c,_0x44f727,_0x5a9c8d);}}static async[a197_0x4c18dc(0x8b)](_0x2af42a,_0x2f7872,_0x3d9188,_0x4eff36){const _0x56e897=a197_0x4c18dc,_0x2a1eba=a197_0x373aef['extname'](_0x2af42a)[_0x56e897(0x80)]();_0x2af42a['endsWith']('.tpl')&&(_0x2f7872=_0x2f7872[_0x56e897(0x89)](/\.tpl$/,''));const _0x28b5db=[_0x56e897(0x8f),_0x56e897(0x8d),_0x56e897(0xa0),_0x56e897(0x70),'.json','.md',_0x56e897(0xac),_0x56e897(0x78),_0x56e897(0x7f)];if(_0x28b5db[_0x56e897(0x84)](_0x2a1eba)||_0x2af42a[_0x56e897(0xa6)](_0x56e897(0x7f))){const _0x341aea=await a197_0x4818de[_0x56e897(0x9e)][_0x56e897(0x9d)](_0x2af42a,_0x56e897(0x76)),_0x395f7e=this[_0x56e897(0x96)](_0x341aea,_0x3d9188,_0x4eff36);await a197_0x4818de[_0x56e897(0x9e)][_0x56e897(0x88)](_0x2f7872,_0x395f7e,_0x56e897(0x76));}else await a197_0x4818de[_0x56e897(0x9e)][_0x56e897(0x86)](_0x2af42a,_0x2f7872);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d0516,_0x2f8c03){var _0xdf086c=a198_0x7aed,_0x39881a=_0x5d0516();while(!![]){try{var _0x4e2f55=parseInt(_0xdf086c(0x8c))/0x1*(parseInt(_0xdf086c(0x87))/0x2)+parseInt(_0xdf086c(0x8d))/0x3*(parseInt(_0xdf086c(0x85))/0x4)+parseInt(_0xdf086c(0x8b))/0x5*(parseInt(_0xdf086c(0x86))/0x6)+-parseInt(_0xdf086c(0x8e))/0x7*(parseInt(_0xdf086c(0x88))/0x8)+-parseInt(_0xdf086c(0x84))/0x9+-parseInt(_0xdf086c(0x89))/0xa+parseInt(_0xdf086c(0x8a))/0xb;if(_0x4e2f55===_0x2f8c03)break;else _0x39881a['push'](_0x39881a['shift']());}catch(_0x4a33cb){_0x39881a['push'](_0x39881a['shift']());}}}(a198_0x10c4,0xad049));function a198_0x7aed(_0x5efee4,_0x358662){_0x5efee4=_0x5efee4-0x84;var _0x10c427=a198_0x10c4();var _0x7aed2b=_0x10c427[_0x5efee4];return _0x7aed2b;}function a198_0x10c4(){var _0x5614e0=['6rTEACu','8IysNLD','5803400ZWQFVD','644776CkYyIJ','10BXRAhp','114451hoPcGJ','21SRYUJl','1741831rrLTbn','12729591TThKmj','673048zVRQiY','4117350ZNhxVE'];a198_0x10c4=function(){return _0x5614e0;};return a198_0x10c4();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b9dfc,_0x5b00d6){var _0xda1fbf=a199_0x2204,_0x285690=_0x1b9dfc();while(!![]){try{var _0x1e4253=parseInt(_0xda1fbf(0x177))/0x1+parseInt(_0xda1fbf(0x173))/0x2*(-parseInt(_0xda1fbf(0x171))/0x3)+parseInt(_0xda1fbf(0x175))/0x4*(-parseInt(_0xda1fbf(0x176))/0x5)+-parseInt(_0xda1fbf(0x172))/0x6+parseInt(_0xda1fbf(0x174))/0x7+parseInt(_0xda1fbf(0x170))/0x8*(-parseInt(_0xda1fbf(0x16f))/0x9)+parseInt(_0xda1fbf(0x16e))/0xa;if(_0x1e4253===_0x5b00d6)break;else _0x285690['push'](_0x285690['shift']());}catch(_0xb3b339){_0x285690['push'](_0x285690['shift']());}}}(a199_0x1115,0xd10cc));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a199_0x1115(){var _0x333ebd=['15digIzk','648526QXUIXY','32187560ORZyHh','2230803sWIoBi','16skTeAU','7941CQlllM','10271148IyIOPM','986FkFEim','4694823eKdNJa','225520FoIYHq'];a199_0x1115=function(){return _0x333ebd;};return a199_0x1115();}function a199_0x2204(_0x54f59d,_0x137fdb){_0x54f59d=_0x54f59d-0x16e;var _0x111580=a199_0x1115();var _0x2204fb=_0x111580[_0x54f59d];return _0x2204fb;}export async function withActiveCookie(_0x3beb38,_0x1d7ed6){setActiveCookie(_0x3beb38);try{return await _0x1d7ed6();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d695e,_0x4a71d2){var _0x9e01aa=a200_0x3eb7,_0x1a36ac=_0x3d695e();while(!![]){try{var _0x2841a1=parseInt(_0x9e01aa(0x19e))/0x1+parseInt(_0x9e01aa(0x1a1))/0x2+parseInt(_0x9e01aa(0x1a6))/0x3+-parseInt(_0x9e01aa(0x1a9))/0x4*(-parseInt(_0x9e01aa(0x19f))/0x5)+-parseInt(_0x9e01aa(0x1a0))/0x6*(parseInt(_0x9e01aa(0x1a5))/0x7)+-parseInt(_0x9e01aa(0x1a7))/0x8*(-parseInt(_0x9e01aa(0x1a4))/0x9)+-parseInt(_0x9e01aa(0x1a2))/0xa*(parseInt(_0x9e01aa(0x1a8))/0xb);if(_0x2841a1===_0x4a71d2)break;else _0x1a36ac['push'](_0x1a36ac['shift']());}catch(_0x585507){_0x1a36ac['push'](_0x1a36ac['shift']());}}}(a200_0x4d03,0x99585));function a200_0x3eb7(_0x408ec7,_0x26b29a){_0x408ec7=_0x408ec7-0x19d;var _0x4d030d=a200_0x4d03();var _0x3eb793=_0x4d030d[_0x408ec7];return _0x3eb793;}function a200_0x4d03(){var _0x57a49a=['20gXIrFp','stderr','20379XKeFrf','815635ivWqve','506658fSkgOH','2488130nExIuD','310pcVEoV','write','1251Xcbdqd','42mRwOua','3730956UYDklV','52824ztruQi','1102409fiZMCm'];a200_0x4d03=function(){return _0x57a49a;};return a200_0x4d03();}export function writeCliSideChannelLine(_0x398606){var _0x340a56=a200_0x3eb7;process[_0x340a56(0x19d)][_0x340a56(0x1a3)](_0x398606+'\x0a');}
|