@lovrabet/rabetbase-cli 2.3.13 → 2.3.14
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 -0
- 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 -0
- 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_0x51a895=a247_0x1456;(function(_0x2bbb33,_0xb090c8){const _0x3185ce=a247_0x1456,_0x51c6d9=_0x2bbb33();while(!![]){try{const _0x437947=-parseInt(_0x3185ce(0x20d))/0x1+parseInt(_0x3185ce(0x205))/0x2+-parseInt(_0x3185ce(0x1f7))/0x3*(parseInt(_0x3185ce(0x209))/0x4)+-parseInt(_0x3185ce(0x1fd))/0x5*(parseInt(_0x3185ce(0x1f5))/0x6)+-parseInt(_0x3185ce(0x20c))/0x7+parseInt(_0x3185ce(0x204))/0x8+parseInt(_0x3185ce(0x1fc))/0x9;if(_0x437947===_0xb090c8)break;else _0x51c6d9['push'](_0x51c6d9['shift']());}catch(_0x395a37){_0x51c6d9['push'](_0x51c6d9['shift']());}}}(a247_0x59b6,0x36a47));function a247_0x1456(_0x5db813,_0x3d1598){_0x5db813=_0x5db813-0x1ea;const _0x59b693=a247_0x59b6();let _0x14562b=_0x59b693[_0x5db813];return _0x14562b;}import a247_0x50372b from'node:fs';import a247_0x2d2e32 from'node:path';import a247_0xe58959 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a247_0x51a895(0x200);function isNonNumericVersion(_0x59b71b){const _0x4e550e=a247_0x51a895,_0x455d6e=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x455d6e[_0x4e550e(0x207)](_0x5762e9=>_0x5762e9[_0x4e550e(0x1ec)](_0x59b71b));}function getInstalledVersion(_0x1ec93f,_0x47084a){const _0x4d1d53=a247_0x51a895;try{const _0x5338f7=a247_0x2d2e32['join'](_0x1ec93f,'node_modules',_0x47084a,'package.json');if(a247_0x50372b[_0x4d1d53(0x1f8)](_0x5338f7)){const _0xa6e094=JSON[_0x4d1d53(0x20f)](a247_0x50372b[_0x4d1d53(0x202)](_0x5338f7,_0x4d1d53(0x1ea)));return _0xa6e094[_0x4d1d53(0x201)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1fef16=a247_0x51a895;try{const _0xfe2443=await getCdnConfig();return _0xfe2443?.[_0x1fef16(0x1f4)]?.[_0x1fef16(0x1fb)]?.[_0x1fef16(0x1f2)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x523d0f=a247_0x51a895;try{const _0x211ae0=await getCdnConfig();return _0x211ae0?.[_0x523d0f(0x1f4)]?.[_0x523d0f(0x1fb)]?.[_0x523d0f(0x208)]||_0x523d0f(0x1ed);}catch{return _0x523d0f(0x1ed);}}export async function checkSdkVersion(_0x2f2a1c){const _0x4adee0=a247_0x51a895,_0x1204f6=a247_0x2d2e32['join'](_0x2f2a1c,_0x4adee0(0x1f0)),[_0x580a0b,_0x11bcca]=await Promise[_0x4adee0(0x20b)]([getSdkStableVersion(),getSdkPackageName()]),_0x14556b=_0x580a0b||FALLBACK_MIN_SDK_VERSION;if(!a247_0x50372b[_0x4adee0(0x1f8)](_0x1204f6))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x14556b,'packageName':_0x11bcca,'stableVersion':_0x580a0b};try{const _0x19ca7e=JSON[_0x4adee0(0x20f)](a247_0x50372b[_0x4adee0(0x202)](_0x1204f6,'utf8')),_0x337f12=_0x19ca7e['dependencies']||{},_0x1ccab2=_0x19ca7e[_0x4adee0(0x1fa)]||{},_0x447356=_0x337f12[_0x11bcca]||_0x1ccab2[_0x11bcca];if(!_0x447356)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x14556b,'packageName':_0x11bcca,'stableVersion':_0x580a0b};let _0x1f5606=getInstalledVersion(_0x2f2a1c,_0x11bcca);!_0x1f5606&&(_0x1f5606=_0x447356);if(isNonNumericVersion(_0x447356))return{'installed':!![],'version':_0x1f5606,'needsUpgrade':![],'minVersion':_0x14556b,'packageName':_0x11bcca,'stableVersion':_0x580a0b};const _0x2b085a=a247_0xe58959[_0x4adee0(0x1f9)](_0x1f5606),_0x14b5ba=a247_0xe58959[_0x4adee0(0x1f9)](_0x14556b),_0x1d9f9b=_0x2b085a&&_0x14b5ba?a247_0xe58959['lt'](_0x2b085a,_0x14b5ba):![];return{'installed':!![],'version':_0x1f5606,'needsUpgrade':_0x1d9f9b,'minVersion':_0x14556b,'packageName':_0x11bcca,'stableVersion':_0x580a0b};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x14556b,'packageName':_0x11bcca,'stableVersion':_0x580a0b};}}export function checkSdkVersionSync(_0x1c028){const _0x485918=a247_0x51a895,_0x11b0f3=a247_0x2d2e32['join'](_0x1c028,'package.json'),_0x3f6b28=_0x485918(0x1ed);if(!a247_0x50372b[_0x485918(0x1f8)](_0x11b0f3))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f6b28,'stableVersion':null};try{const _0x5242ff=JSON[_0x485918(0x20f)](a247_0x50372b[_0x485918(0x202)](_0x11b0f3,_0x485918(0x203))),_0x2f255a=_0x5242ff['dependencies']||{},_0x58c453=_0x5242ff['devDependencies']||{},_0x574a30=_0x2f255a[_0x3f6b28]||_0x58c453[_0x3f6b28];if(!_0x574a30)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f6b28,'stableVersion':null};let _0x2a24f2=getInstalledVersion(_0x1c028,_0x3f6b28);!_0x2a24f2&&(_0x2a24f2=_0x574a30);if(isNonNumericVersion(_0x574a30))return{'installed':!![],'version':_0x2a24f2,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f6b28,'stableVersion':null};const _0x16a033=a247_0xe58959['coerce'](_0x2a24f2),_0x31ae9d=_0x16a033?a247_0xe58959['lt'](_0x16a033,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x2a24f2,'needsUpgrade':_0x31ae9d,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f6b28,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f6b28,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x592f94){const _0x19818a=a247_0x51a895;if(!_0x592f94[_0x19818a(0x1ee)])return;const _0x261b23=_0x19818a(0x206),_0xadad4a=_0x19818a(0x1eb),_0x30fc76=_0x19818a(0x1ff),_0x5e2812=_0x592f94[_0x19818a(0x208)]||_0x19818a(0x1ed),_0xf5e05c=_0x592f94[_0x19818a(0x1f2)]||_0x592f94[_0x19818a(0x20e)],_0x32bd62='npm\x20install\x20'+_0x5e2812+'@'+(_0xf5e05c||_0x19818a(0x1fe));console['log'](),console[_0x19818a(0x1f6)](''+_0x261b23+_0x30fc76+_0x19818a(0x1f1)+_0xadad4a),console[_0x19818a(0x1f6)](_0x261b23+_0x19818a(0x1ef)+_0x5e2812+'@'+_0x592f94[_0x19818a(0x201)]+_0xadad4a),console[_0x19818a(0x1f6)](_0x261b23+_0x19818a(0x1f3)+_0xf5e05c+_0xadad4a),console['log'](_0x261b23+_0x19818a(0x20a)+_0x32bd62+_0xadad4a),console[_0x19818a(0x1f6)]();}function a247_0x59b6(){const _0x574019=['readFileSync','utf8','1132664EwvZMw','274312AlwVcz','\x1b[33m','some','packageName','4bbQRAw','\x20\x20\x20Upgrade\x20command:\x20','all','338786rYVfiP','198044FztCZl','minVersion','parse','utf-8','\x1b[0m','test','@lovrabet/sdk','needsUpgrade','\x20\x20\x20Current\x20version:\x20','package.json','↪\x20SDK\x20update\x20available','stableVersion','\x20\x20\x20Stable\x20version:\x20','sdk','6ZDubzl','log','356808cNnxml','existsSync','coerce','devDependencies','node','3392055pyPDaK','332205VQopNJ','latest','\x1b[1m','1.2.0','version'];a247_0x59b6=function(){return _0x574019;};return a247_0x59b6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x86d81a,_0x207f57){const _0x1f211c=a248_0x5458,_0x4916a5=_0x86d81a();while(!![]){try{const _0x1519bf=parseInt(_0x1f211c(0xfd))/0x1+parseInt(_0x1f211c(0xf0))/0x2+-parseInt(_0x1f211c(0xe7))/0x3*(parseInt(_0x1f211c(0x100))/0x4)+-parseInt(_0x1f211c(0xeb))/0x5*(-parseInt(_0x1f211c(0xea))/0x6)+parseInt(_0x1f211c(0xf9))/0x7*(parseInt(_0x1f211c(0xf5))/0x8)+parseInt(_0x1f211c(0xf7))/0x9*(parseInt(_0x1f211c(0xe6))/0xa)+parseInt(_0x1f211c(0xf8))/0xb*(-parseInt(_0x1f211c(0xde))/0xc);if(_0x1519bf===_0x207f57)break;else _0x4916a5['push'](_0x4916a5['shift']());}catch(_0x1c58f0){_0x4916a5['push'](_0x4916a5['shift']());}}}(a248_0x53b5,0x6bc32));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';function a248_0x53b5(){const _0x1e548d=['stableVersion','currentVersion','\x20\x20\x20Recommended\x20stable:\x20','110962uZWmlq','parse','minimumVersionMessage','npm\x20install\x20-g\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','1417032iebRZS','filter','1638495xoaaxX','2211AjCgHW','21qrhKmn','minimumVersion','1.0.0','version','67243OpxiLA','log','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','700324HNjWQl','\x1b[1m','↪\x20New\x20version\x20available','\x20\x20\x20Minimum\x20supported:\x20','coerce','latest','34512BAUPrb','\x20\x20\x20Current\x20CLI\x20version:\x20','package.json','upgradeMessage','Minimum\x20supported:\x20','Current\x20version:\x20','Upgrade\x20command:\x20','\x20\x20\x20Upgrade\x20command:\x20','20ZJpvkq','15EFolOD','validation','belowMinimum','18THzUGr','1461090UJIyHh','needsUpgrade'];a248_0x53b5=function(){return _0x1e548d;};return a248_0x53b5();}import a248_0x227446 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x5061df){const _0x3bca32=a248_0x5458,_0x5593ea=_0x5061df[_0x3bca32(0xed)]||_0x3bca32(0xdd);return _0x3bca32(0xf3)+NPM_PACKAGE_NAME+'@'+_0x5593ea;}function getCurrentCliVersion(){const _0x6bf0fd=a248_0x5458;try{const _0x3bb086=fileURLToPath(import.meta.url),_0xbd1db9=resolve(dirname(_0x3bb086),'../..'),_0x2f624c=resolve(_0xbd1db9,_0x6bf0fd(0xe0)),_0x21e665=JSON[_0x6bf0fd(0xf1)](readFileSync(_0x2f624c,'utf-8'));return _0x21e665[_0x6bf0fd(0xfc)]||_0x6bf0fd(0xfb);}catch{return _0x6bf0fd(0xfb);}}export async function checkCliVersion(){const _0x217b64=a248_0x5458,_0x3cfe34=getCurrentCliVersion(),_0x39a4f4=await getCliVersionPolicy(),_0x32f5e1=_0x39a4f4?.[_0x217b64(0xed)]||null,_0x3e4e16=_0x39a4f4?.[_0x217b64(0xfa)]||null;let _0x4ce0b8=![],_0x51262c=![];const _0x152521=a248_0x227446[_0x217b64(0xdc)](_0x3cfe34);if(_0x152521&&_0x32f5e1)try{const _0x153cc7=a248_0x227446[_0x217b64(0xdc)](_0x32f5e1);if(_0x153cc7)_0x4ce0b8=a248_0x227446['lt'](_0x152521,_0x153cc7);}catch{}if(_0x152521&&_0x3e4e16)try{const _0x5c97b5=a248_0x227446['coerce'](_0x3e4e16);if(_0x5c97b5)_0x51262c=a248_0x227446['lt'](_0x152521,_0x5c97b5);}catch{}return _0x51262c&&(_0x4ce0b8=!![]),{'currentVersion':_0x3cfe34,'stableVersion':_0x32f5e1,'minimumVersion':_0x3e4e16,'needsUpgrade':_0x4ce0b8,'belowMinimum':_0x51262c,'isPreRelease':![],'upgradeMessage':_0x39a4f4?.[_0x217b64(0xe1)],'minimumVersionMessage':_0x39a4f4?.[_0x217b64(0xf2)]};}function a248_0x5458(_0x55fc69,_0x2ea11f){_0x55fc69=_0x55fc69-0xda;const _0x53b55e=a248_0x53b5();let _0x5458dd=_0x53b55e[_0x55fc69];return _0x5458dd;}export function printCliUpgradeWarning(_0x43b297){const _0x1c6815=a248_0x5458;if(!_0x43b297[_0x1c6815(0xec)]&&!_0x43b297[_0x1c6815(0xe9)])return;const _0x22fc3e='\x1b[31m',_0x11d072='\x1b[33m',_0x2cf879='\x1b[0m',_0x3397d0=_0x1c6815(0x101),_0x20c55e=getCliUpgradeCommand(_0x43b297);console[_0x1c6815(0xfe)](),_0x43b297[_0x1c6815(0xe9)]?(console[_0x1c6815(0xfe)](''+_0x22fc3e+_0x3397d0+_0x1c6815(0xf4)+_0x2cf879),console[_0x1c6815(0xfe)](_0x22fc3e+_0x1c6815(0xdf)+_0x43b297[_0x1c6815(0xee)]+_0x2cf879),_0x43b297[_0x1c6815(0xfa)]&&console['log'](_0x22fc3e+_0x1c6815(0xdb)+_0x43b297['minimumVersion']+_0x2cf879),_0x43b297[_0x1c6815(0xed)]&&_0x43b297['stableVersion']!==_0x43b297[_0x1c6815(0xfa)]&&console['log'](_0x22fc3e+_0x1c6815(0xef)+_0x43b297[_0x1c6815(0xed)]+_0x2cf879),_0x43b297[_0x1c6815(0xf2)]&&console['log'](_0x22fc3e+'\x20\x20\x20'+_0x43b297['minimumVersionMessage']+_0x2cf879),console[_0x1c6815(0xfe)](_0x22fc3e+_0x1c6815(0xe5)+_0x20c55e+_0x2cf879)):(console[_0x1c6815(0xfe)](''+_0x11d072+_0x3397d0+_0x1c6815(0xda)+_0x2cf879),console['log'](_0x11d072+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x43b297[_0x1c6815(0xee)]+_0x2cf879),console[_0x1c6815(0xfe)](_0x11d072+'\x20\x20\x20Stable\x20version:\x20'+_0x43b297[_0x1c6815(0xed)]+_0x2cf879),_0x43b297[_0x1c6815(0xe1)]&&console[_0x1c6815(0xfe)](_0x11d072+'\x20\x20\x20'+_0x43b297[_0x1c6815(0xe1)]+_0x2cf879),console[_0x1c6815(0xfe)](_0x11d072+_0x1c6815(0xe5)+_0x20c55e+_0x2cf879)),console[_0x1c6815(0xfe)]();}export function assertCliVersionSupported(_0x1ffbd7){const _0x47488b=a248_0x5458;if(!_0x1ffbd7[_0x47488b(0xe9)])return;const _0x288eef=[_0x1ffbd7[_0x47488b(0xf2)],_0x47488b(0xe3)+_0x1ffbd7[_0x47488b(0xee)],_0x1ffbd7['minimumVersion']?_0x47488b(0xe2)+_0x1ffbd7[_0x47488b(0xfa)]:null,_0x47488b(0xe4)+getCliUpgradeCommand(_0x1ffbd7)][_0x47488b(0xf6)](Boolean)['join']('\x0a');throw CliErrors[_0x47488b(0xe8)](_0x47488b(0xff),_0x288eef);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x584f3d,_0x375457){const _0x8cbdd2=a249_0x539a,_0x165014=_0x584f3d();while(!![]){try{const _0x3a46af=-parseInt(_0x8cbdd2(0x18d))/0x1*(parseInt(_0x8cbdd2(0x19b))/0x2)+-parseInt(_0x8cbdd2(0x191))/0x3+-parseInt(_0x8cbdd2(0x18b))/0x4+parseInt(_0x8cbdd2(0x1a2))/0x5*(parseInt(_0x8cbdd2(0x19c))/0x6)+parseInt(_0x8cbdd2(0x192))/0x7*(parseInt(_0x8cbdd2(0x19a))/0x8)+parseInt(_0x8cbdd2(0x19d))/0x9*(-parseInt(_0x8cbdd2(0x197))/0xa)+parseInt(_0x8cbdd2(0x195))/0xb*(parseInt(_0x8cbdd2(0x199))/0xc);if(_0x3a46af===_0x375457)break;else _0x165014['push'](_0x165014['shift']());}catch(_0x55c1f1){_0x165014['push'](_0x165014['shift']());}}}(a249_0x3d3d,0xe486d));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(_0x49d78e){const _0x1b0260=a249_0x539a;return typeof _0x49d78e==='string'&&_0x49d78e[_0x1b0260(0x193)]()[_0x1b0260(0x1a0)]>0x0?_0x49d78e[_0x1b0260(0x193)]():null;}function a249_0x539a(_0x313b43,_0x1e5a37){_0x313b43=_0x313b43-0x18b;const _0x3d3db5=a249_0x3d3d();let _0x539af1=_0x3d3db5[_0x313b43];return _0x539af1;}function normalizeCliVersionPolicy(_0x95dccf){const _0x37bf50=a249_0x539a;if(!_0x95dccf||typeof _0x95dccf!==_0x37bf50(0x190))return null;const _0x40e68e=_0x95dccf,_0x5d86c6=_0x40e68e[_0x37bf50(0x19f)]&&typeof _0x40e68e['cli']===_0x37bf50(0x190)?_0x40e68e['cli']:_0x40e68e,_0x32ffd9=pickString(_0x5d86c6[_0x37bf50(0x18e)])||pickString(_0x5d86c6[_0x37bf50(0x198)])||pickString(_0x5d86c6[_0x37bf50(0x1a1)]),_0x249020=pickString(_0x5d86c6[_0x37bf50(0x18f)])||pickString(_0x5d86c6[_0x37bf50(0x196)]);if(!_0x32ffd9&&!_0x249020)return null;return{'stableVersion':_0x32ffd9,'minimumVersion':_0x249020,'upgradeMessage':pickString(_0x5d86c6[_0x37bf50(0x19e)])||undefined,'minimumVersionMessage':pickString(_0x5d86c6['minimumVersionMessage'])||undefined};}export async function fetchCliVersionPolicy(){const _0x45e326=a249_0x539a,_0x183ec5=new AbortController(),_0x304d99=setTimeout(()=>_0x183ec5[_0x45e326(0x18c)](),FETCH_TIMEOUT_MS);try{const _0x4f42c4=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x183ec5[_0x45e326(0x1a3)]});if(!_0x4f42c4['ok'])return null;const _0x35c38a=await _0x4f42c4[_0x45e326(0x194)]();return normalizeCliVersionPolicy(_0x35c38a);}catch{return null;}finally{clearTimeout(_0x304d99);}}function a249_0x3d3d(){const _0x26fcbd=['minVersion','399820zejCTy','latestVersion','11585112SGzEDd','1651032KJglEB','214238AJouHU','1357650mEJQrc','180DeWyby','upgradeMessage','cli','length','recommendedVersion','10CsDjwJ','signal','now','2112732bSIdVP','abort','11JQgKGN','stableVersion','minimumVersion','object','3854505YmdNZS','14evyhWX','trim','json','44felZWj'];a249_0x3d3d=function(){return _0x26fcbd;};return a249_0x3d3d();}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x9686f3=a249_0x539a,_0x3a92b1=Date[_0x9686f3(0x1a4)]();if(hasCachedPolicy){const _0x227769=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x3a92b1-cacheTime<_0x227769)return cachedPolicy;}const _0xee72db=await fetchCliVersionPolicy();return cachedPolicy=_0xee72db,cacheTime=_0x3a92b1,hasCachedPolicy=!![],_0xee72db;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a250_0x5d13(_0x14a3a7,_0x394138){_0x14a3a7=_0x14a3a7-0xe6;const _0x312dab=a250_0x312d();let _0x5d13a1=_0x312dab[_0x14a3a7];return _0x5d13a1;}const a250_0x457f0d=a250_0x5d13;(function(_0x5c2fad,_0x204cc6){const _0x57b77a=a250_0x5d13,_0x5157d0=_0x5c2fad();while(!![]){try{const _0xe073fe=parseInt(_0x57b77a(0xe7))/0x1*(-parseInt(_0x57b77a(0xed))/0x2)+-parseInt(_0x57b77a(0xe8))/0x3*(parseInt(_0x57b77a(0xf2))/0x4)+-parseInt(_0x57b77a(0xf4))/0x5*(-parseInt(_0x57b77a(0xeb))/0x6)+parseInt(_0x57b77a(0xf0))/0x7*(parseInt(_0x57b77a(0xef))/0x8)+-parseInt(_0x57b77a(0xec))/0x9*(-parseInt(_0x57b77a(0xf1))/0xa)+-parseInt(_0x57b77a(0xea))/0xb*(-parseInt(_0x57b77a(0xee))/0xc)+-parseInt(_0x57b77a(0xe9))/0xd*(parseInt(_0x57b77a(0xf3))/0xe);if(_0xe073fe===_0x204cc6)break;else _0x5157d0['push'](_0x5157d0['shift']());}catch(_0x40dc80){_0x5157d0['push'](_0x5157d0['shift']());}}}(a250_0x312d,0xe5b28));import{initEnv}from'../constant/env.js';function a250_0x312d(){const _0x338fef=['219gunmla','92346ypyiMz','2013713qbemoB','1898721GMmSxi','30VHRKUp','641340uEPlwa','470gxrAKc','60qChsug','11147504qTGUyj','7IYAEIY','20ezELcg','196cxirSm','70JcUeqZ','876115hXJHTZ','project','env'];a250_0x312d=function(){return _0x338fef;};return a250_0x312d();}import{readRawConfig,getConfigAppCode as a250_0x4e01dc,getMultiAppConfigs as a250_0x238363,getTemplateBaseUrl as a250_0x5becd6}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x5bb0bb){const _0x25b1c4=a250_0x5d13,_0x4cdb3c=readRawConfig(_0x5bb0bb);return _0x4cdb3c[_0x25b1c4(0xe6)]&&typeof _0x4cdb3c[_0x25b1c4(0xe6)]==='string'&&initEnv(_0x4cdb3c[_0x25b1c4(0xe6)]),_0x4cdb3c;}export function getConfigAppCode(){return a250_0x4e01dc();}export function getMultiAppConfigs(_0x318b0a=a250_0x457f0d(0xf5)){return a250_0x238363(_0x318b0a);}export function getTemplateBaseUrl(){return a250_0x5becd6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d2fff,_0x116304){const _0x321acb=a251_0x9fb4,_0x671680=_0x4d2fff();while(!![]){try{const _0x543864=-parseInt(_0x321acb(0x1c5))/0x1+parseInt(_0x321acb(0x1c6))/0x2+parseInt(_0x321acb(0x1c7))/0x3*(-parseInt(_0x321acb(0x1b9))/0x4)+-parseInt(_0x321acb(0x1bb))/0x5*(-parseInt(_0x321acb(0x1ba))/0x6)+parseInt(_0x321acb(0x1c3))/0x7+parseInt(_0x321acb(0x1bf))/0x8+parseInt(_0x321acb(0x1be))/0x9*(-parseInt(_0x321acb(0x1c4))/0xa);if(_0x543864===_0x116304)break;else _0x671680['push'](_0x671680['shift']());}catch(_0x5735ee){_0x671680['push'](_0x671680['shift']());}}}(a251_0xc281,0x4f34d));function a251_0x9fb4(_0x9c17f1,_0x2478b9){_0x9c17f1=_0x9c17f1-0x1b6;const _0xc281b=a251_0xc281();let _0x9fb476=_0xc281b[_0x9c17f1];return _0x9fb476;}function a251_0xc281(){const _0x570046=['120jqKpRK','102010zVHAXp','name','复制目录时出错:','1998144UdFKHP','1959728ozOInJ','copyFileSync','readdirSync','isDirectory','3242295GGpyxz','20rVAQDi','463893aZlchk','340974qbFTNb','54324CrIsov','join','mkdirSync','error','12clsMft'];a251_0xc281=function(){return _0x570046;};return a251_0xc281();}import a251_0x19aed6 from'node:path';import a251_0x1f525b from'node:fs';export async function copyDirectory(_0x5eba28,_0x3f4d65){const _0xf5f06c=a251_0x9fb4;try{const _0x2559e0=a251_0x1f525b[_0xf5f06c(0x1c1)](_0x5eba28,{'withFileTypes':!![]});a251_0x1f525b[_0xf5f06c(0x1b7)](_0x3f4d65,{'recursive':!![]});for(const _0x3ca009 of _0x2559e0){const _0x311049=a251_0x19aed6['join'](_0x5eba28,_0x3ca009[_0xf5f06c(0x1bc)]),_0x3965b0=a251_0x19aed6[_0xf5f06c(0x1b6)](_0x3f4d65,_0x3ca009['name']);_0x3ca009[_0xf5f06c(0x1c2)]()?await copyDirectory(_0x311049,_0x3965b0):a251_0x1f525b[_0xf5f06c(0x1c0)](_0x311049,_0x3965b0);}}catch(_0x414ad3){console[_0xf5f06c(0x1b8)](_0xf5f06c(0x1bd),_0x414ad3);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a252_0x2d8e(){const _0x3784c6=['107262uILuTp','425OoDZgL','4739rROmTB','211563sWSprg','2rBAUMj','56528tcSqag','12828YNHser','243IauOdX','object','string','2256924qYyzGu','isFinite','trim','269103RMfPSA','402cjQmVT','20DILWKB'];a252_0x2d8e=function(){return _0x3784c6;};return a252_0x2d8e();}(function(_0x16fe43,_0x1452aa){const _0x113535=a252_0x35ea,_0x2e5b69=_0x16fe43();while(!![]){try{const _0x3d081f=parseInt(_0x113535(0x1b0))/0x1*(parseInt(_0x113535(0x1b4))/0x2)+parseInt(_0x113535(0x1ad))/0x3+-parseInt(_0x113535(0x1b6))/0x4*(-parseInt(_0x113535(0x1b1))/0x5)+parseInt(_0x113535(0x1ae))/0x6*(parseInt(_0x113535(0x1b2))/0x7)+parseInt(_0x113535(0x1b5))/0x8*(-parseInt(_0x113535(0x1a7))/0x9)+parseInt(_0x113535(0x1af))/0xa*(parseInt(_0x113535(0x1b3))/0xb)+-parseInt(_0x113535(0x1aa))/0xc;if(_0x3d081f===_0x1452aa)break;else _0x2e5b69['push'](_0x2e5b69['shift']());}catch(_0x2241be){_0x2e5b69['push'](_0x2e5b69['shift']());}}}(a252_0x2d8e,0x2a9bc));function a252_0x35ea(_0x2976a9,_0x264bae){_0x2976a9=_0x2976a9-0x1a7;const _0x2d8e9e=a252_0x2d8e();let _0x35ea9d=_0x2d8e9e[_0x2976a9];return _0x35ea9d;}function toFiniteNumber(_0x42e430){const _0x5c63b4=a252_0x35ea;if(typeof _0x42e430==='number'&&Number[_0x5c63b4(0x1ab)](_0x42e430))return _0x42e430;if(typeof _0x42e430===_0x5c63b4(0x1a9)){const _0x1e3033=_0x42e430[_0x5c63b4(0x1ac)]();if(!_0x1e3033)return undefined;const _0x75a6a9=Number(_0x1e3033);if(Number['isFinite'](_0x75a6a9))return _0x75a6a9;}return undefined;}export function normalizeEntityWithIdResponse(_0x1042e0){const _0x218c72=a252_0x35ea,_0x123f67=toFiniteNumber(_0x1042e0);if(_0x123f67!==undefined)return{'id':_0x123f67,'entity':{'id':_0x123f67}};if(!_0x1042e0||typeof _0x1042e0!==_0x218c72(0x1a8))return{'id':undefined,'entity':{}};const _0x109ef8={..._0x1042e0},_0x4fdb4e=toFiniteNumber(_0x109ef8['id']);return _0x4fdb4e!==undefined&&(_0x109ef8['id']=_0x4fdb4e),{'id':_0x4fdb4e,'entity':_0x109ef8};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x321d2f,_0x24d0e1){const _0x777893=a253_0x4fd0,_0x34a891=_0x321d2f();while(!![]){try{const _0x182299=-parseInt(_0x777893(0x76))/0x1*(-parseInt(_0x777893(0x77))/0x2)+-parseInt(_0x777893(0x75))/0x3+-parseInt(_0x777893(0x7b))/0x4*(parseInt(_0x777893(0x73))/0x5)+parseInt(_0x777893(0x74))/0x6+-parseInt(_0x777893(0x79))/0x7*(-parseInt(_0x777893(0x72))/0x8)+parseInt(_0x777893(0x7c))/0x9+-parseInt(_0x777893(0x78))/0xa;if(_0x182299===_0x24d0e1)break;else _0x34a891['push'](_0x34a891['shift']());}catch(_0x3fe2d4){_0x34a891['push'](_0x34a891['shift']());}}}(a253_0x4d91,0x6e592));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a253_0x4d91(){const _0x2bf553=['7wezdcG','isDirectory','652XxAWJQ','4620735YCFwxA','6365936WJKutf','23315HAIMkP','2422674frlaoM','232833RPxQMu','4Reguhc','389312ObydkX','12018940WAzWbt'];a253_0x4d91=function(){return _0x2bf553;};return a253_0x4d91();}import{join}from'node:path';export async function copyDir(_0x307381,_0x449051){const _0x3f8e89=a253_0x4fd0,_0xe01710=statSync(_0x307381);if(_0xe01710[_0x3f8e89(0x7a)]()){!existsSync(_0x449051)&&mkdirSync(_0x449051,{'recursive':!![]});const _0x4714b4=readdirSync(_0x307381);for(const _0x3d278d of _0x4714b4){await copyDir(join(_0x307381,_0x3d278d),join(_0x449051,_0x3d278d));}}else copyFileSync(_0x307381,_0x449051);}export function ensureDir(_0x38257f){!existsSync(_0x38257f)&&mkdirSync(_0x38257f,{'recursive':!![]});}function a253_0x4fd0(_0x41e341,_0xae9ae7){_0x41e341=_0x41e341-0x72;const _0x4d9197=a253_0x4d91();let _0x4fd002=_0x4d9197[_0x41e341];return _0x4fd002;}export function pathExists(_0x473a19){return existsSync(_0x473a19);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a254_0x23ee7f=a254_0x46cf;(function(_0x186ec4,_0x4c1d2a){const _0x2fd297=a254_0x46cf,_0x2cd8cc=_0x186ec4();while(!![]){try{const _0x409729=parseInt(_0x2fd297(0x157))/0x1+parseInt(_0x2fd297(0x15b))/0x2*(-parseInt(_0x2fd297(0x145))/0x3)+-parseInt(_0x2fd297(0x159))/0x4+-parseInt(_0x2fd297(0x146))/0x5+parseInt(_0x2fd297(0x144))/0x6+parseInt(_0x2fd297(0x15c))/0x7*(parseInt(_0x2fd297(0x13f))/0x8)+-parseInt(_0x2fd297(0x141))/0x9*(parseInt(_0x2fd297(0x149))/0xa);if(_0x409729===_0x4c1d2a)break;else _0x2cd8cc['push'](_0x2cd8cc['shift']());}catch(_0x32807c){_0x2cd8cc['push'](_0x2cd8cc['shift']());}}}(a254_0x5562,0xd7c33));function a254_0x46cf(_0x5a7f88,_0x5e54a7){_0x5a7f88=_0x5a7f88-0x13d;const _0x556245=a254_0x5562();let _0x46cf04=_0x556245[_0x5a7f88];return _0x46cf04;}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 _0x3c649b=getTemplateBaseUrl();return _0x3c649b+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a254_0x23ee7f(0x13e),a254_0x23ee7f(0x147));export async function fetchGuidesFromCDN(){const _0x407c96=a254_0x23ee7f,_0x1ac9e5=getGuidesCdnUrl(),_0x596074=await fetch(_0x1ac9e5,{'headers':{'Accept':_0x407c96(0x14b)}});if(!_0x596074['ok'])throw new Error(_0x407c96(0x154)+_0x596074[_0x407c96(0x152)]+'\x20'+_0x596074['statusText']);const _0x375e76=await _0x596074[_0x407c96(0x14e)]();if(!_0x375e76[_0x407c96(0x156)]||typeof _0x375e76[_0x407c96(0x156)]!=='object')throw new Error(_0x407c96(0x15a));return _0x375e76;}export function writeGuidesToProject(_0x25ee84,_0x1ac99b,_0x3dbaae=a254_0x23ee7f(0x155),_0x3873f6){const _0x1a9200=a254_0x23ee7f,_0xefc354=join(_0x1ac99b,_0x3dbaae);mkdirSync(_0xefc354,{'recursive':!![]});for(const [_0x1becae,_0x358071]of Object[_0x1a9200(0x158)](_0x25ee84[_0x1a9200(0x156)])){let _0x10560c=_0x358071[_0x1a9200(0x14a)];_0x358071[_0x1a9200(0x14f)]&&(_0x10560c=appendUpdateTime(_0x10560c,_0x358071['lastUpdated'])),writeFileSync(join(_0xefc354,_0x1becae+_0x1a9200(0x14c)),_0x10560c,_0x1a9200(0x15f));}}export function appendUpdateTime(_0x275dea,_0x16e8ae){const _0x34cb35=a254_0x23ee7f;return _0x275dea=_0x275dea[_0x34cb35(0x148)](/\n*>更新时间:.*$/m,''),_0x275dea[_0x34cb35(0x142)]()+(_0x34cb35(0x143)+_0x16e8ae);}export function getSkillTemplate(_0x85378){return _0x85378['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x198636,_0x1a893a,_0x58d1c9){const _0x55ec95=a254_0x23ee7f,_0x584f3b=[];for(const [,_0x45a32b]of Object['entries'](_0x1a893a['guides'])){_0x45a32b[_0x55ec95(0x13d)]&&_0x584f3b['push'](_0x45a32b['extendContent'][_0x55ec95(0x142)]());}if(_0x584f3b['length']===0x0)return _0x198636;return _0x198636['trimEnd']()+'\x0a\x0a'+_0x584f3b[_0x55ec95(0x15d)]('\x0a\x0a')+'\x0a';}function a254_0x5562(){const _0x35ba83=['15560aLwxDp','content','application/json','.md','map','json','lastUpdated','skillTemplate','keys','status','path','CDN\x20请求失败:\x20','.lovrabet/skill/guides','guides','1274274LRjsEJ','entries','2462416xayFzj','CDN\x20返回数据格式错误','176BBidxp','175auTtUP','join','CDN\x20数据中缺少\x20skillTemplate','utf-8','extendContent','.lovrabet','27992Ytyksk','length','1395bARkYm','trimEnd','\x0a\x0a>更新时间:','8543550WjFOHe','29253CpPbWz','935195WsrZFG','cache','replace'];a254_0x5562=function(){return _0x35ba83;};return a254_0x5562();}export function writeSkillFile(_0x4784ca,_0x41d3dc,_0x454582){const _0x5aa81d=a254_0x23ee7f,_0xaa4d83=getSkillTemplate(_0x4784ca);if(!_0xaa4d83)throw new Error(_0x5aa81d(0x15e));const _0x577e50=dirname(_0x41d3dc);mkdirSync(_0x577e50,{'recursive':!![]});let _0x2787f8=_0xaa4d83['replace'](/\{\{IDE_NAME\}\}/g,_0x454582);_0x2787f8=appendExtendContents(_0x2787f8,_0x4784ca),_0x4784ca[_0x5aa81d(0x150)][_0x5aa81d(0x14f)]&&(_0x2787f8=appendUpdateTime(_0x2787f8,_0x4784ca[_0x5aa81d(0x150)][_0x5aa81d(0x14f)])),writeFileSync(_0x41d3dc,_0x2787f8,_0x5aa81d(0x15f));}export async function installGuides(_0x187509){const _0x4c378d=a254_0x23ee7f,_0xc73f7b=await fetchGuidesFromCDN();return writeGuidesToProject(_0xc73f7b,_0x187509),Object[_0x4c378d(0x151)](_0xc73f7b[_0x4c378d(0x156)])[_0x4c378d(0x140)];}export function getGuidesSummary(_0x8d27b5){const _0x385d69=a254_0x23ee7f;return Object[_0x385d69(0x158)](_0x8d27b5[_0x385d69(0x156)])[_0x385d69(0x14d)](([_0x4d09a0,_0x384ad9])=>({'key':_0x4d09a0,'title':_0x384ad9['title'],'path':_0x384ad9[_0x385d69(0x153)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a255_0x3a87(){const _0x58abe9=['message','9255dmZpZn','includes','name','56FbyuCO','1113060qUdBnI','fetch','84FWUTIC','ms\x20后进行第\x20','11067mQPGME','content-type','403082uOgcdq','headers','136OazCog','status','application/json','TypeError','3178260wPgYYc','ENOTFOUND','get','126999HkUUnu','AbortError','*\x20请求失败,','ECONNRESET','text','log','18426mumWBh'];a255_0x3a87=function(){return _0x58abe9;};return a255_0x3a87();}(function(_0xe9c723,_0x27994b){const _0xf3f4f2=a255_0x33f7,_0xee3cde=_0xe9c723();while(!![]){try{const _0x2b7cc1=parseInt(_0xf3f4f2(0xf5))/0x1+parseInt(_0xf3f4f2(0xff))/0x2+parseInt(_0xf3f4f2(0xf3))/0x3*(parseInt(_0xf3f4f2(0xf8))/0x4)+-parseInt(_0xf3f4f2(0xf9))/0x5+-parseInt(_0xf3f4f2(0xfb))/0x6*(parseInt(_0xf3f4f2(0xfd))/0x7)+parseInt(_0xf3f4f2(0x101))/0x8*(-parseInt(_0xf3f4f2(0xed))/0x9)+parseInt(_0xf3f4f2(0x105))/0xa;if(_0x2b7cc1===_0x27994b)break;else _0xee3cde['push'](_0xee3cde['shift']());}catch(_0x5bd13e){_0xee3cde['push'](_0xee3cde['shift']());}}}(a255_0x3a87,0x1fbb9));export async function httpRequest(_0x586b61,_0x4b16f7={}){const _0x1006f2=a255_0x33f7,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4b16f7;let _0xc490da=null;for(let _0x1225f0=0x0;_0x1225f0<=retries;_0x1225f0++){try{const _0x29a596=new AbortController(),_0x374e8e=setTimeout(()=>_0x29a596['abort'](),timeout),_0x510cff=await fetch(_0x586b61,{'headers':headers,'signal':_0x29a596['signal']});clearTimeout(_0x374e8e);let _0x31a7a7;const _0x1e8641=_0x510cff['headers'][_0x1006f2(0x107)](_0x1006f2(0xfe));return _0x1e8641?.[_0x1006f2(0xf6)](_0x1006f2(0x103))?_0x31a7a7=await _0x510cff['json']():_0x31a7a7=await _0x510cff[_0x1006f2(0xf1)](),{'ok':_0x510cff['ok'],'status':_0x510cff[_0x1006f2(0x102)],'statusText':_0x510cff['statusText'],'data':_0x31a7a7,'headers':_0x510cff[_0x1006f2(0x100)],'url':_0x510cff['url'],'text':()=>_0x510cff[_0x1006f2(0xf1)]()};}catch(_0x5bd746){_0xc490da=_0x5bd746 instanceof Error?_0x5bd746:new Error(String(_0x5bd746));if(_0x1225f0===retries)break;if(shouldRetry(_0x5bd746)){console[_0x1006f2(0xf2)](_0x1006f2(0xef)+retryDelay+_0x1006f2(0xfc)+(_0x1225f0+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0xc490da||new Error('Request\x20failed');}function shouldRetry(_0x1b84e8){const _0x4ccc6e=a255_0x33f7;if(_0x1b84e8 instanceof Error){if(_0x1b84e8['name']===_0x4ccc6e(0xee))return![];if(_0x1b84e8[_0x4ccc6e(0xf7)]===_0x4ccc6e(0x104)&&_0x1b84e8[_0x4ccc6e(0xf4)][_0x4ccc6e(0xf6)](_0x4ccc6e(0xfa)))return!![];if(_0x1b84e8[_0x4ccc6e(0xf4)][_0x4ccc6e(0xf6)](_0x4ccc6e(0xf0)))return!![];if(_0x1b84e8[_0x4ccc6e(0xf4)][_0x4ccc6e(0xf6)](_0x4ccc6e(0x106)))return![];}return![];}function sleep(_0x19298d){return new Promise(_0x272705=>setTimeout(_0x272705,_0x19298d));}function a255_0x33f7(_0x34f1a0,_0x347cf9){_0x34f1a0=_0x34f1a0-0xed;const _0x3a8706=a255_0x3a87();let _0x33f76b=_0x3a8706[_0x34f1a0];return _0x33f76b;}export function validateUrl(_0x3f9f9c){try{return new URL(_0x3f9f9c),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xec53be,_0xa731de){const _0x391955=a256_0x1ae1,_0x27323f=_0xec53be();while(!![]){try{const _0x5d63d6=-parseInt(_0x391955(0x108))/0x1*(parseInt(_0x391955(0x116))/0x2)+-parseInt(_0x391955(0x118))/0x3*(parseInt(_0x391955(0x117))/0x4)+parseInt(_0x391955(0x10c))/0x5+-parseInt(_0x391955(0x109))/0x6*(parseInt(_0x391955(0x10e))/0x7)+parseInt(_0x391955(0x115))/0x8*(-parseInt(_0x391955(0x110))/0x9)+parseInt(_0x391955(0x114))/0xa*(-parseInt(_0x391955(0x10a))/0xb)+-parseInt(_0x391955(0x106))/0xc*(-parseInt(_0x391955(0x111))/0xd);if(_0x5d63d6===_0xa731de)break;else _0x27323f['push'](_0x27323f['shift']());}catch(_0x28a957){_0x27323f['push'](_0x27323f['shift']());}}}(a256_0x3d55,0xc7e78));function a256_0x3d55(){const _0xa03aab=['783985oRSuXm','setRawMode','98539fSUFzS','stdin','186759AHthPo','2002KOVPzZ','isTTY','isRaw','7170votPiR','608YPbgYG','42806CyUdzO','40cUUVmC','434685kwFvJq','537960plyRgU','true','57zDOyTt','318KztErK','19173sUNNjo','stdout'];a256_0x3d55=function(){return _0xa03aab;};return a256_0x3d55();}function env(_0x85192c){return process.env[`RABETBASE_${_0x85192c}`]||process.env[`LOVRABET_${_0x85192c}`]||undefined;}function a256_0x1ae1(_0x4a0934,_0x34002b){_0x4a0934=_0x4a0934-0x106;const _0x3d55fc=a256_0x3d55();let _0x1ae18a=_0x3d55fc[_0x4a0934];return _0x1ae18a;}export function isNonInteractive(_0x369464){const _0x23ae0b=a256_0x1ae1;return!!(_0x369464['nonInteractive']||_0x369464['ci']||env('CI')===_0x23ae0b(0x107)||process.env.CI===_0x23ae0b(0x107)||!process[_0x23ae0b(0x10b)][_0x23ae0b(0x112)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3e6bbe=a256_0x1ae1;if(!process[_0x3e6bbe(0x10f)][_0x3e6bbe(0x112)])return![];try{const _0x2526ec=process[_0x3e6bbe(0x10f)][_0x3e6bbe(0x113)];return process['stdin'][_0x3e6bbe(0x10d)](!![]),process[_0x3e6bbe(0x10f)][_0x3e6bbe(0x10d)](_0x2526ec??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a257_0x1b94(){const _0x540a3f=['3488120AZnGxx','duration','5jRcyzp','stringify','readLogs','join','getWinstonInstance','writeFileSync','utf8','setRawCommand','clearLogs','dirname','yellow','format','121244iZvaey','now','12818088sdjMnk','level','filter','currentRawCommand','error','unknown','warn','logFilePath','initWinstonLogger','addColors','red','command','开始执行:\x20','786822rnKoQR','224722pklKIa','失败:\x20','info','7995342KxOulJ','green','Failed\x20to\x20read\x20logs:','10vSTNcW','details','trim','完成:\x20','map','blue','Failed\x20to\x20clear\x20logs:','timestamp','mkdirSync','transports','winstonLogger','createLogger','printf','File','existsSync','success','72LGJSJe','setLogPath','readFileSync','clear','177387DjRBNJ','log'];a257_0x1b94=function(){return _0x540a3f;};return a257_0x1b94();}const a257_0x27107a=a257_0x14a3;(function(_0x29da39,_0xf06e43){const _0x147c26=a257_0x14a3,_0x1d7ae8=_0x29da39();while(!![]){try{const _0x545ea7=parseInt(_0x147c26(0x199))/0x1*(-parseInt(_0x147c26(0x17b))/0x2)+parseInt(_0x147c26(0x17a))/0x3+parseInt(_0x147c26(0x16b))/0x4+parseInt(_0x147c26(0x197))/0x5+-parseInt(_0x147c26(0x17e))/0x6+parseInt(_0x147c26(0x195))/0x7*(parseInt(_0x147c26(0x191))/0x8)+parseInt(_0x147c26(0x16d))/0x9*(parseInt(_0x147c26(0x181))/0xa);if(_0x545ea7===_0xf06e43)break;else _0x1d7ae8['push'](_0x1d7ae8['shift']());}catch(_0x3b171f){_0x1d7ae8['push'](_0x1d7ae8['shift']());}}}(a257_0x1b94,0xb6a74));import a257_0x2be9d0 from'winston';function a257_0x14a3(_0x3ba714,_0x68a135){_0x3ba714=_0x3ba714-0x165;const _0x1b942f=a257_0x1b94();let _0x14a326=_0x1b942f[_0x3ba714];return _0x14a326;}import a257_0x3bf289 from'node:fs';import a257_0x4c0c4f from'node:path';class Logger{[a257_0x27107a(0x18b)];[a257_0x27107a(0x174)];[a257_0x27107a(0x170)]='';constructor(){const _0x486bcf=a257_0x27107a;this[_0x486bcf(0x174)]='';}[a257_0x27107a(0x166)](_0x2de7dc){const _0x5a192c=a257_0x27107a;this[_0x5a192c(0x170)]=_0x2de7dc;}[a257_0x27107a(0x175)](){const _0x2e7624=a257_0x27107a,_0x21c26b=a257_0x4c0c4f[_0x2e7624(0x168)](this[_0x2e7624(0x174)]);!a257_0x3bf289[_0x2e7624(0x18f)](_0x21c26b)&&a257_0x3bf289[_0x2e7624(0x189)](_0x21c26b,{'recursive':!![]});const _0x32d03a=a257_0x2be9d0['format']['combine'](a257_0x2be9d0[_0x2e7624(0x16a)][_0x2e7624(0x188)](),a257_0x2be9d0['format']['errors']({'stack':!![]}),a257_0x2be9d0[_0x2e7624(0x16a)][_0x2e7624(0x18d)](_0x13ae26=>{const _0x3f8622=_0x2e7624,_0x46222b={'timestamp':_0x13ae26[_0x3f8622(0x188)]||new Date()['toISOString'](),'level':_0x13ae26[_0x3f8622(0x16e)]||'info','command':_0x13ae26[_0x3f8622(0x178)]||_0x3f8622(0x172),'rawCommand':_0x13ae26['rawCommand']||this['currentRawCommand']||undefined,'message':_0x13ae26['message']||'','duration':_0x13ae26[_0x3f8622(0x198)]||undefined,'details':_0x13ae26[_0x3f8622(0x182)]||undefined};return JSON[_0x3f8622(0x19a)](_0x46222b);}));this['winstonLogger']=a257_0x2be9d0[_0x2e7624(0x18c)]({'level':_0x2e7624(0x17d),'format':_0x32d03a,'transports':[new a257_0x2be9d0[(_0x2e7624(0x18a))][(_0x2e7624(0x18e))]({'filename':this['logFilePath'],'level':_0x2e7624(0x17d)})],'silent':![]}),a257_0x2be9d0[_0x2e7624(0x176)]({'success':_0x2e7624(0x17f),'error':_0x2e7624(0x177),'warn':_0x2e7624(0x169),'info':_0x2e7624(0x186)});}[a257_0x27107a(0x192)](_0x787624){const _0x1633cc=a257_0x27107a;this[_0x1633cc(0x174)]=a257_0x4c0c4f[_0x1633cc(0x19c)](_0x787624,'.lovrabet.log'),this[_0x1633cc(0x18b)]&&this[_0x1633cc(0x18b)][_0x1633cc(0x194)](),this[_0x1633cc(0x175)]();}[a257_0x27107a(0x17d)](_0x2dca18,_0x59d20e,_0x389254){const _0x5ba1a0=a257_0x27107a;if(!this['logFilePath']||!this[_0x5ba1a0(0x18b)])return;this[_0x5ba1a0(0x18b)]['info'](_0x59d20e,{'command':_0x2dca18,'details':_0x389254});}['success'](_0x140122,_0x2006d7,_0x247c4c,_0x204323){const _0x40ae18=a257_0x27107a;if(!this[_0x40ae18(0x174)]||!this[_0x40ae18(0x18b)])return;this['winstonLogger'][_0x40ae18(0x196)](_0x40ae18(0x17d),_0x2006d7,{'level':_0x40ae18(0x190),'command':_0x140122,'duration':_0x247c4c,'details':_0x204323});}[a257_0x27107a(0x171)](_0x3594ab,_0x82aedf,_0x3f3d4f){const _0x553b7e=a257_0x27107a;if(!this[_0x553b7e(0x174)]||!this[_0x553b7e(0x18b)])return;this[_0x553b7e(0x18b)]['error'](_0x82aedf,{'command':_0x3594ab,'details':_0x3f3d4f});}[a257_0x27107a(0x173)](_0x174a58,_0x3c4345,_0x3a617c){const _0x2d2d97=a257_0x27107a;if(!this[_0x2d2d97(0x174)]||!this[_0x2d2d97(0x18b)])return;this['winstonLogger'][_0x2d2d97(0x173)](_0x3c4345,{'command':_0x174a58,'details':_0x3a617c});}async['logTask'](_0x2dd532,_0x48e034,_0x4e6d80){const _0x5c4b43=a257_0x27107a,_0x337f8e=Date[_0x5c4b43(0x16c)]();this[_0x5c4b43(0x17d)](_0x2dd532,_0x5c4b43(0x179)+_0x48e034);try{const _0x3843f6=await _0x4e6d80(),_0x3a1a21=Date[_0x5c4b43(0x16c)]()-_0x337f8e;return this[_0x5c4b43(0x190)](_0x2dd532,_0x5c4b43(0x184)+_0x48e034,_0x3a1a21),_0x3843f6;}catch(_0x534f0e){const _0x2f8c80=Date[_0x5c4b43(0x16c)]()-_0x337f8e;this[_0x5c4b43(0x171)](_0x2dd532,_0x5c4b43(0x17c)+_0x48e034,{'error':_0x534f0e instanceof Error?_0x534f0e['message']:String(_0x534f0e),'duration':_0x2f8c80});throw _0x534f0e;}}[a257_0x27107a(0x19b)](){const _0x269bf6=a257_0x27107a;try{if(!a257_0x3bf289[_0x269bf6(0x18f)](this[_0x269bf6(0x174)]))return[];const _0x3afb7a=a257_0x3bf289[_0x269bf6(0x193)](this['logFilePath'],_0x269bf6(0x165));return _0x3afb7a['split']('\x0a')[_0x269bf6(0x16f)](_0x4e3c26=>_0x4e3c26[_0x269bf6(0x183)]())[_0x269bf6(0x185)](_0x95d365=>JSON['parse'](_0x95d365));}catch(_0x2e1e8c){return console[_0x269bf6(0x173)](_0x269bf6(0x180),_0x2e1e8c),[];}}[a257_0x27107a(0x167)](){const _0x2dac23=a257_0x27107a;try{a257_0x3bf289[_0x2dac23(0x18f)](this['logFilePath'])&&a257_0x3bf289[_0x2dac23(0x19e)](this['logFilePath'],'',_0x2dac23(0x165));}catch(_0x3f0462){console[_0x2dac23(0x173)](_0x2dac23(0x187),_0x3f0462);}}[a257_0x27107a(0x19d)](){const _0x45c737=a257_0x27107a;return this[_0x45c737(0x18b)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a258_0x2029(_0x3a7299,_0x6d7234){_0x3a7299=_0x3a7299-0x130;const _0x4d6c16=a258_0x4d6c();let _0x2029c5=_0x4d6c16[_0x3a7299];return _0x2029c5;}function a258_0x4d6c(){const _0x5c285d=['417VQFCZP','24683823nxQCjS','1055722mjiDtL','Invalid\x20JSON\x20for\x20--params:\x20','validation','127390nwIPvt','parse','17212CftnOb','10yqmeyL','1539948EGVQkI','77BKVleW','--params\x20must\x20be\x20a\x20JSON\x20object','837608EbOmcP','isArray','3035900ZpOUBw','object'];a258_0x4d6c=function(){return _0x5c285d;};return a258_0x4d6c();}(function(_0x19ec22,_0x16e7bd){const _0x485c22=a258_0x2029,_0x1c74a4=_0x19ec22();while(!![]){try{const _0x499144=-parseInt(_0x485c22(0x13c))/0x1+-parseInt(_0x485c22(0x139))/0x2+parseInt(_0x485c22(0x137))/0x3*(parseInt(_0x485c22(0x13e))/0x4)+-parseInt(_0x485c22(0x135))/0x5+-parseInt(_0x485c22(0x130))/0x6+-parseInt(_0x485c22(0x131))/0x7*(parseInt(_0x485c22(0x133))/0x8)+parseInt(_0x485c22(0x138))/0x9*(parseInt(_0x485c22(0x13f))/0xa);if(_0x499144===_0x16e7bd)break;else _0x1c74a4['push'](_0x1c74a4['shift']());}catch(_0x3dd34b){_0x1c74a4['push'](_0x1c74a4['shift']());}}}(a258_0x4d6c,0xa390c));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x375b14){const _0x544d86=a258_0x2029;if(!_0x375b14)return undefined;let _0x515f46;try{_0x515f46=JSON[_0x544d86(0x13d)](_0x375b14);}catch{throw CliErrors[_0x544d86(0x13b)](_0x544d86(0x13a)+_0x375b14);}if(!_0x515f46||typeof _0x515f46!==_0x544d86(0x136)||Array[_0x544d86(0x134)](_0x515f46))throw CliErrors[_0x544d86(0x13b)](_0x544d86(0x132),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x515f46;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a259_0x2888(){const _0x1b19aa=['361870VkkzDu','23472nWIImL','115gRUTnn','win32','135kTCRSj','279164oXtSZs','23331060Xmpimo','582152GxSfmM','platform','551780HPHuqq','3ArjLBj','2DLwcKs','319ReitIh','6325158VbNYQY'];a259_0x2888=function(){return _0x1b19aa;};return a259_0x2888();}const a259_0x1e1b02=a259_0x422b;(function(_0x1fb025,_0x46f7ee){const _0x35e8d7=a259_0x422b,_0x1c1286=_0x1fb025();while(!![]){try{const _0x420551=-parseInt(_0x35e8d7(0x1e5))/0x1*(parseInt(_0x35e8d7(0x1e3))/0x2)+parseInt(_0x35e8d7(0x1e4))/0x3*(parseInt(_0x35e8d7(0x1df))/0x4)+parseInt(_0x35e8d7(0x1dc))/0x5*(parseInt(_0x35e8d7(0x1e9))/0x6)+-parseInt(_0x35e8d7(0x1e7))/0x7+-parseInt(_0x35e8d7(0x1e1))/0x8*(-parseInt(_0x35e8d7(0x1de))/0x9)+-parseInt(_0x35e8d7(0x1e8))/0xa*(parseInt(_0x35e8d7(0x1e6))/0xb)+parseInt(_0x35e8d7(0x1e0))/0xc;if(_0x420551===_0x46f7ee)break;else _0x1c1286['push'](_0x1c1286['shift']());}catch(_0x437c84){_0x1c1286['push'](_0x1c1286['shift']());}}}(a259_0x2888,0xa8a48));export const isWindows=process[a259_0x1e1b02(0x1e2)]===a259_0x1e1b02(0x1dd);function a259_0x422b(_0x247a38,_0x3fdf39){_0x247a38=_0x247a38-0x1dc;const _0x288893=a259_0x2888();let _0x422b94=_0x288893[_0x247a38];return _0x422b94;}export function resolveNpmBin(_0x1b8404){return isWindows?_0x1b8404+'.cmd':_0x1b8404;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a260_0x1e1fec=a260_0x4db2;(function(_0xb72cd3,_0x50d5cb){const _0x5d736b=a260_0x4db2,_0x1ddfb0=_0xb72cd3();while(!![]){try{const _0x41079c=-parseInt(_0x5d736b(0xdc))/0x1+-parseInt(_0x5d736b(0xe4))/0x2+parseInt(_0x5d736b(0xdf))/0x3*(-parseInt(_0x5d736b(0xdb))/0x4)+-parseInt(_0x5d736b(0xda))/0x5*(parseInt(_0x5d736b(0xd3))/0x6)+-parseInt(_0x5d736b(0xd2))/0x7+parseInt(_0x5d736b(0xe6))/0x8+parseInt(_0x5d736b(0xd6))/0x9*(parseInt(_0x5d736b(0xd4))/0xa);if(_0x41079c===_0x50d5cb)break;else _0x1ddfb0['push'](_0x1ddfb0['shift']());}catch(_0x1ae88e){_0x1ddfb0['push'](_0x1ddfb0['shift']());}}}(a260_0x332f,0x1d86a));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 _0x5a5045=a260_0x4db2,_0x34f2bf=getTemplateBaseUrl();return _0x34f2bf+_0x5a5045(0xde);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a260_0x1e1fec(0xe1));export async function fetchRulesFromCDN(){const _0x45d011=a260_0x1e1fec,_0x5ef5e0=getRulesCdnUrl(),_0x2aeda3=await fetch(_0x5ef5e0,{'headers':{'Accept':_0x45d011(0xe7)}});if(!_0x2aeda3['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x2aeda3[_0x45d011(0xe0)]+'\x20'+_0x2aeda3[_0x45d011(0xd5)]);const _0x1e2142=await _0x2aeda3[_0x45d011(0xdd)]();if(!_0x1e2142[_0x45d011(0xe5)]||typeof _0x1e2142[_0x45d011(0xe5)]!==_0x45d011(0xd8))throw new Error('CDN\x20返回数据格式错误');return _0x1e2142;}export async function getRulesContent(){const _0x87257=a260_0x1e1fec;try{const _0x235622=await fetchRulesFromCDN();return _0x235622[_0x87257(0xe5)];}catch{return readLocalTemplate();}}function a260_0x332f(){const _0x3fc532=['348vNapDg','109925ZPrhoW','json','/rules/rules.json','1347pmdLbd','status','../../templates/rules/lovrabet_rules.mdc.tpl','utf-8','lastUpdated','77102eENCgc','content','137096uyjjCz','application/json','710486LVgMCk','15030ZLsqWw','1534910FaOBEV','statusText','27rMkkFr','本地模板文件不存在:\x20','string','agents.md','135FoKpBE'];a260_0x332f=function(){return _0x3fc532;};return a260_0x332f();}export function readLocalTemplate(){const _0x567eb7=a260_0x1e1fec;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x567eb7(0xe2));throw new Error(_0x567eb7(0xd7)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x3d1091){const _0xe58208=a260_0x1e1fec,_0x168f76=await fetchRulesFromCDN()['catch'](()=>null);let _0x26ae48;_0x168f76?(_0x26ae48=_0x168f76['content'],_0x168f76[_0xe58208(0xe3)]&&(_0x26ae48=appendUpdateTime(_0x26ae48,_0x168f76[_0xe58208(0xe3)]))):_0x26ae48=readLocalTemplate();const _0x3cc58=dirname(_0x3d1091);!existsSync(_0x3cc58)&&mkdirSync(_0x3cc58,{'recursive':!![]}),writeFileSync(_0x3d1091,_0x26ae48,_0xe58208(0xe2));}export async function copyRulesToCursor(_0x481133){const _0x52c6b6=join(_0x481133,'.cursor/rules'),_0x51f01e=join(_0x52c6b6,'lovrabet_rules.mdc');if(existsSync(_0x51f01e))return![];return await writeRulesFile(_0x51f01e),!![];}function a260_0x4db2(_0x15ce12,_0xb47663){_0x15ce12=_0x15ce12-0xd2;const _0x332f3a=a260_0x332f();let _0x4db268=_0x332f3a[_0x15ce12];return _0x4db268;}export async function copyRulesToAgentsMd(_0x2abbb8){const _0xf1ecec=a260_0x1e1fec,_0x4a4419=join(_0x2abbb8,_0xf1ecec(0xd9));if(existsSync(_0x4a4419))return![];return await writeRulesFile(_0x4a4419),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x4801b1){return new Promise(_0x425cd6=>setTimeout(_0x425cd6,_0x4801b1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a262_0x3fe636=a262_0x1ae6;function a262_0x1e00(){const _0x32efd9=['\x0a\x20\x20\x20\x20{\x20','getFullYear','isDirectory','template','getMinutes','name:\x20\x22','24kRInab','36967AeQGZB','getMonth','error','toLowerCase','3KPGPvB','.scss','174SLxbpx','alias','processFile','charAt','utf8','processTemplate','padStart','mkdir','map','now','641730huDAEB','2053386FNVwRO','replace','message','endsWith','getSeconds','replaceContent','copyFile','YourModel','pop','datasetCode','.json','join','\x20},','push','success','开始处理模板内容替换','alias:\x20\x22','191490ftjCWM','模板内容替换失败','84nDcVPN','readdir','.tsx','formatLocalTimestamp','tableName:\x20\x22','.ts','pad','readFile','模板内容替换完成','getHours','24015dpyOcn','split','toComponentName','.css','datasetCode:\x20\x22','toDisplayTitle','default','1842000AbjPZD','.js','.tpl','77ImkjqE','name','processDirectory','slice','writeFile','extname','LOVRABET','info','promises','1177090NcHWJp'];a262_0x1e00=function(){return _0x32efd9;};return a262_0x1e00();}(function(_0x2fb21e,_0xc4f2b9){const _0x272fd7=a262_0x1ae6,_0x5700eb=_0x2fb21e();while(!![]){try{const _0xd04976=-parseInt(_0x272fd7(0x128))/0x1+parseInt(_0x272fd7(0x110))/0x2*(parseInt(_0x272fd7(0x11c))/0x3)+parseInt(_0x272fd7(0x13c))/0x4*(-parseInt(_0x272fd7(0x146))/0x5)+parseInt(_0x272fd7(0x11e))/0x6*(parseInt(_0x272fd7(0x118))/0x7)+parseInt(_0x272fd7(0x117))/0x8*(parseInt(_0x272fd7(0x129))/0x9)+-parseInt(_0x272fd7(0x13a))/0xa*(parseInt(_0x272fd7(0x150))/0xb)+-parseInt(_0x272fd7(0x14d))/0xc;if(_0xd04976===_0xc4f2b9)break;else _0x5700eb['push'](_0x5700eb['shift']());}catch(_0x3e91ce){_0x5700eb['push'](_0x5700eb['shift']());}}}(a262_0x1e00,0x60af4));import a262_0x247e6e from'node:fs';import a262_0x68c567 from'node:path';function a262_0x1ae6(_0x5ca02f,_0x292437){_0x5ca02f=_0x5ca02f-0x10d;const _0x1e0011=a262_0x1e00();let _0x1ae666=_0x1e0011[_0x5ca02f];return _0x1ae666;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a262_0x3fe636(0x142)](_0x28264d){const _0x16e251=a262_0x3fe636;return String(_0x28264d)[_0x16e251(0x124)](0x2,'0');}static[a262_0x3fe636(0x13f)](_0x396306){const _0x2a3f88=a262_0x3fe636,_0x113a47=_0x396306[_0x2a3f88(0x112)](),_0xa7ebe0=this[_0x2a3f88(0x142)](_0x396306[_0x2a3f88(0x119)]()+0x1),_0x1f01fa=this[_0x2a3f88(0x142)](_0x396306['getDate']()),_0x5d611c=this['pad'](_0x396306[_0x2a3f88(0x145)]()),_0x1c2aa0=this[_0x2a3f88(0x142)](_0x396306[_0x2a3f88(0x115)]()),_0x1429f1=this[_0x2a3f88(0x142)](_0x396306[_0x2a3f88(0x12d)]());return{'createdAt':_0x113a47+'-'+_0xa7ebe0+'-'+_0x1f01fa+'\x20'+_0x5d611c+':'+_0x1c2aa0+':'+_0x1429f1,'createdDate':_0x113a47+'-'+_0xa7ebe0+'-'+_0x1f01fa,'createdTime':_0x5d611c+':'+_0x1c2aa0+':'+_0x1429f1};}static[a262_0x3fe636(0x148)](_0x36319f){const _0xa0f082=a262_0x3fe636,_0x55385b=_0x36319f[_0xa0f082(0x147)]('/')[_0xa0f082(0x131)]()||_0x36319f;return _0x55385b[_0xa0f082(0x147)]('-')['map'](_0x2632e0=>_0x2632e0[_0xa0f082(0x121)](0x0)['toUpperCase']()+_0x2632e0['slice'](0x1)[_0xa0f082(0x11b)]())[_0xa0f082(0x134)]('');}static[a262_0x3fe636(0x14b)](_0xfc3dac){const _0x2d9b6a=a262_0x3fe636,_0x747718=_0xfc3dac[_0x2d9b6a(0x147)]('/')[_0x2d9b6a(0x131)]()||_0xfc3dac;return _0x747718['split']('-')[_0x2d9b6a(0x126)](_0x15e831=>_0x15e831[_0x2d9b6a(0x121)](0x0)['toUpperCase']()+_0x15e831[_0x2d9b6a(0x153)](0x1)[_0x2d9b6a(0x11b)]())['join']('\x20');}static[a262_0x3fe636(0x12e)](_0x1ca49b,_0x3a7055,_0x36a65d){const _0x35cd9a=a262_0x3fe636,_0x4e79ca=this[_0x35cd9a(0x148)](_0x3a7055),_0x37a342=this[_0x35cd9a(0x14b)](_0x3a7055),{createdAt:_0x360c07,createdDate:_0x8d913,createdTime:_0x182e17}=this['formatLocalTimestamp'](new Date());let _0x1b199d=_0x1ca49b['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x35cd9a(0x12a)](/\{ComponentName\}/g,_0x4e79ca)[_0x35cd9a(0x12a)](/\{DisplayTitle\}/g,_0x37a342)[_0x35cd9a(0x12a)](/\{PageName\}/g,_0x3a7055)[_0x35cd9a(0x12a)](/\{TemplateName\}/g,_0x36a65d)[_0x35cd9a(0x12a)](/\{CreatedAt\}/g,_0x360c07)[_0x35cd9a(0x12a)](/\{CreatedDate\}/g,_0x8d913)['replace'](/\{CreatedTime\}/g,_0x182e17);return _0x1b199d;}static['replaceApiContent'](_0x5f1911,_0x5f5c17,_0x533e79,_0x3156fe,_0x53a67b,_0x516c57,_0x539079,_0x11824a){const _0x308947=a262_0x3fe636,_0x1957e5=new Date(),_0x241fa0=_0x1957e5['toISOString'](),_0x4a2d26=_0x533e79['map'](_0x27addd=>{const _0x375e13=a262_0x1ae6,_0x106db0=[_0x375e13(0x14a)+_0x27addd[_0x375e13(0x132)]+'\x22',_0x375e13(0x140)+_0x27addd['tableName']+'\x22',_0x375e13(0x116)+_0x27addd[_0x375e13(0x151)]+'\x22'];return _0x27addd[_0x375e13(0x11f)]&&_0x106db0[_0x375e13(0x136)](_0x375e13(0x139)+_0x27addd['alias']+'\x22'),_0x375e13(0x111)+_0x106db0[_0x375e13(0x134)](',\x20')+_0x375e13(0x135);})['join'](''),_0x2933db=_0x3156fe||_0x533e79[0x0]?.['alias']||_0x308947(0x130);let _0x13b7d0=_0x5f1911[_0x308947(0x12a)](/\{AppCode\}/g,_0x5f5c17)[_0x308947(0x12a)](/\{ModelConfigs\}/g,_0x4a2d26)[_0x308947(0x12a)](/\{ExampleModelName\}/g,_0x2933db)['replace'](/\{ApiFileName\}/g,_0x53a67b||'api')['replace'](/\{ConfigName\}/g,_0x516c57||_0x308947(0x14c))[_0x308947(0x12a)](/\{ClientConfigParam\}/g,_0x539079||'')[_0x308947(0x12a)](/\{VarPrefix\}/g,_0x11824a||_0x308947(0x10d))[_0x308947(0x12a)](/\{CreatedAt\}/g,_0x241fa0);return _0x13b7d0;}static async[a262_0x3fe636(0x123)](_0x2c9092,_0x3a0273,_0x920ad5,_0xf9e911,_0x36eb65=!![]){const _0x7707ad=a262_0x3fe636,_0x2d3f9f=Date[_0x7707ad(0x127)]();try{_0x36eb65&&logger[_0x7707ad(0x10e)]('template',_0x7707ad(0x138),{'templatePath':_0x2c9092,'targetPath':_0x3a0273,'pageName':_0x920ad5,'templateName':_0xf9e911});await a262_0x247e6e[_0x7707ad(0x10f)][_0x7707ad(0x125)](_0x3a0273,{'recursive':!![]}),await this['processDirectory'](_0x2c9092,_0x3a0273,_0x920ad5,_0xf9e911);if(_0x36eb65){const _0x43b041=Date['now']()-_0x2d3f9f;logger[_0x7707ad(0x137)](_0x7707ad(0x114),_0x7707ad(0x144),_0x43b041,{'pageName':_0x920ad5,'templateName':_0xf9e911});}}catch(_0x5f0c79){if(_0x36eb65){const _0x219e44=Date[_0x7707ad(0x127)]()-_0x2d3f9f;logger[_0x7707ad(0x11a)](_0x7707ad(0x114),_0x7707ad(0x13b),{'templatePath':_0x2c9092,'targetPath':_0x3a0273,'pageName':_0x920ad5,'templateName':_0xf9e911,'error':_0x5f0c79 instanceof Error?_0x5f0c79[_0x7707ad(0x12b)]:String(_0x5f0c79),'duration':_0x219e44});}throw _0x5f0c79;}}static async[a262_0x3fe636(0x152)](_0x4cc47c,_0x5c268e,_0x682d32,_0x1eaa22){const _0x1a28cf=a262_0x3fe636,_0x5fb532=await a262_0x247e6e['promises'][_0x1a28cf(0x13d)](_0x4cc47c,{'withFileTypes':!![]});for(const _0x593403 of _0x5fb532){const _0x4ffd34=a262_0x68c567[_0x1a28cf(0x134)](_0x4cc47c,_0x593403[_0x1a28cf(0x151)]);let _0x312f77=a262_0x68c567[_0x1a28cf(0x134)](_0x5c268e,_0x593403[_0x1a28cf(0x151)]);_0x593403[_0x1a28cf(0x151)][_0x1a28cf(0x12c)](_0x1a28cf(0x14f))&&(_0x312f77=a262_0x68c567[_0x1a28cf(0x134)](_0x5c268e,_0x593403[_0x1a28cf(0x151)][_0x1a28cf(0x12a)](/\.tpl$/,'')));if(_0x593403[_0x1a28cf(0x113)]())await a262_0x247e6e['promises'][_0x1a28cf(0x125)](_0x312f77,{'recursive':!![]}),await this['processDirectory'](_0x4ffd34,_0x312f77,_0x682d32,_0x1eaa22);else _0x593403['isFile']()&&await this[_0x1a28cf(0x120)](_0x4ffd34,_0x312f77,_0x682d32,_0x1eaa22);}}static async[a262_0x3fe636(0x120)](_0x2aae2e,_0x346934,_0x56ac51,_0x461b90){const _0x3db6d0=a262_0x3fe636,_0x3d4163=a262_0x68c567[_0x3db6d0(0x155)](_0x2aae2e)[_0x3db6d0(0x11b)]();_0x2aae2e[_0x3db6d0(0x12c)](_0x3db6d0(0x14f))&&(_0x346934=_0x346934[_0x3db6d0(0x12a)](/\.tpl$/,''));const _0x205bac=[_0x3db6d0(0x13e),_0x3db6d0(0x141),'.jsx',_0x3db6d0(0x14e),_0x3db6d0(0x133),'.md',_0x3db6d0(0x149),_0x3db6d0(0x11d),_0x3db6d0(0x14f)];if(_0x205bac['includes'](_0x3d4163)||_0x2aae2e[_0x3db6d0(0x12c)](_0x3db6d0(0x14f))){const _0x32c906=await a262_0x247e6e[_0x3db6d0(0x10f)][_0x3db6d0(0x143)](_0x2aae2e,_0x3db6d0(0x122)),_0x33c2dc=this[_0x3db6d0(0x12e)](_0x32c906,_0x56ac51,_0x461b90);await a262_0x247e6e[_0x3db6d0(0x10f)][_0x3db6d0(0x154)](_0x346934,_0x33c2dc,_0x3db6d0(0x122));}else await a262_0x247e6e[_0x3db6d0(0x10f)][_0x3db6d0(0x12f)](_0x2aae2e,_0x346934);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x468619,_0x1e3c14){const _0x1713b6=a263_0x1b28,_0x24223b=_0x468619();while(!![]){try{const _0x1f46bc=parseInt(_0x1713b6(0xde))/0x1*(parseInt(_0x1713b6(0xe2))/0x2)+parseInt(_0x1713b6(0xd2))/0x3*(-parseInt(_0x1713b6(0xd5))/0x4)+-parseInt(_0x1713b6(0xd7))/0x5+-parseInt(_0x1713b6(0xe4))/0x6+-parseInt(_0x1713b6(0xdb))/0x7+-parseInt(_0x1713b6(0xca))/0x8+-parseInt(_0x1713b6(0xdf))/0x9*(-parseInt(_0x1713b6(0xdc))/0xa);if(_0x1f46bc===_0x1e3c14)break;else _0x24223b['push'](_0x24223b['shift']());}catch(_0x179975){_0x24223b['push'](_0x24223b['shift']());}}}(a263_0x42f3,0x4fc47));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a263_0x52cb2f from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a263_0x42f3(){const _0x9532d5=['4620MCTZHo','latest','71XUAdMJ','34272rqamoc','update-check.json','stringify','894CsLYJg','lastNotifiedVersion','556698xqZCkr','true','valid','\x20update','checkedAt','toLowerCase','3000208FTdXXW','https://www.npmjs.com/package/','now','object','rabetbase-cli','.cache','\x20available,\x20current\x20','lastNotifiedAt','2586BpKXuI','trim','yes','848HnNbmD','gte','2873065gtcdWR',',\x20run:\x20','number','utf8','1673980hqZRgQ'];a263_0x42f3=function(){return _0x9532d5;};return a263_0x42f3();}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 isUpdateNoticeDisabled(){const _0x1cffa8=a263_0x1b28,_0x313721=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x1cffa8(0xc9)]();return _0x313721==='1'||_0x313721===_0x1cffa8(0xe5)||_0x313721===_0x1cffa8(0xd4);}function cacheRoot(){const _0x35490b=a263_0x1b28;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x35490b(0xcf));}export function getUpdateNoticeCachePath(){const _0x406b87=a263_0x1b28;return join(cacheRoot(),_0x406b87(0xce),_0x406b87(0xe0));}async function readUpdateNoticeCache(){const _0x52b825=a263_0x1b28;try{const _0x71e4e1=await readFile(getUpdateNoticeCachePath(),_0x52b825(0xda)),_0x40e0fc=JSON['parse'](_0x71e4e1);if(!_0x40e0fc||typeof _0x40e0fc!==_0x52b825(0xcd))return{};return _0x40e0fc;}catch{return{};}}async function writeUpdateNoticeCache(_0x178c97){const _0x28d738=a263_0x1b28;try{const _0x565b53=getUpdateNoticeCachePath();await mkdir(dirname(_0x565b53),{'recursive':!![]}),await writeFile(_0x565b53,JSON[_0x28d738(0xe1)](_0x178c97,null,0x2)+'\x0a','utf8');}catch{}}function a263_0x1b28(_0x28b41f,_0x4c286d){_0x28b41f=_0x28b41f-0xc6;const _0x42f34a=a263_0x42f3();let _0x1b2824=_0x42f34a[_0x28b41f];return _0x1b2824;}function isFreshCheck(_0x9f0fbd,_0x5aebd9){const _0x1e388a=a263_0x1b28;return typeof _0x9f0fbd[_0x1e388a(0xc8)]==='number'&&_0x5aebd9-_0x9f0fbd[_0x1e388a(0xc8)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4bd262,_0x132bbd,_0x4f25aa){const _0x28d98d=a263_0x1b28;return _0x4bd262[_0x28d98d(0xe3)]===_0x132bbd&&typeof _0x4bd262[_0x28d98d(0xd1)]===_0x28d98d(0xd9)&&_0x4f25aa-_0x4bd262['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x58bc4f){const _0x368611=a263_0x1b28;return _0x368611(0xcb)+NPM_PACKAGE_NAME+'/v/'+_0x58bc4f;}export async function resolveLatestUpdateNotice(){const _0x3b9150=a263_0x1b28;if(isUpdateNoticeDisabled())return null;try{const _0x13eb62=Date[_0x3b9150(0xcc)](),_0x382fba=getCliVersion(),_0x2d4482=await readUpdateNoticeCache();let _0x45cf5a=isFreshCheck(_0x2d4482,_0x13eb62)?_0x2d4482[_0x3b9150(0xdd)]?.[_0x3b9150(0xd3)]():undefined;if(!_0x45cf5a&&!isFreshCheck(_0x2d4482,_0x13eb62)){const _0x38a644=await getCliVersionPolicy();_0x45cf5a=_0x38a644?.['stableVersion']?.[_0x3b9150(0xd3)]()||undefined,await writeUpdateNoticeCache({..._0x2d4482,'checkedAt':_0x13eb62,'latest':_0x45cf5a,'failed':!_0x45cf5a});}if(!_0x45cf5a||!a263_0x52cb2f[_0x3b9150(0xc6)](_0x382fba)||!a263_0x52cb2f[_0x3b9150(0xc6)](_0x45cf5a))return null;if(a263_0x52cb2f[_0x3b9150(0xd6)](_0x382fba,_0x45cf5a))return null;if(isRecentlyNotified(_0x2d4482,_0x45cf5a,_0x13eb62))return null;const _0x552e05=CLI_BIN_NAME+_0x3b9150(0xc7);return await writeUpdateNoticeCache({..._0x2d4482,'checkedAt':isFreshCheck(_0x2d4482,_0x13eb62)?_0x2d4482[_0x3b9150(0xc8)]:_0x13eb62,'latest':_0x45cf5a,'failed':![],'lastNotifiedVersion':_0x45cf5a,'lastNotifiedAt':_0x13eb62}),{'command':_0x552e05,'current':_0x382fba,'latest':_0x45cf5a,'url':buildNpmVersionUrl(_0x45cf5a),'message':CLI_BIN_NAME+'\x20'+_0x45cf5a+_0x3b9150(0xd0)+_0x382fba+_0x3b9150(0xd8)+_0x552e05};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x471bbf,_0x305a5b){var _0x57fec3=a264_0x4173,_0xb3117a=_0x471bbf();while(!![]){try{var _0x43f77b=parseInt(_0x57fec3(0x143))/0x1*(parseInt(_0x57fec3(0x147))/0x2)+-parseInt(_0x57fec3(0x144))/0x3+parseInt(_0x57fec3(0x149))/0x4*(-parseInt(_0x57fec3(0x145))/0x5)+parseInt(_0x57fec3(0x140))/0x6+-parseInt(_0x57fec3(0x148))/0x7*(parseInt(_0x57fec3(0x142))/0x8)+-parseInt(_0x57fec3(0x146))/0x9+parseInt(_0x57fec3(0x141))/0xa;if(_0x43f77b===_0x305a5b)break;else _0xb3117a['push'](_0xb3117a['shift']());}catch(_0x287c3d){_0xb3117a['push'](_0xb3117a['shift']());}}}(a264_0x3896,0x26974));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a264_0x4173(_0x1e0e19,_0x54f157){_0x1e0e19=_0x1e0e19-0x140;var _0x389645=a264_0x3896();var _0x417387=_0x389645[_0x1e0e19];return _0x417387;}function a264_0x3896(){var _0x3413ef=['156531Mjsggs','5RVfpyi','2360187diMCuE','2nETxGZ','1689422cHpkXc','634472GLbxlR','1832922ImBrBF','4302120DhUglv','8bxePCo','136753nIkhnF'];a264_0x3896=function(){return _0x3413ef;};return a264_0x3896();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a265_0xfdfb(){var _0x1bb29b=['1131wdXDgc','3454297QsfVMp','2RjZEVL','1050509atUvcX','43841996AtqVSP','695238HkfcDM','520JsLXQn','10IqDmgk','2493472siwozd','5911173kQAKwo','40QEnsfp'];a265_0xfdfb=function(){return _0x1bb29b;};return a265_0xfdfb();}(function(_0x4bde7c,_0x2d2744){var _0x31b5c7=a265_0x2d46,_0x349151=_0x4bde7c();while(!![]){try{var _0x1392db=parseInt(_0x31b5c7(0x150))/0x1*(-parseInt(_0x31b5c7(0x14f))/0x2)+-parseInt(_0x31b5c7(0x158))/0x3*(-parseInt(_0x31b5c7(0x153))/0x4)+parseInt(_0x31b5c7(0x157))/0x5*(-parseInt(_0x31b5c7(0x152))/0x6)+-parseInt(_0x31b5c7(0x159))/0x7+-parseInt(_0x31b5c7(0x155))/0x8+parseInt(_0x31b5c7(0x156))/0x9*(-parseInt(_0x31b5c7(0x154))/0xa)+parseInt(_0x31b5c7(0x151))/0xb;if(_0x1392db===_0x2d2744)break;else _0x349151['push'](_0x349151['shift']());}catch(_0x3a4486){_0x349151['push'](_0x349151['shift']());}}}(a265_0xfdfb,0x91501));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a265_0x2d46(_0x5861b3,_0x4b6a28){_0x5861b3=_0x5861b3-0x14f;var _0xfdfb2d=a265_0xfdfb();var _0x2d4675=_0xfdfb2d[_0x5861b3];return _0x2d4675;}export async function withActiveCookie(_0x23f873,_0x372579){setActiveCookie(_0x23f873);try{return await _0x372579();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41d440,_0x29447b){var _0x27a647=a266_0x7b9c,_0xe3a025=_0x41d440();while(!![]){try{var _0x1546c0=-parseInt(_0x27a647(0x15f))/0x1+parseInt(_0x27a647(0x160))/0x2+-parseInt(_0x27a647(0x162))/0x3+parseInt(_0x27a647(0x15c))/0x4*(parseInt(_0x27a647(0x15e))/0x5)+-parseInt(_0x27a647(0x159))/0x6*(-parseInt(_0x27a647(0x161))/0x7)+-parseInt(_0x27a647(0x163))/0x8+parseInt(_0x27a647(0x15b))/0x9;if(_0x1546c0===_0x29447b)break;else _0xe3a025['push'](_0xe3a025['shift']());}catch(_0x40a45c){_0xe3a025['push'](_0xe3a025['shift']());}}}(a266_0x3b97,0x522b7));export function writeCliSideChannelLine(_0x384eb7){var _0x5bdea0=a266_0x7b9c;process[_0x5bdea0(0x15d)][_0x5bdea0(0x15a)](_0x384eb7+'\x0a');}function a266_0x7b9c(_0x46a22c,_0x357664){_0x46a22c=_0x46a22c-0x159;var _0x3b9733=a266_0x3b97();var _0x7b9c76=_0x3b9733[_0x46a22c];return _0x7b9c76;}function a266_0x3b97(){var _0x5e40ed=['2162154ieJooL','write','2224710lzYXnO','516diGkll','stderr','14545NNfcsu','550668GPqihr','528958mMHJKY','7jNpaBm','647154ePDteZ','1154688vcBoyY'];a266_0x3b97=function(){return _0x5e40ed;};return a266_0x3b97();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.14",
|
|
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": [
|