@lovrabet/rabetbase-cli 2.3.14 → 2.3.15-beta.1
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/restore.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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.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/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a247_0xf5322d=a247_0x424a;function a247_0x424a(_0x27022c,_0x1d2970){_0x27022c=_0x27022c-0x1ee;const _0x8c9473=a247_0x8c94();let _0x424ab5=_0x8c9473[_0x27022c];return _0x424ab5;}(function(_0x101e5f,_0x599e7e){const _0x2396e2=a247_0x424a,_0x2592b2=_0x101e5f();while(!![]){try{const _0x437372=-parseInt(_0x2396e2(0x207))/0x1+parseInt(_0x2396e2(0x1f5))/0x2*(parseInt(_0x2396e2(0x1ef))/0x3)+-parseInt(_0x2396e2(0x209))/0x4+parseInt(_0x2396e2(0x210))/0x5*(parseInt(_0x2396e2(0x20e))/0x6)+parseInt(_0x2396e2(0x1fb))/0x7+-parseInt(_0x2396e2(0x1fc))/0x8+-parseInt(_0x2396e2(0x1f7))/0x9*(parseInt(_0x2396e2(0x20c))/0xa);if(_0x437372===_0x599e7e)break;else _0x2592b2['push'](_0x2592b2['shift']());}catch(_0x5070e1){_0x2592b2['push'](_0x2592b2['shift']());}}}(a247_0x8c94,0xf0b8b));import a247_0x129a96 from'node:fs';import a247_0x15cc67 from'node:path';import a247_0x58e139 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a247_0xf5322d(0x1ee);function a247_0x8c94(){const _0x452792=['14772kteALm','needsUpgrade','3745TLACJt','@lovrabet/sdk','stableVersion','1.2.0','73257uMWYMq','utf-8','utf8','sdk','\x20\x20\x20Upgrade\x20command:\x20','all','126XnbEZB','existsSync','9gGcSYd','package.json','\x1b[33m','\x20\x20\x20Stable\x20version:\x20','11688369AvFPKa','2108624FqZqnB','parse','\x20\x20\x20Current\x20version:\x20','dependencies','log','coerce','readFileSync','\x1b[1m','join','devDependencies','minVersion','517833PIWvcV','test','1607156HMFCEL','node','version','28830070kVtRiV','↪\x20SDK\x20update\x20available'];a247_0x8c94=function(){return _0x452792;};return a247_0x8c94();}function isNonNumericVersion(_0x3bc7d7){const _0x45d154=a247_0xf5322d,_0x52b205=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x52b205['some'](_0x29962c=>_0x29962c[_0x45d154(0x208)](_0x3bc7d7));}function getInstalledVersion(_0x4cb4a2,_0x55778a){const _0x400623=a247_0xf5322d;try{const _0x19ae5c=a247_0x15cc67['join'](_0x4cb4a2,'node_modules',_0x55778a,'package.json');if(a247_0x129a96[_0x400623(0x1f6)](_0x19ae5c)){const _0x5ca8fc=JSON[_0x400623(0x1fd)](a247_0x129a96[_0x400623(0x202)](_0x19ae5c,_0x400623(0x1f0)));return _0x5ca8fc[_0x400623(0x20b)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x40978e=a247_0xf5322d;try{const _0x466e73=await getCdnConfig();return _0x466e73?.['sdk']?.[_0x40978e(0x20a)]?.[_0x40978e(0x212)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x383171=a247_0xf5322d;try{const _0x17521b=await getCdnConfig();return _0x17521b?.[_0x383171(0x1f2)]?.[_0x383171(0x20a)]?.['packageName']||_0x383171(0x211);}catch{return _0x383171(0x211);}}export async function checkSdkVersion(_0x4080f9){const _0x490dde=a247_0xf5322d,_0x5e5aa1=a247_0x15cc67[_0x490dde(0x204)](_0x4080f9,'package.json'),[_0x3c3318,_0x5c22f3]=await Promise[_0x490dde(0x1f4)]([getSdkStableVersion(),getSdkPackageName()]),_0xeebe12=_0x3c3318||FALLBACK_MIN_SDK_VERSION;if(!a247_0x129a96[_0x490dde(0x1f6)](_0x5e5aa1))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xeebe12,'packageName':_0x5c22f3,'stableVersion':_0x3c3318};try{const _0x51f512=JSON[_0x490dde(0x1fd)](a247_0x129a96[_0x490dde(0x202)](_0x5e5aa1,_0x490dde(0x1f1))),_0x7bc165=_0x51f512[_0x490dde(0x1ff)]||{},_0x328b0f=_0x51f512[_0x490dde(0x205)]||{},_0x2249e2=_0x7bc165[_0x5c22f3]||_0x328b0f[_0x5c22f3];if(!_0x2249e2)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xeebe12,'packageName':_0x5c22f3,'stableVersion':_0x3c3318};let _0x151331=getInstalledVersion(_0x4080f9,_0x5c22f3);!_0x151331&&(_0x151331=_0x2249e2);if(isNonNumericVersion(_0x2249e2))return{'installed':!![],'version':_0x151331,'needsUpgrade':![],'minVersion':_0xeebe12,'packageName':_0x5c22f3,'stableVersion':_0x3c3318};const _0x53cc70=a247_0x58e139['coerce'](_0x151331),_0x3f089f=a247_0x58e139['coerce'](_0xeebe12),_0x45302b=_0x53cc70&&_0x3f089f?a247_0x58e139['lt'](_0x53cc70,_0x3f089f):![];return{'installed':!![],'version':_0x151331,'needsUpgrade':_0x45302b,'minVersion':_0xeebe12,'packageName':_0x5c22f3,'stableVersion':_0x3c3318};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xeebe12,'packageName':_0x5c22f3,'stableVersion':_0x3c3318};}}export function checkSdkVersionSync(_0x2d5ff4){const _0x2c3cec=a247_0xf5322d,_0x2775ce=a247_0x15cc67['join'](_0x2d5ff4,_0x2c3cec(0x1f8)),_0x25b0ee=_0x2c3cec(0x211);if(!a247_0x129a96[_0x2c3cec(0x1f6)](_0x2775ce))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x25b0ee,'stableVersion':null};try{const _0x5add27=JSON[_0x2c3cec(0x1fd)](a247_0x129a96['readFileSync'](_0x2775ce,_0x2c3cec(0x1f1))),_0x5cf6ef=_0x5add27[_0x2c3cec(0x1ff)]||{},_0x33e43c=_0x5add27[_0x2c3cec(0x205)]||{},_0x58190a=_0x5cf6ef[_0x25b0ee]||_0x33e43c[_0x25b0ee];if(!_0x58190a)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x25b0ee,'stableVersion':null};let _0x5e0726=getInstalledVersion(_0x2d5ff4,_0x25b0ee);!_0x5e0726&&(_0x5e0726=_0x58190a);if(isNonNumericVersion(_0x58190a))return{'installed':!![],'version':_0x5e0726,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x25b0ee,'stableVersion':null};const _0x25ea97=a247_0x58e139[_0x2c3cec(0x201)](_0x5e0726),_0x3b20ef=_0x25ea97?a247_0x58e139['lt'](_0x25ea97,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x5e0726,'needsUpgrade':_0x3b20ef,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x25b0ee,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x25b0ee,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x1c18cb){const _0x537ed6=a247_0xf5322d;if(!_0x1c18cb[_0x537ed6(0x20f)])return;const _0x160e58=_0x537ed6(0x1f9),_0x22ca3c='\x1b[0m',_0x1a782e=_0x537ed6(0x203),_0x158c69=_0x1c18cb['packageName']||'@lovrabet/sdk',_0x2d8d74=_0x1c18cb['stableVersion']||_0x1c18cb[_0x537ed6(0x206)],_0x1714ac='npm\x20install\x20'+_0x158c69+'@'+(_0x2d8d74||'latest');console[_0x537ed6(0x200)](),console[_0x537ed6(0x200)](''+_0x160e58+_0x1a782e+_0x537ed6(0x20d)+_0x22ca3c),console[_0x537ed6(0x200)](_0x160e58+_0x537ed6(0x1fe)+_0x158c69+'@'+_0x1c18cb['version']+_0x22ca3c),console['log'](_0x160e58+_0x537ed6(0x1fa)+_0x2d8d74+_0x22ca3c),console[_0x537ed6(0x200)](_0x160e58+_0x537ed6(0x1f3)+_0x1714ac+_0x22ca3c),console[_0x537ed6(0x200)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x440b5c,_0x17aa8e){const _0x4f591e=a248_0x234c,_0x356ac7=_0x440b5c();while(!![]){try{const _0x1bfc52=-parseInt(_0x4f591e(0x13c))/0x1*(parseInt(_0x4f591e(0x13f))/0x2)+parseInt(_0x4f591e(0x13a))/0x3+-parseInt(_0x4f591e(0x11d))/0x4*(-parseInt(_0x4f591e(0x11b))/0x5)+parseInt(_0x4f591e(0x137))/0x6+parseInt(_0x4f591e(0x122))/0x7+parseInt(_0x4f591e(0x121))/0x8*(-parseInt(_0x4f591e(0x13b))/0x9)+-parseInt(_0x4f591e(0x11f))/0xa;if(_0x1bfc52===_0x17aa8e)break;else _0x356ac7['push'](_0x356ac7['shift']());}catch(_0x29d5ad){_0x356ac7['push'](_0x356ac7['shift']());}}}(a248_0x296c,0x4a8d3));function a248_0x296c(){const _0x3dd06a=['version','stableVersion','\x1b[1m','validation','parse','\x20\x20\x20Current\x20CLI\x20version:\x20','../..','1.0.0','filter','minimumVersionMessage','\x20\x20\x20Stable\x20version:\x20','Current\x20version:\x20','1721970RVEWqQ','\x20\x20\x20Upgrade\x20command:\x20','coerce','518484SGkWGE','12132LvRFzo','349bNHfRQ','minimumVersion','\x1b[31m','1450NodLtY','Upgrade\x20command:\x20','\x1b[0m','utf-8','join','↪\x20Critical\x20CLI\x20upgrade\x20required','10VftbNs','\x1b[33m','518524JoobPY','\x20\x20\x20Recommended\x20stable:\x20','2451800oAAmvy','\x20\x20\x20','1648qoCyMm','2535197HCKgKW','currentVersion','belowMinimum','Minimum\x20supported:\x20','needsUpgrade','latest','npm\x20install\x20-g\x20','upgradeMessage','log'];a248_0x296c=function(){return _0x3dd06a;};return a248_0x296c();}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a248_0x5ea263 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a248_0x234c(_0x56d6ed,_0x44ca02){_0x56d6ed=_0x56d6ed-0x119;const _0x296cd1=a248_0x296c();let _0x234ccf=_0x296cd1[_0x56d6ed];return _0x234ccf;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x46b147){const _0x47631e=a248_0x234c,_0x27e6a6=_0x46b147[_0x47631e(0x12c)]||_0x47631e(0x127);return _0x47631e(0x128)+NPM_PACKAGE_NAME+'@'+_0x27e6a6;}function getCurrentCliVersion(){const _0x419ed1=a248_0x234c;try{const _0x29b823=fileURLToPath(import.meta.url),_0x56f727=resolve(dirname(_0x29b823),_0x419ed1(0x131)),_0x20dbc7=resolve(_0x56f727,'package.json'),_0x438853=JSON[_0x419ed1(0x12f)](readFileSync(_0x20dbc7,_0x419ed1(0x142)));return _0x438853[_0x419ed1(0x12b)]||_0x419ed1(0x132);}catch{return _0x419ed1(0x132);}}export async function checkCliVersion(){const _0x59f4fa=a248_0x234c,_0x27b4c4=getCurrentCliVersion(),_0x1d01a5=await getCliVersionPolicy(),_0x1ebd7d=_0x1d01a5?.['stableVersion']||null,_0x422d28=_0x1d01a5?.[_0x59f4fa(0x13d)]||null;let _0x14f4c7=![],_0x2d3784=![];const _0x3fffd9=a248_0x5ea263[_0x59f4fa(0x139)](_0x27b4c4);if(_0x3fffd9&&_0x1ebd7d)try{const _0x2ac1a6=a248_0x5ea263['coerce'](_0x1ebd7d);if(_0x2ac1a6)_0x14f4c7=a248_0x5ea263['lt'](_0x3fffd9,_0x2ac1a6);}catch{}if(_0x3fffd9&&_0x422d28)try{const _0x25e6bb=a248_0x5ea263[_0x59f4fa(0x139)](_0x422d28);if(_0x25e6bb)_0x2d3784=a248_0x5ea263['lt'](_0x3fffd9,_0x25e6bb);}catch{}return _0x2d3784&&(_0x14f4c7=!![]),{'currentVersion':_0x27b4c4,'stableVersion':_0x1ebd7d,'minimumVersion':_0x422d28,'needsUpgrade':_0x14f4c7,'belowMinimum':_0x2d3784,'isPreRelease':![],'upgradeMessage':_0x1d01a5?.['upgradeMessage'],'minimumVersionMessage':_0x1d01a5?.[_0x59f4fa(0x134)]};}export function printCliUpgradeWarning(_0x289c6d){const _0x249584=a248_0x234c;if(!_0x289c6d[_0x249584(0x126)]&&!_0x289c6d[_0x249584(0x124)])return;const _0x327504=_0x249584(0x13e),_0x1ba819=_0x249584(0x11c),_0xfd06a0=_0x249584(0x141),_0x320e29=_0x249584(0x12d),_0x3a6ff9=getCliUpgradeCommand(_0x289c6d);console[_0x249584(0x12a)](),_0x289c6d[_0x249584(0x124)]?(console[_0x249584(0x12a)](''+_0x327504+_0x320e29+_0x249584(0x11a)+_0xfd06a0),console[_0x249584(0x12a)](_0x327504+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x289c6d['currentVersion']+_0xfd06a0),_0x289c6d['minimumVersion']&&console[_0x249584(0x12a)](_0x327504+'\x20\x20\x20Minimum\x20supported:\x20'+_0x289c6d[_0x249584(0x13d)]+_0xfd06a0),_0x289c6d[_0x249584(0x12c)]&&_0x289c6d['stableVersion']!==_0x289c6d[_0x249584(0x13d)]&&console[_0x249584(0x12a)](_0x327504+_0x249584(0x11e)+_0x289c6d['stableVersion']+_0xfd06a0),_0x289c6d[_0x249584(0x134)]&&console[_0x249584(0x12a)](_0x327504+'\x20\x20\x20'+_0x289c6d[_0x249584(0x134)]+_0xfd06a0),console[_0x249584(0x12a)](_0x327504+_0x249584(0x138)+_0x3a6ff9+_0xfd06a0)):(console[_0x249584(0x12a)](''+_0x1ba819+_0x320e29+'↪\x20New\x20version\x20available'+_0xfd06a0),console['log'](_0x1ba819+_0x249584(0x130)+_0x289c6d[_0x249584(0x123)]+_0xfd06a0),console[_0x249584(0x12a)](_0x1ba819+_0x249584(0x135)+_0x289c6d[_0x249584(0x12c)]+_0xfd06a0),_0x289c6d['upgradeMessage']&&console['log'](_0x1ba819+_0x249584(0x120)+_0x289c6d[_0x249584(0x129)]+_0xfd06a0),console[_0x249584(0x12a)](_0x1ba819+_0x249584(0x138)+_0x3a6ff9+_0xfd06a0)),console[_0x249584(0x12a)]();}export function assertCliVersionSupported(_0x29c61e){const _0x523c37=a248_0x234c;if(!_0x29c61e[_0x523c37(0x124)])return;const _0x4805d7=[_0x29c61e['minimumVersionMessage'],_0x523c37(0x136)+_0x29c61e[_0x523c37(0x123)],_0x29c61e[_0x523c37(0x13d)]?_0x523c37(0x125)+_0x29c61e['minimumVersion']:null,_0x523c37(0x140)+getCliUpgradeCommand(_0x29c61e)][_0x523c37(0x133)](Boolean)[_0x523c37(0x119)]('\x0a');throw CliErrors[_0x523c37(0x12e)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.',_0x4805d7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f6e1b,_0x2918a0){const _0x3ec446=a249_0x4cdc,_0x564351=_0x2f6e1b();while(!![]){try{const _0x29b4e4=parseInt(_0x3ec446(0x180))/0x1+-parseInt(_0x3ec446(0x194))/0x2*(-parseInt(_0x3ec446(0x187))/0x3)+-parseInt(_0x3ec446(0x193))/0x4*(parseInt(_0x3ec446(0x18a))/0x5)+parseInt(_0x3ec446(0x18f))/0x6*(-parseInt(_0x3ec446(0x186))/0x7)+-parseInt(_0x3ec446(0x190))/0x8*(parseInt(_0x3ec446(0x192))/0x9)+-parseInt(_0x3ec446(0x17f))/0xa*(parseInt(_0x3ec446(0x191))/0xb)+-parseInt(_0x3ec446(0x18e))/0xc*(-parseInt(_0x3ec446(0x18c))/0xd);if(_0x29b4e4===_0x2918a0)break;else _0x564351['push'](_0x564351['shift']());}catch(_0x2ddb0b){_0x564351['push'](_0x564351['shift']());}}}(a249_0x5738,0xee343));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(_0xea651c){const _0x110ca4=a249_0x4cdc;return typeof _0xea651c===_0x110ca4(0x189)&&_0xea651c['trim']()['length']>0x0?_0xea651c[_0x110ca4(0x195)]():null;}function normalizeCliVersionPolicy(_0x4b1b1b){const _0x5a9250=a249_0x4cdc;if(!_0x4b1b1b||typeof _0x4b1b1b!=='object')return null;const _0x376c34=_0x4b1b1b,_0x14ffbd=_0x376c34[_0x5a9250(0x18b)]&&typeof _0x376c34[_0x5a9250(0x18b)]===_0x5a9250(0x18d)?_0x376c34[_0x5a9250(0x18b)]:_0x376c34,_0x47d75a=pickString(_0x14ffbd[_0x5a9250(0x183)])||pickString(_0x14ffbd[_0x5a9250(0x182)])||pickString(_0x14ffbd[_0x5a9250(0x188)]),_0x37cdde=pickString(_0x14ffbd['minimumVersion'])||pickString(_0x14ffbd['minVersion']);if(!_0x47d75a&&!_0x37cdde)return null;return{'stableVersion':_0x47d75a,'minimumVersion':_0x37cdde,'upgradeMessage':pickString(_0x14ffbd['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x14ffbd[_0x5a9250(0x197)])||undefined};}function a249_0x4cdc(_0x38c555,_0x10a25e){_0x38c555=_0x38c555-0x17f;const _0x573836=a249_0x5738();let _0x4cdc01=_0x573836[_0x38c555];return _0x4cdc01;}function a249_0x5738(){const _0x279646=['now','latestVersion','stableVersion','signal','json','1589PLzkVL','3liUNdp','recommendedVersion','string','1055BMcDMQ','cli','13BHkzwh','object','25236168dUQbCW','15390VtwwJp','8lbFqvE','6480793JCTwhy','1641186EwNrby','26348WPIguP','829316DVCykW','trim','abort','minimumVersionMessage','20RCbscs','1790803djcRxD'];a249_0x5738=function(){return _0x279646;};return a249_0x5738();}export async function fetchCliVersionPolicy(){const _0x10d302=a249_0x4cdc,_0x23e7a4=new AbortController(),_0x3c657f=setTimeout(()=>_0x23e7a4[_0x10d302(0x196)](),FETCH_TIMEOUT_MS);try{const _0x288987=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x23e7a4[_0x10d302(0x184)]});if(!_0x288987['ok'])return null;const _0x40a136=await _0x288987[_0x10d302(0x185)]();return normalizeCliVersionPolicy(_0x40a136);}catch{return null;}finally{clearTimeout(_0x3c657f);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x3ce6a7=a249_0x4cdc,_0xc4ac3=Date[_0x3ce6a7(0x181)]();if(hasCachedPolicy){const _0x5d4226=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0xc4ac3-cacheTime<_0x5d4226)return cachedPolicy;}const _0x3b4de2=await fetchCliVersionPolicy();return cachedPolicy=_0x3b4de2,cacheTime=_0xc4ac3,hasCachedPolicy=!![],_0x3b4de2;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a250_0x212e(_0x44d223,_0xfac0dc){_0x44d223=_0x44d223-0xda;const _0x2cc3b4=a250_0x2cc3();let _0x212ec7=_0x2cc3b4[_0x44d223];return _0x212ec7;}const a250_0x3ae718=a250_0x212e;(function(_0x1d90d5,_0x4dce17){const _0xdfe069=a250_0x212e,_0x1f40e3=_0x1d90d5();while(!![]){try{const _0x3a2a0d=-parseInt(_0xdfe069(0xe1))/0x1*(parseInt(_0xdfe069(0xdd))/0x2)+parseInt(_0xdfe069(0xe5))/0x3+parseInt(_0xdfe069(0xdb))/0x4+parseInt(_0xdfe069(0xdf))/0x5+-parseInt(_0xdfe069(0xde))/0x6*(parseInt(_0xdfe069(0xe4))/0x7)+parseInt(_0xdfe069(0xdc))/0x8*(parseInt(_0xdfe069(0xe0))/0x9)+-parseInt(_0xdfe069(0xe3))/0xa;if(_0x3a2a0d===_0x4dce17)break;else _0x1f40e3['push'](_0x1f40e3['shift']());}catch(_0x53f54d){_0x1f40e3['push'](_0x1f40e3['shift']());}}}(a250_0x2cc3,0xbb130));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a250_0x417909,getMultiAppConfigs as a250_0x29ae84,getTemplateBaseUrl as a250_0x59a8e5}from'../context.js';function a250_0x2cc3(){const _0x10502a=['env','3102100EuwvZl','1626709vLhItA','2258154dFJWCz','project','2034840mthFXL','576HnUmTB','4zsLJtV','18RgUwMW','2292265SIrUQq','49293fxCiHL','170299coszhX'];a250_0x2cc3=function(){return _0x10502a;};return a250_0x2cc3();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x100422){const _0x27def4=a250_0x212e,_0x20ad15=readRawConfig(_0x100422);return _0x20ad15[_0x27def4(0xe2)]&&typeof _0x20ad15['env']==='string'&&initEnv(_0x20ad15[_0x27def4(0xe2)]),_0x20ad15;}export function getConfigAppCode(){return a250_0x417909();}export function getMultiAppConfigs(_0x160f3c=a250_0x3ae718(0xda)){return a250_0x29ae84(_0x160f3c);}export function getTemplateBaseUrl(){return a250_0x59a8e5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a251_0x2219(){const _0x20436f=['readdirSync','11198960EBbXDk','3341676paiJyi','5bmRGLm','复制目录时出错:','1163745CzpirW','28cLCxRQ','957210TsMtCJ','error','join','isDirectory','5231595aUNfXu','3566570GteDMS','name','copyFileSync','1015744QrFXFo','mkdirSync'];a251_0x2219=function(){return _0x20436f;};return a251_0x2219();}(function(_0x5f00f2,_0x2c39b2){const _0x149d43=a251_0x14a5,_0x26ed05=_0x5f00f2();while(!![]){try{const _0x43e0b6=parseInt(_0x149d43(0x17d))/0x1+-parseInt(_0x149d43(0x17a))/0x2+parseInt(_0x149d43(0x179))/0x3+-parseInt(_0x149d43(0x170))/0x4*(-parseInt(_0x149d43(0x171))/0x5)+parseInt(_0x149d43(0x175))/0x6*(parseInt(_0x149d43(0x174))/0x7)+-parseInt(_0x149d43(0x16f))/0x8+-parseInt(_0x149d43(0x173))/0x9;if(_0x43e0b6===_0x2c39b2)break;else _0x26ed05['push'](_0x26ed05['shift']());}catch(_0x51cbdf){_0x26ed05['push'](_0x26ed05['shift']());}}}(a251_0x2219,0xe0c84));function a251_0x14a5(_0x13617f,_0x34790c){_0x13617f=_0x13617f-0x16d;const _0x22192b=a251_0x2219();let _0x14a52c=_0x22192b[_0x13617f];return _0x14a52c;}import a251_0x25477d from'node:path';import a251_0x45094c from'node:fs';export async function copyDirectory(_0x31f6a8,_0x5b069c){const _0x535908=a251_0x14a5;try{const _0x24bcc2=a251_0x45094c[_0x535908(0x16e)](_0x31f6a8,{'withFileTypes':!![]});a251_0x45094c[_0x535908(0x16d)](_0x5b069c,{'recursive':!![]});for(const _0x1d958d of _0x24bcc2){const _0x3fea68=a251_0x25477d['join'](_0x31f6a8,_0x1d958d['name']),_0x56feec=a251_0x25477d[_0x535908(0x177)](_0x5b069c,_0x1d958d[_0x535908(0x17b)]);_0x1d958d[_0x535908(0x178)]()?await copyDirectory(_0x3fea68,_0x56feec):a251_0x45094c[_0x535908(0x17c)](_0x3fea68,_0x56feec);}}catch(_0x336bc1){console[_0x535908(0x176)](_0x535908(0x172),_0x336bc1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a252_0x557f(_0x4bf784,_0x47b888){_0x4bf784=_0x4bf784-0xb1;const _0x241700=a252_0x2417();let _0x557f48=_0x241700[_0x4bf784];return _0x557f48;}(function(_0x2c2cd0,_0x445393){const _0x279e57=a252_0x557f,_0x3cdbc4=_0x2c2cd0();while(!![]){try{const _0x3b16ad=parseInt(_0x279e57(0xbd))/0x1*(-parseInt(_0x279e57(0xb2))/0x2)+-parseInt(_0x279e57(0xbb))/0x3+-parseInt(_0x279e57(0xb4))/0x4+parseInt(_0x279e57(0xb3))/0x5+parseInt(_0x279e57(0xb8))/0x6*(-parseInt(_0x279e57(0xb6))/0x7)+-parseInt(_0x279e57(0xba))/0x8*(-parseInt(_0x279e57(0xb9))/0x9)+parseInt(_0x279e57(0xbc))/0xa;if(_0x3b16ad===_0x445393)break;else _0x3cdbc4['push'](_0x3cdbc4['shift']());}catch(_0x295fc4){_0x3cdbc4['push'](_0x3cdbc4['shift']());}}}(a252_0x2417,0x7e172));function toFiniteNumber(_0x3992d0){const _0x403379=a252_0x557f;if(typeof _0x3992d0==='number'&&Number['isFinite'](_0x3992d0))return _0x3992d0;if(typeof _0x3992d0===_0x403379(0xb7)){const _0x16b48d=_0x3992d0[_0x403379(0xb1)]();if(!_0x16b48d)return undefined;const _0x333022=Number(_0x16b48d);if(Number['isFinite'](_0x333022))return _0x333022;}return undefined;}function a252_0x2417(){const _0x2cb6ff=['trim','4458EeXonP','3416745TEmvqu','3743404nEqCzO','object','56vBYiNT','string','502788rTxKga','4149wkrCaZ','12856dWryOh','3064773vPBAnu','26429220gePtaN','414uPtpIa'];a252_0x2417=function(){return _0x2cb6ff;};return a252_0x2417();}export function normalizeEntityWithIdResponse(_0x4196a3){const _0x2d7f56=a252_0x557f,_0x2c7a5f=toFiniteNumber(_0x4196a3);if(_0x2c7a5f!==undefined)return{'id':_0x2c7a5f,'entity':{'id':_0x2c7a5f}};if(!_0x4196a3||typeof _0x4196a3!==_0x2d7f56(0xb5))return{'id':undefined,'entity':{}};const _0x324c76={..._0x4196a3},_0x87f779=toFiniteNumber(_0x324c76['id']);return _0x87f779!==undefined&&(_0x324c76['id']=_0x87f779),{'id':_0x87f779,'entity':_0x324c76};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49cebf,_0x5b820c){const _0x29530f=a253_0x576d,_0x8654f4=_0x49cebf();while(!![]){try{const _0x3c9006=parseInt(_0x29530f(0x9d))/0x1+parseInt(_0x29530f(0x9a))/0x2+-parseInt(_0x29530f(0x9c))/0x3*(parseInt(_0x29530f(0x9e))/0x4)+parseInt(_0x29530f(0x98))/0x5*(parseInt(_0x29530f(0xa0))/0x6)+parseInt(_0x29530f(0x9f))/0x7+-parseInt(_0x29530f(0x97))/0x8*(parseInt(_0x29530f(0x99))/0x9)+-parseInt(_0x29530f(0x9b))/0xa*(parseInt(_0x29530f(0x96))/0xb);if(_0x3c9006===_0x5b820c)break;else _0x8654f4['push'](_0x8654f4['shift']());}catch(_0x548d3d){_0x8654f4['push'](_0x8654f4['shift']());}}}(a253_0x2e41,0x5d278));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a253_0x576d(_0x691822,_0x4ee407){_0x691822=_0x691822-0x96;const _0x2e4152=a253_0x2e41();let _0x576d5d=_0x2e4152[_0x691822];return _0x576d5d;}function a253_0x2e41(){const _0x50a4f1=['356122PuroBX','8TUOeJb','4397834UGIBcU','60qMRjIt','isDirectory','44draPlL','5715688dHensZ','153955gTCslO','9MKyRiO','687586wqdins','847570cthktV','301557hIIysa'];a253_0x2e41=function(){return _0x50a4f1;};return a253_0x2e41();}export async function copyDir(_0x5e3d55,_0x137373){const _0x19f407=a253_0x576d,_0x5c3663=statSync(_0x5e3d55);if(_0x5c3663[_0x19f407(0xa1)]()){!existsSync(_0x137373)&&mkdirSync(_0x137373,{'recursive':!![]});const _0x29a2b7=readdirSync(_0x5e3d55);for(const _0x284431 of _0x29a2b7){await copyDir(join(_0x5e3d55,_0x284431),join(_0x137373,_0x284431));}}else copyFileSync(_0x5e3d55,_0x137373);}export function ensureDir(_0x1e5d8d){!existsSync(_0x1e5d8d)&&mkdirSync(_0x1e5d8d,{'recursive':!![]});}export function pathExists(_0x414f4d){return existsSync(_0x414f4d);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a254_0x37422d=a254_0x1754;(function(_0x3cd86f,_0x316e88){const _0x75430b=a254_0x1754,_0x2f9478=_0x3cd86f();while(!![]){try{const _0x39eb74=-parseInt(_0x75430b(0x143))/0x1+-parseInt(_0x75430b(0x13d))/0x2+-parseInt(_0x75430b(0x13f))/0x3+-parseInt(_0x75430b(0x156))/0x4+-parseInt(_0x75430b(0x13a))/0x5*(-parseInt(_0x75430b(0x149))/0x6)+-parseInt(_0x75430b(0x14f))/0x7*(parseInt(_0x75430b(0x154))/0x8)+-parseInt(_0x75430b(0x152))/0x9*(-parseInt(_0x75430b(0x155))/0xa);if(_0x39eb74===_0x316e88)break;else _0x2f9478['push'](_0x2f9478['shift']());}catch(_0x1ca413){_0x2f9478['push'](_0x2f9478['shift']());}}}(a254_0x2eb6,0xb8ba9));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 _0x5af3b3=a254_0x1754,_0xb608dd=getTemplateBaseUrl();return _0xb608dd+_0x5af3b3(0x138);}const CACHE_DIR=join(homedir(),a254_0x37422d(0x157),'cache');export async function fetchGuidesFromCDN(){const _0x4ab843=a254_0x37422d,_0x3ac15e=getGuidesCdnUrl(),_0x52a161=await fetch(_0x3ac15e,{'headers':{'Accept':_0x4ab843(0x15c)}});if(!_0x52a161['ok'])throw new Error(_0x4ab843(0x145)+_0x52a161[_0x4ab843(0x151)]+'\x20'+_0x52a161[_0x4ab843(0x153)]);const _0x38d307=await _0x52a161['json']();if(!_0x38d307[_0x4ab843(0x13e)]||typeof _0x38d307[_0x4ab843(0x13e)]!==_0x4ab843(0x140))throw new Error(_0x4ab843(0x14b));return _0x38d307;}export function writeGuidesToProject(_0x435b48,_0x167417,_0x4aa404=a254_0x37422d(0x14a),_0x1df727){const _0x342862=a254_0x37422d,_0x1e076c=join(_0x167417,_0x4aa404);mkdirSync(_0x1e076c,{'recursive':!![]});for(const [_0x1b8b05,_0x220cb9]of Object['entries'](_0x435b48[_0x342862(0x13e)])){let _0x3ea19c=_0x220cb9[_0x342862(0x15a)];_0x220cb9[_0x342862(0x159)]&&(_0x3ea19c=appendUpdateTime(_0x3ea19c,_0x220cb9[_0x342862(0x159)])),writeFileSync(join(_0x1e076c,_0x1b8b05+_0x342862(0x158)),_0x3ea19c,_0x342862(0x148));}}function a254_0x1754(_0x5229d6,_0x584d9b){_0x5229d6=_0x5229d6-0x138;const _0x2eb675=a254_0x2eb6();let _0x175485=_0x2eb675[_0x5229d6];return _0x175485;}export function appendUpdateTime(_0x3c373c,_0x3672c3){const _0x27603e=a254_0x37422d;return _0x3c373c=_0x3c373c[_0x27603e(0x13c)](/\n*>更新时间:.*$/m,''),_0x3c373c[_0x27603e(0x147)]()+(_0x27603e(0x144)+_0x3672c3);}export function getSkillTemplate(_0x24b05a){const _0x4152cd=a254_0x37422d;return _0x24b05a[_0x4152cd(0x146)]?.[_0x4152cd(0x15a)]||'';}export function appendExtendContents(_0x34af42,_0x23478e,_0x22a8da){const _0x2d33e8=a254_0x37422d,_0x42e88c=[];for(const [,_0x25b88a]of Object[_0x2d33e8(0x13b)](_0x23478e['guides'])){_0x25b88a[_0x2d33e8(0x14c)]&&_0x42e88c[_0x2d33e8(0x15b)](_0x25b88a[_0x2d33e8(0x14c)][_0x2d33e8(0x147)]());}if(_0x42e88c[_0x2d33e8(0x139)]===0x0)return _0x34af42;return _0x34af42[_0x2d33e8(0x147)]()+'\x0a\x0a'+_0x42e88c[_0x2d33e8(0x14e)]('\x0a\x0a')+'\x0a';}function a254_0x2eb6(){const _0x5360e0=['push','application/json','/skills/guides.json','length','5RAfAvd','entries','replace','1898004yUoYRR','guides','541671RnIcFf','object','CDN\x20数据中缺少\x20skillTemplate','keys','1004138dTTkUV','\x0a\x0a>更新时间:','CDN\x20请求失败:\x20','skillTemplate','trimEnd','utf-8','5207802AGZCqk','.lovrabet/skill/guides','CDN\x20返回数据格式错误','extendContent','map','join','7714LBgVlw','path','status','9756pCobat','statusText','1760uXNfRx','24770bwWwvf','1680996rYZCdf','.lovrabet','.md','lastUpdated','content'];a254_0x2eb6=function(){return _0x5360e0;};return a254_0x2eb6();}export function writeSkillFile(_0x5af9f6,_0x1d3fb4,_0x4c5a95){const _0x4314d1=a254_0x37422d,_0x53d3d2=getSkillTemplate(_0x5af9f6);if(!_0x53d3d2)throw new Error(_0x4314d1(0x141));const _0x5698b1=dirname(_0x1d3fb4);mkdirSync(_0x5698b1,{'recursive':!![]});let _0x1baed7=_0x53d3d2[_0x4314d1(0x13c)](/\{\{IDE_NAME\}\}/g,_0x4c5a95);_0x1baed7=appendExtendContents(_0x1baed7,_0x5af9f6),_0x5af9f6[_0x4314d1(0x146)][_0x4314d1(0x159)]&&(_0x1baed7=appendUpdateTime(_0x1baed7,_0x5af9f6[_0x4314d1(0x146)]['lastUpdated'])),writeFileSync(_0x1d3fb4,_0x1baed7,_0x4314d1(0x148));}export async function installGuides(_0x1c6249){const _0x3bf629=a254_0x37422d,_0x1ea46b=await fetchGuidesFromCDN();return writeGuidesToProject(_0x1ea46b,_0x1c6249),Object[_0x3bf629(0x142)](_0x1ea46b['guides'])[_0x3bf629(0x139)];}export function getGuidesSummary(_0x3d5a4f){const _0x29af1d=a254_0x37422d;return Object[_0x29af1d(0x13b)](_0x3d5a4f[_0x29af1d(0x13e)])[_0x29af1d(0x14d)](([_0x5ba276,_0x47b5e4])=>({'key':_0x5ba276,'title':_0x47b5e4['title'],'path':_0x47b5e4[_0x29af1d(0x150)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x56fa63,_0x4b5dc9){const _0x3f9fd9=a255_0x54fb,_0x690607=_0x56fa63();while(!![]){try{const _0x7fc3ea=parseInt(_0x3f9fd9(0x171))/0x1*(parseInt(_0x3f9fd9(0x178))/0x2)+parseInt(_0x3f9fd9(0x177))/0x3+-parseInt(_0x3f9fd9(0x175))/0x4+parseInt(_0x3f9fd9(0x183))/0x5*(parseInt(_0x3f9fd9(0x172))/0x6)+parseInt(_0x3f9fd9(0x16f))/0x7*(parseInt(_0x3f9fd9(0x17e))/0x8)+-parseInt(_0x3f9fd9(0x16b))/0x9+parseInt(_0x3f9fd9(0x17f))/0xa*(-parseInt(_0x3f9fd9(0x16a))/0xb);if(_0x7fc3ea===_0x4b5dc9)break;else _0x690607['push'](_0x690607['shift']());}catch(_0xe4bc60){_0x690607['push'](_0x690607['shift']());}}}(a255_0x484b,0xd66b0));function a255_0x54fb(_0x1f96f5,_0x561339){_0x1f96f5=_0x1f96f5-0x166;const _0x484b34=a255_0x484b();let _0x54fb6e=_0x484b34[_0x1f96f5];return _0x54fb6e;}export async function httpRequest(_0x5f1bf8,_0x48ce6a={}){const _0x573757=a255_0x54fb,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x48ce6a;let _0x2b0bfb=null;for(let _0xb99655=0x0;_0xb99655<=retries;_0xb99655++){try{const _0x53e5e1=new AbortController(),_0x4c6f1d=setTimeout(()=>_0x53e5e1[_0x573757(0x17c)](),timeout),_0x37ce47=await fetch(_0x5f1bf8,{'headers':headers,'signal':_0x53e5e1[_0x573757(0x173)]});clearTimeout(_0x4c6f1d);let _0x508d7d;const _0x1c1f74=_0x37ce47[_0x573757(0x169)][_0x573757(0x181)]('content-type');return _0x1c1f74?.[_0x573757(0x167)](_0x573757(0x180))?_0x508d7d=await _0x37ce47['json']():_0x508d7d=await _0x37ce47[_0x573757(0x17a)](),{'ok':_0x37ce47['ok'],'status':_0x37ce47[_0x573757(0x179)],'statusText':_0x37ce47[_0x573757(0x182)],'data':_0x508d7d,'headers':_0x37ce47['headers'],'url':_0x37ce47[_0x573757(0x17b)],'text':()=>_0x37ce47[_0x573757(0x17a)]()};}catch(_0x19136f){_0x2b0bfb=_0x19136f instanceof Error?_0x19136f:new Error(String(_0x19136f));if(_0xb99655===retries)break;if(shouldRetry(_0x19136f)){console[_0x573757(0x16c)](_0x573757(0x174)+retryDelay+_0x573757(0x176)+(_0xb99655+0x1)+_0x573757(0x170)),await sleep(retryDelay);continue;}else break;}}throw _0x2b0bfb||new Error(_0x573757(0x184));}function shouldRetry(_0x25da38){const _0x5eead2=a255_0x54fb;if(_0x25da38 instanceof Error){if(_0x25da38['name']===_0x5eead2(0x16e))return![];if(_0x25da38[_0x5eead2(0x17d)]===_0x5eead2(0x16d)&&_0x25da38['message'][_0x5eead2(0x167)](_0x5eead2(0x168)))return!![];if(_0x25da38[_0x5eead2(0x166)][_0x5eead2(0x167)]('ECONNRESET'))return!![];if(_0x25da38['message'][_0x5eead2(0x167)]('ENOTFOUND'))return![];}return![];}function sleep(_0x29b3fa){return new Promise(_0x38fa3f=>setTimeout(_0x38fa3f,_0x29b3fa));}function a255_0x484b(){const _0x423526=['1486530xkJLRC','application/json','get','statusText','5bPyscQ','Request\x20failed','message','includes','fetch','headers','121yGybzE','4514598sItXqP','log','TypeError','AbortError','23639wtAwYI','\x20次重试...','294185OJtBTi','5437758uCPFRm','signal','*\x20请求失败,','1109124gYuxMH','ms\x20后进行第\x20','1238169MNRJVh','6bBJlPs','status','text','url','abort','name','2584KGeBcJ'];a255_0x484b=function(){return _0x423526;};return a255_0x484b();}export function validateUrl(_0xc48cdd){try{return new URL(_0xc48cdd),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xebf6a4,_0x286d9f){const _0xa270be=a256_0x356e,_0x1e9c87=_0xebf6a4();while(!![]){try{const _0x3ba965=-parseInt(_0xa270be(0xc3))/0x1+parseInt(_0xa270be(0xb8))/0x2*(-parseInt(_0xa270be(0xc0))/0x3)+-parseInt(_0xa270be(0xb5))/0x4+parseInt(_0xa270be(0xb9))/0x5+parseInt(_0xa270be(0xb6))/0x6*(parseInt(_0xa270be(0xb7))/0x7)+parseInt(_0xa270be(0xbf))/0x8*(-parseInt(_0xa270be(0xbd))/0x9)+parseInt(_0xa270be(0xbb))/0xa;if(_0x3ba965===_0x286d9f)break;else _0x1e9c87['push'](_0x1e9c87['shift']());}catch(_0x2ce632){_0x1e9c87['push'](_0x1e9c87['shift']());}}}(a256_0x3b59,0xb33bf));function env(_0x4ee038){return process.env[`RABETBASE_${_0x4ee038}`]||process.env[`LOVRABET_${_0x4ee038}`]||undefined;}export function isNonInteractive(_0x156def){const _0x2fbc57=a256_0x356e;return!!(_0x156def[_0x2fbc57(0xbc)]||_0x156def['ci']||env('CI')==='true'||process.env.CI===_0x2fbc57(0xc1)||!process['stdout'][_0x2fbc57(0xba)]||!isStdinRawModeSupported());}function a256_0x356e(_0x24e861,_0x1e4af3){_0x24e861=_0x24e861-0xb4;const _0x3b59bd=a256_0x3b59();let _0x356ecf=_0x3b59bd[_0x24e861];return _0x356ecf;}function isStdinRawModeSupported(){const _0x347d19=a256_0x356e;if(!process[_0x347d19(0xb4)][_0x347d19(0xba)])return![];try{const _0x9816c7=process['stdin'][_0x347d19(0xbe)];return process['stdin'][_0x347d19(0xc2)](!![]),process[_0x347d19(0xb4)][_0x347d19(0xc2)](_0x9816c7??![]),!![];}catch{return![];}}function a256_0x3b59(){const _0x4f8af6=['stdin','5552056MGgDSu','12MmqHXP','1174943KvlaTO','22ESoRyp','3754330kewXVg','isTTY','24584110qTfwAb','nonInteractive','135tLzDAD','isRaw','513720jVYKBh','23019CIyYaO','true','setRawMode','375190LdWNCr'];a256_0x3b59=function(){return _0x4f8af6;};return a256_0x3b59();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a257_0x3c42f6=a257_0x1967;(function(_0x1a369c,_0x3f5c0f){const _0x408dd6=a257_0x1967,_0x505848=_0x1a369c();while(!![]){try{const _0x5c8cff=-parseInt(_0x408dd6(0x19e))/0x1*(parseInt(_0x408dd6(0x1b9))/0x2)+-parseInt(_0x408dd6(0x1b6))/0x3+-parseInt(_0x408dd6(0x1a2))/0x4+-parseInt(_0x408dd6(0x1bd))/0x5*(parseInt(_0x408dd6(0x1a9))/0x6)+-parseInt(_0x408dd6(0x1c5))/0x7*(-parseInt(_0x408dd6(0x1c3))/0x8)+parseInt(_0x408dd6(0x1bc))/0x9*(-parseInt(_0x408dd6(0x1b0))/0xa)+parseInt(_0x408dd6(0x197))/0xb;if(_0x5c8cff===_0x3f5c0f)break;else _0x505848['push'](_0x505848['shift']());}catch(_0x5179d1){_0x505848['push'](_0x505848['shift']());}}}(a257_0x5158,0x1c8c6));import a257_0x952a0d from'winston';function a257_0x5158(){const _0x55c037=['now','message','4622pnhbvn','winstonLogger','clear','106992vjJGdc','93135DUIsnB','parse','join','utf8','File','完成:\x20','139312VpJyxK','format','14IGjMmv','green','errors','info','unknown','getWinstonInstance','toISOString','details','trim','6487679CftJyL','Failed\x20to\x20read\x20logs:','error','initWinstonLogger','existsSync','filter','yellow','101BcCWEH','clearLogs','success','writeFileSync','30392qrPMvE','addColors','warn','失败:\x20','logFilePath','command','currentRawCommand','6ubhGZj','combine','mkdirSync','rawCommand','readLogs','duration','setLogPath','50SbBxUH','.lovrabet.log','transports','dirname','开始执行:\x20','level','565821iIGRAm'];a257_0x5158=function(){return _0x55c037;};return a257_0x5158();}function a257_0x1967(_0x394491,_0x37cc9c){_0x394491=_0x394491-0x194;const _0x51583c=a257_0x5158();let _0x196765=_0x51583c[_0x394491];return _0x196765;}import a257_0x48ace5 from'node:fs';import a257_0x4a47f1 from'node:path';class Logger{['winstonLogger'];[a257_0x3c42f6(0x1a6)];['currentRawCommand']='';constructor(){const _0x5dba06=a257_0x3c42f6;this[_0x5dba06(0x1a6)]='';}['setRawCommand'](_0x5b86e2){this['currentRawCommand']=_0x5b86e2;}[a257_0x3c42f6(0x19a)](){const _0xe1164=a257_0x3c42f6,_0x67ff7a=a257_0x4a47f1[_0xe1164(0x1b3)](this[_0xe1164(0x1a6)]);!a257_0x48ace5[_0xe1164(0x19b)](_0x67ff7a)&&a257_0x48ace5[_0xe1164(0x1ab)](_0x67ff7a,{'recursive':!![]});const _0x2f38c6=a257_0x952a0d[_0xe1164(0x1c4)][_0xe1164(0x1aa)](a257_0x952a0d[_0xe1164(0x1c4)]['timestamp'](),a257_0x952a0d[_0xe1164(0x1c4)][_0xe1164(0x1c7)]({'stack':!![]}),a257_0x952a0d['format']['printf'](_0x44fae5=>{const _0x14f14b=_0xe1164,_0x2fb481={'timestamp':_0x44fae5['timestamp']||new Date()[_0x14f14b(0x194)](),'level':_0x44fae5[_0x14f14b(0x1b5)]||_0x14f14b(0x1c8),'command':_0x44fae5[_0x14f14b(0x1a7)]||_0x14f14b(0x1c9),'rawCommand':_0x44fae5[_0x14f14b(0x1ac)]||this[_0x14f14b(0x1a8)]||undefined,'message':_0x44fae5[_0x14f14b(0x1b8)]||'','duration':_0x44fae5[_0x14f14b(0x1ae)]||undefined,'details':_0x44fae5[_0x14f14b(0x195)]||undefined};return JSON['stringify'](_0x2fb481);}));this[_0xe1164(0x1ba)]=a257_0x952a0d['createLogger']({'level':'info','format':_0x2f38c6,'transports':[new a257_0x952a0d[(_0xe1164(0x1b2))][(_0xe1164(0x1c1))]({'filename':this[_0xe1164(0x1a6)],'level':_0xe1164(0x1c8)})],'silent':![]}),a257_0x952a0d[_0xe1164(0x1a3)]({'success':_0xe1164(0x1c6),'error':'red','warn':_0xe1164(0x19d),'info':'blue'});}[a257_0x3c42f6(0x1af)](_0x118edd){const _0x593f5f=a257_0x3c42f6;this[_0x593f5f(0x1a6)]=a257_0x4a47f1[_0x593f5f(0x1bf)](_0x118edd,_0x593f5f(0x1b1)),this[_0x593f5f(0x1ba)]&&this[_0x593f5f(0x1ba)][_0x593f5f(0x1bb)](),this[_0x593f5f(0x19a)]();}[a257_0x3c42f6(0x1c8)](_0x3b7e80,_0x327bb5,_0x80a3c3){const _0x456bbf=a257_0x3c42f6;if(!this[_0x456bbf(0x1a6)]||!this[_0x456bbf(0x1ba)])return;this['winstonLogger'][_0x456bbf(0x1c8)](_0x327bb5,{'command':_0x3b7e80,'details':_0x80a3c3});}[a257_0x3c42f6(0x1a0)](_0x42d6a4,_0x37ba10,_0x3f9a59,_0x48c5af){const _0xfbcefd=a257_0x3c42f6;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['log'](_0xfbcefd(0x1c8),_0x37ba10,{'level':'success','command':_0x42d6a4,'duration':_0x3f9a59,'details':_0x48c5af});}[a257_0x3c42f6(0x199)](_0x39cde6,_0x29aae3,_0x161943){const _0x181b53=a257_0x3c42f6;if(!this[_0x181b53(0x1a6)]||!this[_0x181b53(0x1ba)])return;this['winstonLogger']['error'](_0x29aae3,{'command':_0x39cde6,'details':_0x161943});}[a257_0x3c42f6(0x1a4)](_0x96dca0,_0x4b3171,_0x4babc1){const _0x1ea5be=a257_0x3c42f6;if(!this[_0x1ea5be(0x1a6)]||!this[_0x1ea5be(0x1ba)])return;this[_0x1ea5be(0x1ba)][_0x1ea5be(0x1a4)](_0x4b3171,{'command':_0x96dca0,'details':_0x4babc1});}async['logTask'](_0x187a3e,_0x573695,_0x1b1a1a){const _0x12ee6b=a257_0x3c42f6,_0x34d268=Date[_0x12ee6b(0x1b7)]();this[_0x12ee6b(0x1c8)](_0x187a3e,_0x12ee6b(0x1b4)+_0x573695);try{const _0x520a43=await _0x1b1a1a(),_0x139663=Date[_0x12ee6b(0x1b7)]()-_0x34d268;return this[_0x12ee6b(0x1a0)](_0x187a3e,_0x12ee6b(0x1c2)+_0x573695,_0x139663),_0x520a43;}catch(_0x303542){const _0x28332a=Date['now']()-_0x34d268;this['error'](_0x187a3e,_0x12ee6b(0x1a5)+_0x573695,{'error':_0x303542 instanceof Error?_0x303542[_0x12ee6b(0x1b8)]:String(_0x303542),'duration':_0x28332a});throw _0x303542;}}[a257_0x3c42f6(0x1ad)](){const _0x5895f5=a257_0x3c42f6;try{if(!a257_0x48ace5[_0x5895f5(0x19b)](this['logFilePath']))return[];const _0x2030e8=a257_0x48ace5['readFileSync'](this[_0x5895f5(0x1a6)],_0x5895f5(0x1c0));return _0x2030e8['split']('\x0a')[_0x5895f5(0x19c)](_0x4643c8=>_0x4643c8[_0x5895f5(0x196)]())['map'](_0x40a819=>JSON[_0x5895f5(0x1be)](_0x40a819));}catch(_0x5d5c77){return console['warn'](_0x5895f5(0x198),_0x5d5c77),[];}}[a257_0x3c42f6(0x19f)](){const _0x297004=a257_0x3c42f6;try{a257_0x48ace5[_0x297004(0x19b)](this[_0x297004(0x1a6)])&&a257_0x48ace5[_0x297004(0x1a1)](this[_0x297004(0x1a6)],'',_0x297004(0x1c0));}catch(_0x25d9e6){console[_0x297004(0x1a4)]('Failed\x20to\x20clear\x20logs:',_0x25d9e6);}}[a257_0x3c42f6(0x1ca)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a258_0x3ef1(_0x568d8e,_0x5613ec){_0x568d8e=_0x568d8e-0x11d;const _0x58297b=a258_0x5829();let _0x3ef15c=_0x58297b[_0x568d8e];return _0x3ef15c;}(function(_0x19e5cb,_0x245f93){const _0x382735=a258_0x3ef1,_0xa19457=_0x19e5cb();while(!![]){try{const _0x5245fc=-parseInt(_0x382735(0x12a))/0x1*(parseInt(_0x382735(0x127))/0x2)+parseInt(_0x382735(0x12e))/0x3*(-parseInt(_0x382735(0x120))/0x4)+parseInt(_0x382735(0x11f))/0x5+-parseInt(_0x382735(0x126))/0x6+-parseInt(_0x382735(0x11e))/0x7*(-parseInt(_0x382735(0x128))/0x8)+-parseInt(_0x382735(0x12d))/0x9*(-parseInt(_0x382735(0x12c))/0xa)+parseInt(_0x382735(0x122))/0xb;if(_0x5245fc===_0x245f93)break;else _0xa19457['push'](_0xa19457['shift']());}catch(_0x9ff16d){_0xa19457['push'](_0xa19457['shift']());}}}(a258_0x5829,0x57115));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x2a9963){const _0x1f833b=a258_0x3ef1;if(!_0x2a9963)return undefined;let _0x3bf253;try{_0x3bf253=JSON[_0x1f833b(0x129)](_0x2a9963);}catch{throw CliErrors[_0x1f833b(0x121)](_0x1f833b(0x12b)+_0x2a9963);}if(!_0x3bf253||typeof _0x3bf253!==_0x1f833b(0x125)||Array[_0x1f833b(0x11d)](_0x3bf253))throw CliErrors[_0x1f833b(0x121)](_0x1f833b(0x123),_0x1f833b(0x124));return _0x3bf253;}function a258_0x5829(){const _0x2c0c64=['Invalid\x20JSON\x20for\x20--params:\x20','230rLzBTk','97623iVYYTz','3kxoZwg','isArray','4833052qsugCn','730110oXLvnh','952496KcuPwD','validation','7347472KwoQdw','--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','object','4198452NcZaou','24NYTdFX','8jebCPO','parse','38283FVLgrT'];a258_0x5829=function(){return _0x2c0c64;};return a258_0x5829();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a259_0x2a75(){const _0x4d913c=['40200DAKHLe','7agAxkw','win32','121ROWxFg','225mskYRl','4dtGbfP','571059qtLmDH','platform','652HwWYZL','1501956bDEJUa','1661488jjFwVQ','1429075nXbKqc','727pqcsmE','35710dgJHiM'];a259_0x2a75=function(){return _0x4d913c;};return a259_0x2a75();}const a259_0x51187e=a259_0x890a;(function(_0x586cfe,_0x4c5d64){const _0x305038=a259_0x890a,_0x5d4919=_0x586cfe();while(!![]){try{const _0x5d4c56=parseInt(_0x305038(0xc0))/0x1*(parseInt(_0x305038(0xbc))/0x2)+parseInt(_0x305038(0xc8))/0x3*(parseInt(_0x305038(0xc7))/0x4)+-parseInt(_0x305038(0xbf))/0x5+-parseInt(_0x305038(0xbd))/0x6+parseInt(_0x305038(0xc3))/0x7*(parseInt(_0x305038(0xbe))/0x8)+parseInt(_0x305038(0xc6))/0x9*(parseInt(_0x305038(0xc1))/0xa)+-parseInt(_0x305038(0xc5))/0xb*(parseInt(_0x305038(0xc2))/0xc);if(_0x5d4c56===_0x4c5d64)break;else _0x5d4919['push'](_0x5d4919['shift']());}catch(_0x44f9e8){_0x5d4919['push'](_0x5d4919['shift']());}}}(a259_0x2a75,0x24f1d));export const isWindows=process[a259_0x51187e(0xc9)]===a259_0x51187e(0xc4);function a259_0x890a(_0x35ac30,_0x3b4d1c){_0x35ac30=_0x35ac30-0xbc;const _0x2a75bb=a259_0x2a75();let _0x890a3=_0x2a75bb[_0x35ac30];return _0x890a3;}export function resolveNpmBin(_0x3c2bd4){return isWindows?_0x3c2bd4+'.cmd':_0x3c2bd4;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a260_0x1bdfe5=a260_0x1618;(function(_0x365f5d,_0x5aa82e){const _0x51eaff=a260_0x1618,_0x5811da=_0x365f5d();while(!![]){try{const _0x34b221=-parseInt(_0x51eaff(0xa1))/0x1*(-parseInt(_0x51eaff(0xa8))/0x2)+parseInt(_0x51eaff(0xaa))/0x3+parseInt(_0x51eaff(0x9c))/0x4+parseInt(_0x51eaff(0xa9))/0x5*(-parseInt(_0x51eaff(0xac))/0x6)+-parseInt(_0x51eaff(0x9e))/0x7+parseInt(_0x51eaff(0x98))/0x8*(-parseInt(_0x51eaff(0x9d))/0x9)+-parseInt(_0x51eaff(0xa3))/0xa*(-parseInt(_0x51eaff(0xad))/0xb);if(_0x34b221===_0x5aa82e)break;else _0x5811da['push'](_0x5811da['shift']());}catch(_0x56ad4e){_0x5811da['push'](_0x5811da['shift']());}}}(a260_0x393b,0x2e26f));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';function a260_0x393b(){const _0x5d1f91=['lastUpdated','../../templates/rules/lovrabet_rules.mdc.tpl','38fZHNGh','string','10rhVRgi','utf-8','/rules/rules.json','application/json','CDN\x20返回数据格式错误','3636tWvDQT','1630XCiLCo','662055QXIADW','本地模板文件不存在:\x20','3342bIvBWs','3738614XXHYKG','content','54680FSoNlt','agents.md','lovrabet_rules.mdc','catch','942700UeMSFs','189CuujiS','2458134AqwqbA'];a260_0x393b=function(){return _0x5d1f91;};return a260_0x393b();}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 _0x46891c=a260_0x1618,_0x514001=getTemplateBaseUrl();return _0x514001+_0x46891c(0xa5);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a260_0x1bdfe5(0xa0));export async function fetchRulesFromCDN(){const _0x33fc3f=a260_0x1bdfe5,_0x3e50a6=getRulesCdnUrl(),_0x50dbc2=await fetch(_0x3e50a6,{'headers':{'Accept':_0x33fc3f(0xa6)}});if(!_0x50dbc2['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x50dbc2['status']+'\x20'+_0x50dbc2['statusText']);const _0xd3276a=await _0x50dbc2['json']();if(!_0xd3276a[_0x33fc3f(0xae)]||typeof _0xd3276a[_0x33fc3f(0xae)]!==_0x33fc3f(0xa2))throw new Error(_0x33fc3f(0xa7));return _0xd3276a;}export async function getRulesContent(){const _0x21126a=a260_0x1bdfe5;try{const _0x4101df=await fetchRulesFromCDN();return _0x4101df[_0x21126a(0xae)];}catch{return readLocalTemplate();}}function a260_0x1618(_0xe49b4c,_0x1a6c1a){_0xe49b4c=_0xe49b4c-0x98;const _0x393bf7=a260_0x393b();let _0x161824=_0x393bf7[_0xe49b4c];return _0x161824;}export function readLocalTemplate(){const _0x3f7ee2=a260_0x1bdfe5;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x3f7ee2(0xa4));throw new Error(_0x3f7ee2(0xab)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x493507){const _0x5d1235=a260_0x1bdfe5,_0x566f1b=await fetchRulesFromCDN()[_0x5d1235(0x9b)](()=>null);let _0x1b92f5;_0x566f1b?(_0x1b92f5=_0x566f1b['content'],_0x566f1b[_0x5d1235(0x9f)]&&(_0x1b92f5=appendUpdateTime(_0x1b92f5,_0x566f1b[_0x5d1235(0x9f)]))):_0x1b92f5=readLocalTemplate();const _0x574673=dirname(_0x493507);!existsSync(_0x574673)&&mkdirSync(_0x574673,{'recursive':!![]}),writeFileSync(_0x493507,_0x1b92f5,_0x5d1235(0xa4));}export async function copyRulesToCursor(_0x20b8e1){const _0x32487d=a260_0x1bdfe5,_0x210a8d=join(_0x20b8e1,'.cursor/rules'),_0x1f02d4=join(_0x210a8d,_0x32487d(0x9a));if(existsSync(_0x1f02d4))return![];return await writeRulesFile(_0x1f02d4),!![];}export async function copyRulesToAgentsMd(_0x572307){const _0x2ad0bc=a260_0x1bdfe5,_0x451fad=join(_0x572307,_0x2ad0bc(0x99));if(existsSync(_0x451fad))return![];return await writeRulesFile(_0x451fad),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x4e718a){return new Promise(_0x2c3fdd=>setTimeout(_0x2c3fdd,_0x4e718a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a262_0x13c30c=a262_0x3346;(function(_0x19966f,_0x5b0c2d){const _0x44092d=a262_0x3346,_0x3ddce1=_0x19966f();while(!![]){try{const _0x173e1a=-parseInt(_0x44092d(0xf5))/0x1+parseInt(_0x44092d(0xf0))/0x2*(parseInt(_0x44092d(0x115))/0x3)+-parseInt(_0x44092d(0x106))/0x4+-parseInt(_0x44092d(0x10a))/0x5+parseInt(_0x44092d(0x129))/0x6+parseInt(_0x44092d(0x108))/0x7*(parseInt(_0x44092d(0x109))/0x8)+-parseInt(_0x44092d(0x114))/0x9*(-parseInt(_0x44092d(0x105))/0xa);if(_0x173e1a===_0x5b0c2d)break;else _0x3ddce1['push'](_0x3ddce1['shift']());}catch(_0x2d377c){_0x3ddce1['push'](_0x3ddce1['shift']());}}}(a262_0x2090,0xa4ac2));import a262_0x29d09b from'node:fs';import a262_0x5bc4c8 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a262_0x2090(){const _0x388364=['627508bmvTbf','\x0a\x20\x20\x20\x20{\x20','isFile','info','slice','success','endsWith','getDate','default','utf8','split','template','formatLocalTimestamp','toDisplayTitle','toUpperCase','includes','10YAxAvo','3310212lXiOmr','toComponentName','469MLspIY','90648vSCdqq','5622145pIuxWs','padStart','datasetCode','api','.json','.md','processFile','.tpl','getMinutes','alias:\x20\x22','9125667lXPYWw','3tKheJw','mkdir','pad','readFile','LOVRABET','replaceContent','writeFile','join','processTemplate','.css','processDirectory','getHours','replaceApiContent','promises','toLowerCase','name','.tsx','message','alias','pop','6089592Ldvbnj','模板内容替换失败','.js','map','datasetCode:\x20\x22','now','模板内容替换完成','replace','push','getMonth','tableName:\x20\x22','toISOString','tableName','getFullYear','931832iAruIj','.jsx','isDirectory','\x20},','extname'];a262_0x2090=function(){return _0x388364;};return a262_0x2090();}const CLI_VERSION=getCliVersion();function a262_0x3346(_0x21d1ad,_0x5cb237){_0x21d1ad=_0x21d1ad-0xed;const _0x209072=a262_0x2090();let _0x334658=_0x209072[_0x21d1ad];return _0x334658;}export class TemplateReplacer{static[a262_0x13c30c(0x117)](_0x11f542){const _0xb2c3de=a262_0x13c30c;return String(_0x11f542)[_0xb2c3de(0x10b)](0x2,'0');}static[a262_0x13c30c(0x101)](_0xa8f1ac){const _0x78e3a9=a262_0x13c30c,_0x2d8c62=_0xa8f1ac[_0x78e3a9(0xef)](),_0x5d07f3=this[_0x78e3a9(0x117)](_0xa8f1ac[_0x78e3a9(0x132)]()+0x1),_0x3333d2=this['pad'](_0xa8f1ac[_0x78e3a9(0xfc)]()),_0x30ec44=this[_0x78e3a9(0x117)](_0xa8f1ac[_0x78e3a9(0x120)]()),_0x53b44e=this['pad'](_0xa8f1ac[_0x78e3a9(0x112)]()),_0x2d3f1f=this[_0x78e3a9(0x117)](_0xa8f1ac['getSeconds']());return{'createdAt':_0x2d8c62+'-'+_0x5d07f3+'-'+_0x3333d2+'\x20'+_0x30ec44+':'+_0x53b44e+':'+_0x2d3f1f,'createdDate':_0x2d8c62+'-'+_0x5d07f3+'-'+_0x3333d2,'createdTime':_0x30ec44+':'+_0x53b44e+':'+_0x2d3f1f};}static[a262_0x13c30c(0x107)](_0x29840b){const _0x12eab2=a262_0x13c30c,_0x17627d=_0x29840b[_0x12eab2(0xff)]('/')[_0x12eab2(0x128)]()||_0x29840b;return _0x17627d[_0x12eab2(0xff)]('-')[_0x12eab2(0x12c)](_0x5329c1=>_0x5329c1['charAt'](0x0)[_0x12eab2(0x103)]()+_0x5329c1[_0x12eab2(0xf9)](0x1)['toLowerCase']())[_0x12eab2(0x11c)]('');}static[a262_0x13c30c(0x102)](_0x625e9a){const _0x716443=a262_0x13c30c,_0x2f732f=_0x625e9a[_0x716443(0xff)]('/')['pop']()||_0x625e9a;return _0x2f732f[_0x716443(0xff)]('-')['map'](_0x62064d=>_0x62064d['charAt'](0x0)[_0x716443(0x103)]()+_0x62064d[_0x716443(0xf9)](0x1)[_0x716443(0x123)]())[_0x716443(0x11c)]('\x20');}static[a262_0x13c30c(0x11a)](_0x6951da,_0x2c50b2,_0x301143){const _0x5837dd=a262_0x13c30c,_0x4bab5a=this[_0x5837dd(0x107)](_0x2c50b2),_0x1adcd3=this[_0x5837dd(0x102)](_0x2c50b2),{createdAt:_0x3c005e,createdDate:_0x13c024,createdTime:_0x5772a4}=this[_0x5837dd(0x101)](new Date());let _0x3e7e38=_0x6951da['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x5837dd(0x130)](/\{ComponentName\}/g,_0x4bab5a)[_0x5837dd(0x130)](/\{DisplayTitle\}/g,_0x1adcd3)[_0x5837dd(0x130)](/\{PageName\}/g,_0x2c50b2)[_0x5837dd(0x130)](/\{TemplateName\}/g,_0x301143)[_0x5837dd(0x130)](/\{CreatedAt\}/g,_0x3c005e)[_0x5837dd(0x130)](/\{CreatedDate\}/g,_0x13c024)[_0x5837dd(0x130)](/\{CreatedTime\}/g,_0x5772a4);return _0x3e7e38;}static[a262_0x13c30c(0x121)](_0x20991b,_0x3eb300,_0x2c07c6,_0x20ce9d,_0x5e2a7f,_0x588a78,_0x6195fe,_0x2c26ea){const _0x532670=a262_0x13c30c,_0x58c754=new Date(),_0x548790=_0x58c754[_0x532670(0xed)](),_0x34246c=_0x2c07c6[_0x532670(0x12c)](_0x3cbb66=>{const _0x445be3=_0x532670,_0x535101=[_0x445be3(0x12d)+_0x3cbb66[_0x445be3(0x10c)]+'\x22',_0x445be3(0x133)+_0x3cbb66[_0x445be3(0xee)]+'\x22','name:\x20\x22'+_0x3cbb66[_0x445be3(0x124)]+'\x22'];return _0x3cbb66['alias']&&_0x535101[_0x445be3(0x131)](_0x445be3(0x113)+_0x3cbb66[_0x445be3(0x127)]+'\x22'),_0x445be3(0xf6)+_0x535101[_0x445be3(0x11c)](',\x20')+_0x445be3(0xf3);})['join'](''),_0x201e57=_0x20ce9d||_0x2c07c6[0x0]?.['alias']||'YourModel';let _0x11e3b8=_0x20991b[_0x532670(0x130)](/\{AppCode\}/g,_0x3eb300)[_0x532670(0x130)](/\{ModelConfigs\}/g,_0x34246c)[_0x532670(0x130)](/\{ExampleModelName\}/g,_0x201e57)['replace'](/\{ApiFileName\}/g,_0x5e2a7f||_0x532670(0x10d))['replace'](/\{ConfigName\}/g,_0x588a78||_0x532670(0xfd))[_0x532670(0x130)](/\{ClientConfigParam\}/g,_0x6195fe||'')[_0x532670(0x130)](/\{VarPrefix\}/g,_0x2c26ea||_0x532670(0x119))[_0x532670(0x130)](/\{CreatedAt\}/g,_0x548790);return _0x11e3b8;}static async[a262_0x13c30c(0x11d)](_0x49224e,_0x309b16,_0x8707ac,_0x12e98d,_0xb90c5f=!![]){const _0x45161e=a262_0x13c30c,_0x49afc1=Date['now']();try{_0xb90c5f&&logger[_0x45161e(0xf8)](_0x45161e(0x100),'开始处理模板内容替换',{'templatePath':_0x49224e,'targetPath':_0x309b16,'pageName':_0x8707ac,'templateName':_0x12e98d});await a262_0x29d09b[_0x45161e(0x122)][_0x45161e(0x116)](_0x309b16,{'recursive':!![]}),await this['processDirectory'](_0x49224e,_0x309b16,_0x8707ac,_0x12e98d);if(_0xb90c5f){const _0x4effde=Date['now']()-_0x49afc1;logger[_0x45161e(0xfa)](_0x45161e(0x100),_0x45161e(0x12f),_0x4effde,{'pageName':_0x8707ac,'templateName':_0x12e98d});}}catch(_0x385b6f){if(_0xb90c5f){const _0x3ca74c=Date[_0x45161e(0x12e)]()-_0x49afc1;logger['error'](_0x45161e(0x100),_0x45161e(0x12a),{'templatePath':_0x49224e,'targetPath':_0x309b16,'pageName':_0x8707ac,'templateName':_0x12e98d,'error':_0x385b6f instanceof Error?_0x385b6f[_0x45161e(0x126)]:String(_0x385b6f),'duration':_0x3ca74c});}throw _0x385b6f;}}static async[a262_0x13c30c(0x11f)](_0xbae392,_0x4cde3f,_0xc6206c,_0x2960d0){const _0x21c3b4=a262_0x13c30c,_0x3edf9d=await a262_0x29d09b[_0x21c3b4(0x122)]['readdir'](_0xbae392,{'withFileTypes':!![]});for(const _0x567c35 of _0x3edf9d){const _0x365cfe=a262_0x5bc4c8[_0x21c3b4(0x11c)](_0xbae392,_0x567c35['name']);let _0x53c40c=a262_0x5bc4c8[_0x21c3b4(0x11c)](_0x4cde3f,_0x567c35[_0x21c3b4(0x124)]);_0x567c35['name'][_0x21c3b4(0xfb)](_0x21c3b4(0x111))&&(_0x53c40c=a262_0x5bc4c8[_0x21c3b4(0x11c)](_0x4cde3f,_0x567c35[_0x21c3b4(0x124)][_0x21c3b4(0x130)](/\.tpl$/,'')));if(_0x567c35[_0x21c3b4(0xf2)]())await a262_0x29d09b[_0x21c3b4(0x122)][_0x21c3b4(0x116)](_0x53c40c,{'recursive':!![]}),await this[_0x21c3b4(0x11f)](_0x365cfe,_0x53c40c,_0xc6206c,_0x2960d0);else _0x567c35[_0x21c3b4(0xf7)]()&&await this['processFile'](_0x365cfe,_0x53c40c,_0xc6206c,_0x2960d0);}}static async[a262_0x13c30c(0x110)](_0x4d94bd,_0x361e89,_0x3ca570,_0x239371){const _0x17ec02=a262_0x13c30c,_0x827567=a262_0x5bc4c8[_0x17ec02(0xf4)](_0x4d94bd)[_0x17ec02(0x123)]();_0x4d94bd[_0x17ec02(0xfb)](_0x17ec02(0x111))&&(_0x361e89=_0x361e89[_0x17ec02(0x130)](/\.tpl$/,''));const _0x4194e2=[_0x17ec02(0x125),'.ts',_0x17ec02(0xf1),_0x17ec02(0x12b),_0x17ec02(0x10e),_0x17ec02(0x10f),_0x17ec02(0x11e),'.scss',_0x17ec02(0x111)];if(_0x4194e2[_0x17ec02(0x104)](_0x827567)||_0x4d94bd[_0x17ec02(0xfb)](_0x17ec02(0x111))){const _0x479ba6=await a262_0x29d09b[_0x17ec02(0x122)][_0x17ec02(0x118)](_0x4d94bd,_0x17ec02(0xfe)),_0x2c3bd0=this[_0x17ec02(0x11a)](_0x479ba6,_0x3ca570,_0x239371);await a262_0x29d09b[_0x17ec02(0x122)][_0x17ec02(0x11b)](_0x361e89,_0x2c3bd0,_0x17ec02(0xfe));}else await a262_0x29d09b[_0x17ec02(0x122)]['copyFile'](_0x4d94bd,_0x361e89);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a7eea,_0x4808cd){const _0x1eb521=a263_0x39a0,_0x508b45=_0x5a7eea();while(!![]){try{const _0x584a8e=-parseInt(_0x1eb521(0x1aa))/0x1+parseInt(_0x1eb521(0x1bc))/0x2*(parseInt(_0x1eb521(0x1b5))/0x3)+parseInt(_0x1eb521(0x1c3))/0x4+parseInt(_0x1eb521(0x1ab))/0x5+parseInt(_0x1eb521(0x1c6))/0x6*(parseInt(_0x1eb521(0x1ad))/0x7)+parseInt(_0x1eb521(0x1ac))/0x8+-parseInt(_0x1eb521(0x1ae))/0x9*(parseInt(_0x1eb521(0x1b1))/0xa);if(_0x584a8e===_0x4808cd)break;else _0x508b45['push'](_0x508b45['shift']());}catch(_0x5d872e){_0x508b45['push'](_0x508b45['shift']());}}}(a263_0x42b2,0x9c5ee));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a263_0x1a8c5c from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function a263_0x39a0(_0x2a3283,_0x29f577){_0x2a3283=_0x2a3283-0x1a8;const _0x42b2dc=a263_0x42b2();let _0x39a027=_0x42b2dc[_0x2a3283];return _0x39a027;}function isUpdateNoticeDisabled(){const _0x3edde5=a263_0x39a0,_0x9eabac=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x3edde5(0x1ba)]()[_0x3edde5(0x1b2)]();return _0x9eabac==='1'||_0x9eabac===_0x3edde5(0x1bf)||_0x9eabac===_0x3edde5(0x1c4);}function a263_0x42b2(){const _0x12d694=['yes','object','6sfeKFr','rabetbase-cli','\x20update','579961qNFzWG','820655rEWGAG','2409632bwskWN','7193669VkAWsT','9ifBinH','gte','number','15709130lGAxVW','toLowerCase','valid','parse','6042shMeDD','checkedAt','update-check.json','lastNotifiedAt','.cache','trim','\x20available,\x20current\x20','200LfTGXi','now','utf8','true','/v/','lastNotifiedVersion','stringify','4387864swkyVE'];a263_0x42b2=function(){return _0x12d694;};return a263_0x42b2();}function cacheRoot(){const _0x3dc1da=a263_0x39a0;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3dc1da(0x1b9));}export function getUpdateNoticeCachePath(){const _0x132749=a263_0x39a0;return join(cacheRoot(),_0x132749(0x1a8),_0x132749(0x1b7));}async function readUpdateNoticeCache(){const _0x147f8f=a263_0x39a0;try{const _0x2709ec=await readFile(getUpdateNoticeCachePath(),_0x147f8f(0x1be)),_0x425db0=JSON[_0x147f8f(0x1b4)](_0x2709ec);if(!_0x425db0||typeof _0x425db0!==_0x147f8f(0x1c5))return{};return _0x425db0;}catch{return{};}}async function writeUpdateNoticeCache(_0x4acd2a){const _0x2be267=a263_0x39a0;try{const _0x114702=getUpdateNoticeCachePath();await mkdir(dirname(_0x114702),{'recursive':!![]}),await writeFile(_0x114702,JSON[_0x2be267(0x1c2)](_0x4acd2a,null,0x2)+'\x0a',_0x2be267(0x1be));}catch{}}function isFreshCheck(_0x22e5e0,_0x1d9d4d){const _0xc918ab=a263_0x39a0;return typeof _0x22e5e0[_0xc918ab(0x1b6)]===_0xc918ab(0x1b0)&&_0x1d9d4d-_0x22e5e0[_0xc918ab(0x1b6)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x27e44d,_0xd19b8f,_0x56a242){const _0x46e943=a263_0x39a0;return _0x27e44d[_0x46e943(0x1c1)]===_0xd19b8f&&typeof _0x27e44d['lastNotifiedAt']===_0x46e943(0x1b0)&&_0x56a242-_0x27e44d[_0x46e943(0x1b8)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1e5c82){const _0x498b90=a263_0x39a0;return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+_0x498b90(0x1c0)+_0x1e5c82;}export async function resolveLatestUpdateNotice(){const _0x2e76bb=a263_0x39a0;if(isUpdateNoticeDisabled())return null;try{const _0x363b25=Date[_0x2e76bb(0x1bd)](),_0x5747ae=getCliVersion(),_0x2749fe=await readUpdateNoticeCache();let _0x495ce1=isFreshCheck(_0x2749fe,_0x363b25)?_0x2749fe['latest']?.[_0x2e76bb(0x1ba)]():undefined;if(!_0x495ce1&&!isFreshCheck(_0x2749fe,_0x363b25)){const _0x158155=await getCliVersionPolicy();_0x495ce1=_0x158155?.['stableVersion']?.[_0x2e76bb(0x1ba)]()||undefined,await writeUpdateNoticeCache({..._0x2749fe,'checkedAt':_0x363b25,'latest':_0x495ce1,'failed':!_0x495ce1});}if(!_0x495ce1||!a263_0x1a8c5c[_0x2e76bb(0x1b3)](_0x5747ae)||!a263_0x1a8c5c[_0x2e76bb(0x1b3)](_0x495ce1))return null;if(a263_0x1a8c5c[_0x2e76bb(0x1af)](_0x5747ae,_0x495ce1))return null;if(isRecentlyNotified(_0x2749fe,_0x495ce1,_0x363b25))return null;const _0x5caefa=CLI_BIN_NAME+_0x2e76bb(0x1a9);return await writeUpdateNoticeCache({..._0x2749fe,'checkedAt':isFreshCheck(_0x2749fe,_0x363b25)?_0x2749fe['checkedAt']:_0x363b25,'latest':_0x495ce1,'failed':![],'lastNotifiedVersion':_0x495ce1,'lastNotifiedAt':_0x363b25}),{'command':_0x5caefa,'current':_0x5747ae,'latest':_0x495ce1,'url':buildNpmVersionUrl(_0x495ce1),'message':CLI_BIN_NAME+'\x20'+_0x495ce1+_0x2e76bb(0x1bb)+_0x5747ae+',\x20run:\x20'+_0x5caefa};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a264_0x381a(_0x3f8f94,_0x538b25){_0x3f8f94=_0x3f8f94-0xfc;var _0x2a4e14=a264_0x2a4e();var _0x381a74=_0x2a4e14[_0x3f8f94];return _0x381a74;}(function(_0x18914f,_0x40836e){var _0x4119d0=a264_0x381a,_0x34a177=_0x18914f();while(!![]){try{var _0x1e1335=-parseInt(_0x4119d0(0x100))/0x1+parseInt(_0x4119d0(0xff))/0x2+parseInt(_0x4119d0(0xfe))/0x3+parseInt(_0x4119d0(0x101))/0x4+-parseInt(_0x4119d0(0x102))/0x5+-parseInt(_0x4119d0(0xfd))/0x6+parseInt(_0x4119d0(0xfc))/0x7;if(_0x1e1335===_0x40836e)break;else _0x34a177['push'](_0x34a177['shift']());}catch(_0x3db1ee){_0x34a177['push'](_0x34a177['shift']());}}}(a264_0x2a4e,0x822ad));import{VERSION}from'../generated/build-info.js';function a264_0x2a4e(){var _0x6e578f=['3715166SzMgTF','3760722qwVHSO','533307kCamJa','1381762YQEcSr','617263xGtCYR','3754764diqdbd','2804320EdeTyR'];a264_0x2a4e=function(){return _0x6e578f;};return a264_0x2a4e();}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a265_0xe77e(_0x2ad802,_0x152e6a){_0x2ad802=_0x2ad802-0x17a;var _0x3ee308=a265_0x3ee3();var _0xe77e0f=_0x3ee308[_0x2ad802];return _0xe77e0f;}(function(_0x4707e6,_0x39d02d){var _0x3de994=a265_0xe77e,_0x4a0889=_0x4707e6();while(!![]){try{var _0x117af3=-parseInt(_0x3de994(0x17b))/0x1+parseInt(_0x3de994(0x17a))/0x2+parseInt(_0x3de994(0x180))/0x3*(-parseInt(_0x3de994(0x17e))/0x4)+parseInt(_0x3de994(0x17f))/0x5+-parseInt(_0x3de994(0x17c))/0x6*(-parseInt(_0x3de994(0x17d))/0x7)+parseInt(_0x3de994(0x181))/0x8+parseInt(_0x3de994(0x182))/0x9;if(_0x117af3===_0x39d02d)break;else _0x4a0889['push'](_0x4a0889['shift']());}catch(_0x5ce4b1){_0x4a0889['push'](_0x4a0889['shift']());}}}(a265_0x3ee3,0x7d013));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x12cf1e,_0x1341a3){setActiveCookie(_0x12cf1e);try{return await _0x1341a3();}finally{clearActiveCookie();}}function a265_0x3ee3(){var _0x1f688b=['10492PXrIXh','898999hatkij','6mnADmw','274673LvBGdj','1108YFBTQX','2086800zZBABp','1266nCXcdV','7676576tpHEua','958455jyrQrY'];a265_0x3ee3=function(){return _0x1f688b;};return a265_0x3ee3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e291b,_0x5d63c5){var _0x136c64=a266_0xf1c5,_0x2ab67e=_0x3e291b();while(!![]){try{var _0x298a7b=-parseInt(_0x136c64(0xbb))/0x1*(-parseInt(_0x136c64(0xbf))/0x2)+parseInt(_0x136c64(0xc2))/0x3+parseInt(_0x136c64(0xc1))/0x4*(-parseInt(_0x136c64(0xba))/0x5)+-parseInt(_0x136c64(0xc4))/0x6+-parseInt(_0x136c64(0xbe))/0x7+-parseInt(_0x136c64(0xc3))/0x8*(-parseInt(_0x136c64(0xbd))/0x9)+parseInt(_0x136c64(0xbc))/0xa;if(_0x298a7b===_0x5d63c5)break;else _0x2ab67e['push'](_0x2ab67e['shift']());}catch(_0x2f9c79){_0x2ab67e['push'](_0x2ab67e['shift']());}}}(a266_0x4801,0xe8c1e));function a266_0xf1c5(_0x4824a8,_0x1296c1){_0x4824a8=_0x4824a8-0xb9;var _0x480182=a266_0x4801();var _0xf1c5ac=_0x480182[_0x4824a8];return _0xf1c5ac;}export function writeCliSideChannelLine(_0x374e91){var _0x367c06=a266_0xf1c5;process[_0x367c06(0xc0)][_0x367c06(0xb9)](_0x374e91+'\x0a');}function a266_0x4801(){var _0x246467=['write','22405QCRwDx','4361WVVWNV','6342230cZWSio','288QxgQnE','8655367IEOdsN','244GNwixh','stderr','556DBEMOP','2289132nORdJv','411640NvzznL','4578930diRlVn'];a266_0x4801=function(){return _0x246467;};return a266_0x4801();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.15-beta.1",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|