@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-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/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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/logs.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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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-restore.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/dataset/user-deleted-field-list.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/table-diff-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/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.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/rename.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.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/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/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/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.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/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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/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 +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a358_0x32d2(_0x2568c4,_0x2d38d4){_0x2568c4=_0x2568c4-0xf6;const _0x3d17cb=a358_0x3d17();let _0x32d284=_0x3d17cb[_0x2568c4];return _0x32d284;}const a358_0x76eac7=a358_0x32d2;(function(_0x5573bf,_0x4b57dc){const _0x54cd89=a358_0x32d2,_0xdeda46=_0x5573bf();while(!![]){try{const _0x548f0a=parseInt(_0x54cd89(0x106))/0x1*(-parseInt(_0x54cd89(0x103))/0x2)+parseInt(_0x54cd89(0xff))/0x3*(-parseInt(_0x54cd89(0x10b))/0x4)+-parseInt(_0x54cd89(0x10c))/0x5+-parseInt(_0x54cd89(0xfd))/0x6+-parseInt(_0x54cd89(0xf9))/0x7*(parseInt(_0x54cd89(0x111))/0x8)+parseInt(_0x54cd89(0xfb))/0x9+parseInt(_0x54cd89(0x107))/0xa*(parseInt(_0x54cd89(0x117))/0xb);if(_0x548f0a===_0x4b57dc)break;else _0xdeda46['push'](_0xdeda46['shift']());}catch(_0x415d27){_0xdeda46['push'](_0xdeda46['shift']());}}}(a358_0x3d17,0x22f4a));import a358_0x47408 from'node:fs';import a358_0x920d3c from'node:path';import a358_0x38aed9 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a358_0x76eac7(0xfe);function isNonNumericVersion(_0x4f8a85){const _0x2988ac=a358_0x76eac7,_0x1536cb=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1536cb[_0x2988ac(0x11b)](_0xd30bc=>_0xd30bc[_0x2988ac(0x109)](_0x4f8a85));}function getInstalledVersion(_0x1dcf1d,_0x32c731){const _0x3619c1=a358_0x76eac7;try{const _0x433649=a358_0x920d3c[_0x3619c1(0xf7)](_0x1dcf1d,_0x3619c1(0x113),_0x32c731,_0x3619c1(0x110));if(a358_0x47408[_0x3619c1(0x115)](_0x433649)){const _0x45085=JSON[_0x3619c1(0x102)](a358_0x47408[_0x3619c1(0xfc)](_0x433649,_0x3619c1(0x112)));return _0x45085['version']||null;}}catch{}return null;}function a358_0x3d17(){const _0x36ef37=['utf-8','node_modules','latest','existsSync','\x1b[1m','33PHrVWn','node','\x20\x20\x20Current\x20version:\x20','devDependencies','some','dependencies','join','@lovrabet/sdk','396375BCmHeA','npm\x20install\x20','1814436ajpKpO','readFileSync','766146dTmspA','1.2.0','63078tcexEl','\x1b[0m','↪\x20SDK\x20update\x20available','parse','5234wjWWdu','\x20\x20\x20Upgrade\x20command:\x20','minVersion','5nVXtZc','2278330ehXMFM','stableVersion','test','coerce','44HhkVxR','999940FyxbfW','sdk','utf8','log','package.json','24YtrBjg'];a358_0x3d17=function(){return _0x36ef37;};return a358_0x3d17();}async function getSdkStableVersion(){const _0x436804=a358_0x76eac7;try{const _0x14c133=await getCdnConfig();return _0x14c133?.[_0x436804(0x10d)]?.[_0x436804(0x118)]?.[_0x436804(0x108)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x3c1afb=a358_0x76eac7;try{const _0x595a5f=await getCdnConfig();return _0x595a5f?.[_0x3c1afb(0x10d)]?.['node']?.['packageName']||_0x3c1afb(0xf8);}catch{return _0x3c1afb(0xf8);}}export async function checkSdkVersion(_0x1e2bf7){const _0x1f3bd2=a358_0x76eac7,_0x41e50c=a358_0x920d3c[_0x1f3bd2(0xf7)](_0x1e2bf7,_0x1f3bd2(0x110)),[_0x275f36,_0x88f31]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x1638a9=_0x275f36||FALLBACK_MIN_SDK_VERSION;if(!a358_0x47408[_0x1f3bd2(0x115)](_0x41e50c))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1638a9,'packageName':_0x88f31,'stableVersion':_0x275f36};try{const _0x34d099=JSON[_0x1f3bd2(0x102)](a358_0x47408[_0x1f3bd2(0xfc)](_0x41e50c,_0x1f3bd2(0x10e))),_0xd09355=_0x34d099[_0x1f3bd2(0xf6)]||{},_0xe0ed9c=_0x34d099[_0x1f3bd2(0x11a)]||{},_0x254112=_0xd09355[_0x88f31]||_0xe0ed9c[_0x88f31];if(!_0x254112)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1638a9,'packageName':_0x88f31,'stableVersion':_0x275f36};let _0x444d96=getInstalledVersion(_0x1e2bf7,_0x88f31);!_0x444d96&&(_0x444d96=_0x254112);if(isNonNumericVersion(_0x254112))return{'installed':!![],'version':_0x444d96,'needsUpgrade':![],'minVersion':_0x1638a9,'packageName':_0x88f31,'stableVersion':_0x275f36};const _0x1e0afa=a358_0x38aed9[_0x1f3bd2(0x10a)](_0x444d96),_0x6d6c74=a358_0x38aed9[_0x1f3bd2(0x10a)](_0x1638a9),_0x164719=_0x1e0afa&&_0x6d6c74?a358_0x38aed9['lt'](_0x1e0afa,_0x6d6c74):![];return{'installed':!![],'version':_0x444d96,'needsUpgrade':_0x164719,'minVersion':_0x1638a9,'packageName':_0x88f31,'stableVersion':_0x275f36};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1638a9,'packageName':_0x88f31,'stableVersion':_0x275f36};}}export function checkSdkVersionSync(_0x5e0423){const _0x3becea=a358_0x76eac7,_0x2d82ba=a358_0x920d3c[_0x3becea(0xf7)](_0x5e0423,_0x3becea(0x110)),_0x4aa6a7=_0x3becea(0xf8);if(!a358_0x47408[_0x3becea(0x115)](_0x2d82ba))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4aa6a7,'stableVersion':null};try{const _0x9d9af5=JSON[_0x3becea(0x102)](a358_0x47408[_0x3becea(0xfc)](_0x2d82ba,_0x3becea(0x10e))),_0x17df08=_0x9d9af5['dependencies']||{},_0x21cf1f=_0x9d9af5[_0x3becea(0x11a)]||{},_0x4e8a24=_0x17df08[_0x4aa6a7]||_0x21cf1f[_0x4aa6a7];if(!_0x4e8a24)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4aa6a7,'stableVersion':null};let _0x1f4fab=getInstalledVersion(_0x5e0423,_0x4aa6a7);!_0x1f4fab&&(_0x1f4fab=_0x4e8a24);if(isNonNumericVersion(_0x4e8a24))return{'installed':!![],'version':_0x1f4fab,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4aa6a7,'stableVersion':null};const _0x480a3d=a358_0x38aed9[_0x3becea(0x10a)](_0x1f4fab),_0x429d70=_0x480a3d?a358_0x38aed9['lt'](_0x480a3d,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1f4fab,'needsUpgrade':_0x429d70,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4aa6a7,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4aa6a7,'stableVersion':null};}}export function printSdkUpgradeWarning(_0xbf2ac2){const _0x10dd3a=a358_0x76eac7;if(!_0xbf2ac2['needsUpgrade'])return;const _0x4d05d5='\x1b[33m',_0x2e1021=_0x10dd3a(0x100),_0x97483a=_0x10dd3a(0x116),_0x572530=_0xbf2ac2['packageName']||_0x10dd3a(0xf8),_0x4223b3=_0xbf2ac2['stableVersion']||_0xbf2ac2[_0x10dd3a(0x105)],_0x1ea9ce=_0x10dd3a(0xfa)+_0x572530+'@'+(_0x4223b3||_0x10dd3a(0x114));console[_0x10dd3a(0x10f)](),console['log'](''+_0x4d05d5+_0x97483a+_0x10dd3a(0x101)+_0x2e1021),console['log'](_0x4d05d5+_0x10dd3a(0x119)+_0x572530+'@'+_0xbf2ac2['version']+_0x2e1021),console['log'](_0x4d05d5+'\x20\x20\x20Stable\x20version:\x20'+_0x4223b3+_0x2e1021),console[_0x10dd3a(0x10f)](_0x4d05d5+_0x10dd3a(0x104)+_0x1ea9ce+_0x2e1021),console['log']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x108538,_0x4134e4){const _0x584b9a=a359_0x18fa,_0x1b947d=_0x108538();while(!![]){try{const _0x16e260=parseInt(_0x584b9a(0x9c))/0x1+parseInt(_0x584b9a(0x9f))/0x2*(-parseInt(_0x584b9a(0xaa))/0x3)+parseInt(_0x584b9a(0xb5))/0x4+parseInt(_0x584b9a(0xa3))/0x5+parseInt(_0x584b9a(0xb8))/0x6+parseInt(_0x584b9a(0xae))/0x7+-parseInt(_0x584b9a(0xa2))/0x8;if(_0x16e260===_0x4134e4)break;else _0x1b947d['push'](_0x1b947d['shift']());}catch(_0xeacbe6){_0x1b947d['push'](_0x1b947d['shift']());}}}(a359_0x53dc,0xb2f7a));function a359_0x18fa(_0x335ea1,_0x39255e){_0x335ea1=_0x335ea1-0x96;const _0x53dc2e=a359_0x53dc();let _0x18fa81=_0x53dc2e[_0x335ea1];return _0x18fa81;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a359_0x4d02e9 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(_0x4028d4){const _0x2e6900=a359_0x18fa,_0xff2d10=_0x4028d4[_0x2e6900(0xb9)]||_0x2e6900(0xa9);return _0x2e6900(0x9a)+NPM_PACKAGE_NAME+'@'+_0xff2d10;}function a359_0x53dc(){const _0x1d4677=['3789928RruVSD','Upgrade\x20command:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','5965476usQcoS','stableVersion','currentVersion','\x20\x20\x20Upgrade\x20command:\x20','\x1b[1m','\x1b[0m','npm\x20install\x20-g\x20','minimumVersionMessage','1216292zkzojV','join','log','24MeZzfo','↪\x20New\x20version\x20available','\x20\x20\x20Current\x20CLI\x20version:\x20','22304120ZMTJWy','1985980fqpako','\x20\x20\x20','\x20\x20\x20Minimum\x20supported:\x20','\x20\x20\x20Stable\x20version:\x20','Current\x20version:\x20','coerce','latest','114468ooTJxv','upgradeMessage','parse','package.json','2966047qInblc','../..','needsUpgrade','\x1b[31m','minimumVersion','belowMinimum','\x20\x20\x20Recommended\x20stable:\x20'];a359_0x53dc=function(){return _0x1d4677;};return a359_0x53dc();}function getCurrentCliVersion(){const _0x3bad10=a359_0x18fa;try{const _0x57089a=fileURLToPath(import.meta.url),_0x12c03a=resolve(dirname(_0x57089a),_0x3bad10(0xaf)),_0x5bd6bc=resolve(_0x12c03a,_0x3bad10(0xad)),_0x277a5b=JSON[_0x3bad10(0xac)](readFileSync(_0x5bd6bc,'utf-8'));return _0x277a5b['version']||'1.0.0';}catch{return'1.0.0';}}export async function checkCliVersion(){const _0x50d587=a359_0x18fa,_0xa97c06=getCurrentCliVersion(),_0x5077c1=await getCliVersionPolicy(),_0x1bb291=_0x5077c1?.[_0x50d587(0xb9)]||null,_0x2fd7c7=_0x5077c1?.['minimumVersion']||null;let _0x5232f2=![],_0x2d177e=![];const _0x4a5151=a359_0x4d02e9[_0x50d587(0xa8)](_0xa97c06);if(_0x4a5151&&_0x1bb291)try{const _0x199903=a359_0x4d02e9[_0x50d587(0xa8)](_0x1bb291);if(_0x199903)_0x5232f2=a359_0x4d02e9['lt'](_0x4a5151,_0x199903);}catch{}if(_0x4a5151&&_0x2fd7c7)try{const _0x29c1e5=a359_0x4d02e9[_0x50d587(0xa8)](_0x2fd7c7);if(_0x29c1e5)_0x2d177e=a359_0x4d02e9['lt'](_0x4a5151,_0x29c1e5);}catch{}return _0x2d177e&&(_0x5232f2=!![]),{'currentVersion':_0xa97c06,'stableVersion':_0x1bb291,'minimumVersion':_0x2fd7c7,'needsUpgrade':_0x5232f2,'belowMinimum':_0x2d177e,'isPreRelease':![],'upgradeMessage':_0x5077c1?.[_0x50d587(0xab)],'minimumVersionMessage':_0x5077c1?.['minimumVersionMessage']};}export function printCliUpgradeWarning(_0x4f94da){const _0x58660f=a359_0x18fa;if(!_0x4f94da[_0x58660f(0xb0)]&&!_0x4f94da[_0x58660f(0xb3)])return;const _0x2f0f2c=_0x58660f(0xb1),_0x2bb4ff='\x1b[33m',_0x4e3318=_0x58660f(0x99),_0x57258e=_0x58660f(0x98),_0x5e0748=getCliUpgradeCommand(_0x4f94da);console[_0x58660f(0x9e)](),_0x4f94da[_0x58660f(0xb3)]?(console[_0x58660f(0x9e)](''+_0x2f0f2c+_0x57258e+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x4e3318),console[_0x58660f(0x9e)](_0x2f0f2c+_0x58660f(0xa1)+_0x4f94da[_0x58660f(0x96)]+_0x4e3318),_0x4f94da[_0x58660f(0xb2)]&&console[_0x58660f(0x9e)](_0x2f0f2c+_0x58660f(0xa5)+_0x4f94da[_0x58660f(0xb2)]+_0x4e3318),_0x4f94da[_0x58660f(0xb9)]&&_0x4f94da[_0x58660f(0xb9)]!==_0x4f94da[_0x58660f(0xb2)]&&console[_0x58660f(0x9e)](_0x2f0f2c+_0x58660f(0xb4)+_0x4f94da[_0x58660f(0xb9)]+_0x4e3318),_0x4f94da[_0x58660f(0x9b)]&&console[_0x58660f(0x9e)](_0x2f0f2c+_0x58660f(0xa4)+_0x4f94da[_0x58660f(0x9b)]+_0x4e3318),console[_0x58660f(0x9e)](_0x2f0f2c+_0x58660f(0x97)+_0x5e0748+_0x4e3318)):(console['log'](''+_0x2bb4ff+_0x57258e+_0x58660f(0xa0)+_0x4e3318),console[_0x58660f(0x9e)](_0x2bb4ff+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x4f94da[_0x58660f(0x96)]+_0x4e3318),console[_0x58660f(0x9e)](_0x2bb4ff+_0x58660f(0xa6)+_0x4f94da[_0x58660f(0xb9)]+_0x4e3318),_0x4f94da[_0x58660f(0xab)]&&console[_0x58660f(0x9e)](_0x2bb4ff+_0x58660f(0xa4)+_0x4f94da[_0x58660f(0xab)]+_0x4e3318),console[_0x58660f(0x9e)](_0x2bb4ff+'\x20\x20\x20Upgrade\x20command:\x20'+_0x5e0748+_0x4e3318)),console[_0x58660f(0x9e)]();}export function assertCliVersionSupported(_0x28cb83){const _0x376077=a359_0x18fa;if(!_0x28cb83[_0x376077(0xb3)])return;const _0x5bf870=[_0x28cb83[_0x376077(0x9b)],_0x376077(0xa7)+_0x28cb83[_0x376077(0x96)],_0x28cb83[_0x376077(0xb2)]?'Minimum\x20supported:\x20'+_0x28cb83['minimumVersion']:null,_0x376077(0xb6)+getCliUpgradeCommand(_0x28cb83)]['filter'](Boolean)[_0x376077(0x9d)]('\x0a');throw CliErrors['validation'](_0x376077(0xb7),_0x5bf870);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a360_0x5378(_0x27815f,_0x52ae9b){_0x27815f=_0x27815f-0x1c7;const _0x5aeefa=a360_0x5aee();let _0x53781e=_0x5aeefa[_0x27815f];return _0x53781e;}(function(_0x477283,_0x44a5c5){const _0x37a1ee=a360_0x5378,_0x34115a=_0x477283();while(!![]){try{const _0x53c4d8=-parseInt(_0x37a1ee(0x1cf))/0x1*(-parseInt(_0x37a1ee(0x1d4))/0x2)+-parseInt(_0x37a1ee(0x1c8))/0x3*(-parseInt(_0x37a1ee(0x1d9))/0x4)+-parseInt(_0x37a1ee(0x1c9))/0x5*(parseInt(_0x37a1ee(0x1d3))/0x6)+-parseInt(_0x37a1ee(0x1d5))/0x7+parseInt(_0x37a1ee(0x1d7))/0x8*(-parseInt(_0x37a1ee(0x1e1))/0x9)+parseInt(_0x37a1ee(0x1dd))/0xa+parseInt(_0x37a1ee(0x1cb))/0xb*(parseInt(_0x37a1ee(0x1cc))/0xc);if(_0x53c4d8===_0x44a5c5)break;else _0x34115a['push'](_0x34115a['shift']());}catch(_0x57af8c){_0x34115a['push'](_0x34115a['shift']());}}}(a360_0x5aee,0x93651));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a360_0x150056 from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x15e057){const _0x2511ba=a360_0x5378,_0x1a72de=a360_0x150056[_0x2511ba(0x1df)](_0x15e057);return _0x1a72de?a360_0x150056['prerelease'](_0x1a72de)?.[0x0]===_0x2511ba(0x1d2):![];}export function resolveProjectTemplateDescriptor(_0x5c1b38,_0x533edb){const _0x34eac6=a360_0x5378;if(isBetaCliVersion(_0x533edb))return _0x5c1b38[_0x34eac6(0x1d2)]?.[_0x34eac6(0x1ca)]??_0x5c1b38[_0x34eac6(0x1ca)];return _0x5c1b38[_0x34eac6(0x1ca)];}function a360_0x5aee(){const _0x18c96e=['minimumVersionMessage','9XBzTbV','signal','object','3wijtNu','3783245yzepJX','projectTemplate','2717407SbpfUY','12ilqiIf','cli','application/json','83356QpZquI','recommendedVersion','minVersion','beta','6oKStdb','2ZdkIin','3223626AtOvYc','trim','816328VFkmGZ','stableVersion','4639608NuXWBa','now','string','latestVersion','4326420BqbVhL','json','valid'];a360_0x5aee=function(){return _0x18c96e;};return a360_0x5aee();}function pickString(_0x1e2ec6){const _0x494b3a=a360_0x5378;return typeof _0x1e2ec6===_0x494b3a(0x1db)&&_0x1e2ec6[_0x494b3a(0x1d6)]()['length']>0x0?_0x1e2ec6[_0x494b3a(0x1d6)]():null;}function normalizeCliVersionPolicy(_0x1685fd){const _0x14316b=a360_0x5378;if(!_0x1685fd||typeof _0x1685fd!=='object')return null;const _0x2199e3=_0x1685fd,_0x16cf95=_0x2199e3['cli']&&typeof _0x2199e3['cli']===_0x14316b(0x1c7)?_0x2199e3[_0x14316b(0x1cd)]:_0x2199e3,_0x1f957b=pickString(_0x16cf95[_0x14316b(0x1d8)])||pickString(_0x16cf95[_0x14316b(0x1dc)])||pickString(_0x16cf95[_0x14316b(0x1d0)]),_0x43e2cc=pickString(_0x16cf95['minimumVersion'])||pickString(_0x16cf95[_0x14316b(0x1d1)]);if(!_0x1f957b&&!_0x43e2cc)return null;return{'stableVersion':_0x1f957b,'minimumVersion':_0x43e2cc,'upgradeMessage':pickString(_0x16cf95['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x16cf95[_0x14316b(0x1e0)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x22cf20){const _0x6bf27c=a360_0x5378,_0x22acef=new AbortController(),_0x36904e=setTimeout(()=>_0x22acef['abort'](),FETCH_TIMEOUT_MS);try{const _0x573161=await fetch(_0x22cf20,{'headers':{'Accept':_0x6bf27c(0x1ce)},'signal':_0x22acef[_0x6bf27c(0x1e2)]});if(!_0x573161['ok'])return null;const _0x229fbf=await _0x573161[_0x6bf27c(0x1de)]();return _0x229fbf&&typeof _0x229fbf===_0x6bf27c(0x1c7)?_0x229fbf:null;}catch{return null;}finally{clearTimeout(_0x36904e);}}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}export async function fetchProjectTemplateCdnConfig(){const _0x304d51=await getRabetbaseCdnConfig();return _0x304d51?{'config':_0x304d51,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x1a8d96=a360_0x5378,_0x4a4098=Date[_0x1a8d96(0x1da)]();if(hasCachedConfig){const _0x58fa5c=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x4a4098-cacheTime<_0x58fa5c)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x4a4098,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a361_0x2f589d=a361_0x4039;function a361_0x1c5e(){const _0x64c4dd=['778575QKagPe','286752pRqwvp','238301EaRqeF','323442FTgxwC','468086gMngwr','string','project','env','1343268JSwkBV','423399vqqOkp'];a361_0x1c5e=function(){return _0x64c4dd;};return a361_0x1c5e();}(function(_0x102af6,_0x41523a){const _0x4a0fb6=a361_0x4039,_0x8837da=_0x102af6();while(!![]){try{const _0x50c40a=-parseInt(_0x4a0fb6(0xee))/0x1+parseInt(_0x4a0fb6(0xf0))/0x2+parseInt(_0x4a0fb6(0xf5))/0x3+-parseInt(_0x4a0fb6(0xed))/0x4+-parseInt(_0x4a0fb6(0xec))/0x5+parseInt(_0x4a0fb6(0xf4))/0x6+parseInt(_0x4a0fb6(0xef))/0x7;if(_0x50c40a===_0x41523a)break;else _0x8837da['push'](_0x8837da['shift']());}catch(_0xce9af1){_0x8837da['push'](_0x8837da['shift']());}}}(a361_0x1c5e,0x2bd64));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a361_0x555b4b,getMultiAppConfigs as a361_0x59c820,getTemplateBaseUrl as a361_0x4b2529}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x5ae9fc){const _0x157c3d=a361_0x4039,_0x1c15b1=readRawConfig(_0x5ae9fc);return _0x1c15b1['env']&&typeof _0x1c15b1[_0x157c3d(0xf3)]===_0x157c3d(0xf1)&&initEnv(_0x1c15b1[_0x157c3d(0xf3)]),_0x1c15b1;}export function getConfigAppCode(){return a361_0x555b4b();}export function getMultiAppConfigs(_0x2f4ddb=a361_0x2f589d(0xf2)){return a361_0x59c820(_0x2f4ddb);}function a361_0x4039(_0xa9a172,_0x1ac4df){_0xa9a172=_0xa9a172-0xec;const _0x1c5e22=a361_0x1c5e();let _0x40392c=_0x1c5e22[_0xa9a172];return _0x40392c;}export function getTemplateBaseUrl(){return a361_0x4b2529();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c1c36,_0x115e33){const _0x42c7a3=a362_0xd902,_0x26cb90=_0x1c1c36();while(!![]){try{const _0x1f280c=-parseInt(_0x42c7a3(0x120))/0x1*(-parseInt(_0x42c7a3(0x11f))/0x2)+-parseInt(_0x42c7a3(0x123))/0x3+-parseInt(_0x42c7a3(0x11a))/0x4*(-parseInt(_0x42c7a3(0x11e))/0x5)+-parseInt(_0x42c7a3(0x126))/0x6+-parseInt(_0x42c7a3(0x11b))/0x7*(parseInt(_0x42c7a3(0x124))/0x8)+parseInt(_0x42c7a3(0x127))/0x9*(parseInt(_0x42c7a3(0x119))/0xa)+-parseInt(_0x42c7a3(0x11d))/0xb;if(_0x1f280c===_0x115e33)break;else _0x26cb90['push'](_0x26cb90['shift']());}catch(_0x49c8bd){_0x26cb90['push'](_0x26cb90['shift']());}}}(a362_0x3f71,0x79b0a));function toFiniteNumber(_0x293cf4){const _0x1c0b6e=a362_0xd902;if(typeof _0x293cf4===_0x1c0b6e(0x121)&&Number['isFinite'](_0x293cf4))return _0x293cf4;if(typeof _0x293cf4===_0x1c0b6e(0x125)){const _0x432c12=_0x293cf4[_0x1c0b6e(0x11c)]();if(!_0x432c12)return undefined;const _0x4d3fe6=Number(_0x432c12);if(Number[_0x1c0b6e(0x122)](_0x4d3fe6))return _0x4d3fe6;}return undefined;}function a362_0xd902(_0x36ef94,_0x26e963){_0x36ef94=_0x36ef94-0x118;const _0x3f716f=a362_0x3f71();let _0xd9020b=_0x3f716f[_0x36ef94];return _0xd9020b;}export function normalizeEntityWithIdResponse(_0x3a90ba){const _0x2ecdbd=a362_0xd902,_0x49b6cd=toFiniteNumber(_0x3a90ba);if(_0x49b6cd!==undefined)return{'id':_0x49b6cd,'entity':{'id':_0x49b6cd}};if(!_0x3a90ba||typeof _0x3a90ba!==_0x2ecdbd(0x118))return{'id':undefined,'entity':{}};const _0x152fe8={..._0x3a90ba},_0x5bb322=toFiniteNumber(_0x152fe8['id']);return _0x5bb322!==undefined&&(_0x152fe8['id']=_0x5bb322),{'id':_0x5bb322,'entity':_0x152fe8};}function a362_0x3f71(){const _0xc2dfe6=['isFinite','243714ViHjnn','280ScRFbu','string','4734684NpCnLk','136089hRaKTw','object','320ILaxgA','4YdQhDQ','162295lQAszO','trim','94116JengQx','4739530gLUiRl','11922Iiqlqh','127kzYhTB','number'];a362_0x3f71=function(){return _0xc2dfe6;};return a362_0x3f71();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a363_0x3127(_0x41a085,_0x547c5b){_0x41a085=_0x41a085-0x1e9;const _0x2808d0=a363_0x2808();let _0x312729=_0x2808d0[_0x41a085];return _0x312729;}(function(_0x154b5a,_0x57b37f){const _0x434504=a363_0x3127,_0x15d5b9=_0x154b5a();while(!![]){try{const _0x129a9b=parseInt(_0x434504(0x1f0))/0x1+parseInt(_0x434504(0x1ec))/0x2+parseInt(_0x434504(0x1e9))/0x3*(-parseInt(_0x434504(0x1ef))/0x4)+parseInt(_0x434504(0x1ed))/0x5+parseInt(_0x434504(0x1f1))/0x6+parseInt(_0x434504(0x1ea))/0x7+-parseInt(_0x434504(0x1ee))/0x8;if(_0x129a9b===_0x57b37f)break;else _0x15d5b9['push'](_0x15d5b9['shift']());}catch(_0x29ec06){_0x15d5b9['push'](_0x15d5b9['shift']());}}}(a363_0x2808,0xa99d2));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x58205b,_0x4c6b67){const _0x564a36=a363_0x3127,_0x574bd0=statSync(_0x58205b);if(_0x574bd0[_0x564a36(0x1eb)]()){!existsSync(_0x4c6b67)&&mkdirSync(_0x4c6b67,{'recursive':!![]});const _0x684944=readdirSync(_0x58205b);for(const _0x1b798a of _0x684944){await copyDir(join(_0x58205b,_0x1b798a),join(_0x4c6b67,_0x1b798a));}}else copyFileSync(_0x58205b,_0x4c6b67);}export function ensureDir(_0x48c15a){!existsSync(_0x48c15a)&&mkdirSync(_0x48c15a,{'recursive':!![]});}function a363_0x2808(){const _0x5ea7b8=['12zfxmTQ','446853NCIPAq','4943754YdnsqG','1201011NkIyZK','1459864NGjvuk','isDirectory','597450mWeYqc','3947730tNzyoK','5375088orAsLH'];a363_0x2808=function(){return _0x5ea7b8;};return a363_0x2808();}export function pathExists(_0x20d7de){return existsSync(_0x20d7de);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a364_0x5374b5=a364_0xc46f;(function(_0x1b1299,_0x3fd7bf){const _0x28e4cc=a364_0xc46f,_0x2966e5=_0x1b1299();while(!![]){try{const _0x38056e=parseInt(_0x28e4cc(0xcc))/0x1*(-parseInt(_0x28e4cc(0xd2))/0x2)+-parseInt(_0x28e4cc(0xe0))/0x3+-parseInt(_0x28e4cc(0xd7))/0x4+-parseInt(_0x28e4cc(0xde))/0x5*(-parseInt(_0x28e4cc(0xdc))/0x6)+parseInt(_0x28e4cc(0xd3))/0x7+-parseInt(_0x28e4cc(0xd0))/0x8*(parseInt(_0x28e4cc(0xdf))/0x9)+parseInt(_0x28e4cc(0xd1))/0xa*(parseInt(_0x28e4cc(0xe3))/0xb);if(_0x38056e===_0x3fd7bf)break;else _0x2966e5['push'](_0x2966e5['shift']());}catch(_0x36c1a8){_0x2966e5['push'](_0x2966e5['shift']());}}}(a364_0x3e24,0x6f1bd));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a364_0x3e24(){const _0x465367=['\x0a\x0a>更新时间:','lastUpdated','title','guides','keys','CDN\x20request\x20failed:\x20','push','application/json','skillTemplate','40483uabpfL','entries','.md','utf-8','104LwNWmv','27640ZPwBAX','6OKRgBH','5348231ALgCrf','CDN\x20returned\x20invalid\x20data','extendContent','status','2579044POgzjw','path','.lovrabet/skill/guides','json','join','384378Nfldut','trimEnd','20CrlKTb','142740VIVguu','1970802gyvQyU','replace','length','4235IkJMxZ','object','map'];a364_0x3e24=function(){return _0x465367;};return a364_0x3e24();}import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x20ff5d=getTemplateBaseUrl();return _0x20ff5d+'/skills/guides.json';}const CACHE_DIR=join(homedir(),'.lovrabet','cache');export async function fetchGuidesFromCDN(){const _0x51edc9=a364_0xc46f,_0x1ee938=getGuidesCdnUrl(),_0x451f97=await fetch(_0x1ee938,{'headers':{'Accept':_0x51edc9(0xca)}});if(!_0x451f97['ok'])throw new Error(_0x51edc9(0xc8)+_0x451f97[_0x51edc9(0xd6)]+'\x20'+_0x451f97['statusText']);const _0x13c10d=await _0x451f97[_0x51edc9(0xda)]();if(!_0x13c10d[_0x51edc9(0xc6)]||typeof _0x13c10d[_0x51edc9(0xc6)]!==_0x51edc9(0xe4))throw new Error(_0x51edc9(0xd4));return _0x13c10d;}export function writeGuidesToProject(_0x44a327,_0x14a5a8,_0x46f020=a364_0x5374b5(0xd9),_0x4af7a0){const _0x2d25bb=a364_0x5374b5,_0x38d7f6=join(_0x14a5a8,_0x46f020);mkdirSync(_0x38d7f6,{'recursive':!![]});for(const [_0x14598b,_0x38433d]of Object['entries'](_0x44a327['guides'])){let _0x3774e5=_0x38433d['content'];_0x38433d['lastUpdated']&&(_0x3774e5=appendUpdateTime(_0x3774e5,_0x38433d['lastUpdated'])),writeFileSync(join(_0x38d7f6,_0x14598b+_0x2d25bb(0xce)),_0x3774e5,_0x2d25bb(0xcf));}}export function appendUpdateTime(_0x50bee0,_0x2c32b2){const _0x452704=a364_0x5374b5;return _0x50bee0=_0x50bee0[_0x452704(0xe1)](/\n*>更新时间:.*$/m,''),_0x50bee0[_0x452704(0xdd)]()+(_0x452704(0xc3)+_0x2c32b2);}export function getSkillTemplate(_0x482711){return _0x482711['skillTemplate']?.['content']||'';}function a364_0xc46f(_0x14a059,_0x3ad210){_0x14a059=_0x14a059-0xc3;const _0x3e2469=a364_0x3e24();let _0xc46f0=_0x3e2469[_0x14a059];return _0xc46f0;}export function appendExtendContents(_0x52ddb3,_0x223986,_0x2f3dfc){const _0x2bd4da=a364_0x5374b5,_0xd00cb3=[];for(const [,_0x2893af]of Object[_0x2bd4da(0xcd)](_0x223986[_0x2bd4da(0xc6)])){_0x2893af['extendContent']&&_0xd00cb3[_0x2bd4da(0xc9)](_0x2893af[_0x2bd4da(0xd5)][_0x2bd4da(0xdd)]());}if(_0xd00cb3['length']===0x0)return _0x52ddb3;return _0x52ddb3[_0x2bd4da(0xdd)]()+'\x0a\x0a'+_0xd00cb3[_0x2bd4da(0xdb)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x44c9ed,_0x320fd1,_0xa2350c){const _0x56dcb7=a364_0x5374b5,_0x1e3b50=getSkillTemplate(_0x44c9ed);if(!_0x1e3b50)throw new Error('CDN\x20data\x20is\x20missing\x20skillTemplate');const _0x4944eb=dirname(_0x320fd1);mkdirSync(_0x4944eb,{'recursive':!![]});let _0x7ea046=_0x1e3b50['replace'](/\{\{IDE_NAME\}\}/g,_0xa2350c);_0x7ea046=appendExtendContents(_0x7ea046,_0x44c9ed),_0x44c9ed[_0x56dcb7(0xcb)]['lastUpdated']&&(_0x7ea046=appendUpdateTime(_0x7ea046,_0x44c9ed['skillTemplate'][_0x56dcb7(0xc4)])),writeFileSync(_0x320fd1,_0x7ea046,_0x56dcb7(0xcf));}export async function installGuides(_0x266cba){const _0xedf58d=a364_0x5374b5,_0x4523a3=await fetchGuidesFromCDN();return writeGuidesToProject(_0x4523a3,_0x266cba),Object[_0xedf58d(0xc7)](_0x4523a3[_0xedf58d(0xc6)])[_0xedf58d(0xe2)];}export function getGuidesSummary(_0x14568f){const _0xae7eca=a364_0x5374b5;return Object[_0xae7eca(0xcd)](_0x14568f[_0xae7eca(0xc6)])[_0xae7eca(0xe5)](([_0x335017,_0x358410])=>({'key':_0x335017,'title':_0x358410[_0xae7eca(0xc5)],'path':_0x358410[_0xae7eca(0xd8)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x65f33f,_0x12fe6d){const _0x2c933c=a365_0x1979,_0x561904=_0x65f33f();while(!![]){try{const _0x55ee8a=-parseInt(_0x2c933c(0x19e))/0x1*(-parseInt(_0x2c933c(0x1ae))/0x2)+-parseInt(_0x2c933c(0x1a0))/0x3+-parseInt(_0x2c933c(0x19d))/0x4*(-parseInt(_0x2c933c(0x1ab))/0x5)+-parseInt(_0x2c933c(0x1a5))/0x6*(-parseInt(_0x2c933c(0x1b0))/0x7)+parseInt(_0x2c933c(0x1a2))/0x8*(-parseInt(_0x2c933c(0x1a4))/0x9)+parseInt(_0x2c933c(0x1af))/0xa+-parseInt(_0x2c933c(0x1ad))/0xb;if(_0x55ee8a===_0x12fe6d)break;else _0x561904['push'](_0x561904['shift']());}catch(_0x5e1d6a){_0x561904['push'](_0x561904['shift']());}}}(a365_0x4ed0,0xd24fa));export async function httpRequest(_0x435542,_0xeb35c3={}){const _0x38548d=a365_0x1979,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0xeb35c3;let _0x4265a5=null;for(let _0x220253=0x0;_0x220253<=retries;_0x220253++){try{const _0x4f46fe=new AbortController(),_0x3ebede=setTimeout(()=>_0x4f46fe[_0x38548d(0x197)](),timeout),_0x604648=await fetch(_0x435542,{'headers':headers,'signal':_0x4f46fe[_0x38548d(0x19c)]});clearTimeout(_0x3ebede);let _0x2b1f22;const _0x5d937d=_0x604648[_0x38548d(0x195)][_0x38548d(0x19f)](_0x38548d(0x1a6));return _0x5d937d?.[_0x38548d(0x193)](_0x38548d(0x1ac))?_0x2b1f22=await _0x604648['json']():_0x2b1f22=await _0x604648[_0x38548d(0x1aa)](),{'ok':_0x604648['ok'],'status':_0x604648[_0x38548d(0x196)],'statusText':_0x604648[_0x38548d(0x1a1)],'data':_0x2b1f22,'headers':_0x604648[_0x38548d(0x195)],'url':_0x604648[_0x38548d(0x19b)],'text':()=>_0x604648[_0x38548d(0x1aa)]()};}catch(_0x2fc145){_0x4265a5=_0x2fc145 instanceof Error?_0x2fc145:new Error(String(_0x2fc145));if(_0x220253===retries)break;if(shouldRetry(_0x2fc145)){console['log']('*\x20Request\x20failed;\x20retry\x20'+(_0x220253+0x1)+_0x38548d(0x1a9)+retryDelay+_0x38548d(0x1a7)),await sleep(retryDelay);continue;}else break;}}throw _0x4265a5||new Error(_0x38548d(0x1b1));}function shouldRetry(_0x2f883d){const _0x4b224e=a365_0x1979;if(_0x2f883d instanceof Error){if(_0x2f883d[_0x4b224e(0x192)]===_0x4b224e(0x1a3))return![];if(_0x2f883d[_0x4b224e(0x192)]===_0x4b224e(0x198)&&_0x2f883d[_0x4b224e(0x199)][_0x4b224e(0x193)](_0x4b224e(0x19a)))return!![];if(_0x2f883d[_0x4b224e(0x199)][_0x4b224e(0x193)](_0x4b224e(0x1a8)))return!![];if(_0x2f883d[_0x4b224e(0x199)][_0x4b224e(0x193)](_0x4b224e(0x194)))return![];}return![];}function a365_0x1979(_0x69ca31,_0x4ddcad){_0x69ca31=_0x69ca31-0x192;const _0x4ed019=a365_0x4ed0();let _0x197904=_0x4ed019[_0x69ca31];return _0x197904;}function a365_0x4ed0(){const _0x4858e7=['headers','status','abort','TypeError','message','fetch','url','signal','24tFzauw','403XhezpH','get','3261339gxmCTb','statusText','2671288eNKGVr','AbortError','18KQRvXs','6dWMKcw','content-type','ms...','ECONNRESET','\x20in\x20','text','595365KGDMvN','application/json','5386282MVYpGJ','1082MNcuvf','15997120cmWvnT','4017006btCrCx','Request\x20failed','name','includes','ENOTFOUND'];a365_0x4ed0=function(){return _0x4858e7;};return a365_0x4ed0();}function sleep(_0x472a4d){return new Promise(_0x1a54b4=>setTimeout(_0x1a54b4,_0x472a4d));}export function validateUrl(_0x231703){try{return new URL(_0x231703),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43f36d,_0x3c9913){const _0x27fce4=a366_0x4f96,_0x346f3d=_0x43f36d();while(!![]){try{const _0x202ce7=-parseInt(_0x27fce4(0x1d5))/0x1+parseInt(_0x27fce4(0x1d9))/0x2*(parseInt(_0x27fce4(0x1d8))/0x3)+-parseInt(_0x27fce4(0x1de))/0x4*(parseInt(_0x27fce4(0x1da))/0x5)+-parseInt(_0x27fce4(0x1dc))/0x6*(-parseInt(_0x27fce4(0x1e4))/0x7)+-parseInt(_0x27fce4(0x1e0))/0x8+-parseInt(_0x27fce4(0x1e5))/0x9*(parseInt(_0x27fce4(0x1dd))/0xa)+parseInt(_0x27fce4(0x1d7))/0xb;if(_0x202ce7===_0x3c9913)break;else _0x346f3d['push'](_0x346f3d['shift']());}catch(_0xc08be){_0x346f3d['push'](_0x346f3d['shift']());}}}(a366_0x4488,0xc2e0e));function a366_0x4f96(_0x55bc85,_0x454c53){_0x55bc85=_0x55bc85-0x1d5;const _0x4488c5=a366_0x4488();let _0x4f96ad=_0x4488c5[_0x55bc85];return _0x4f96ad;}function env(_0x4200f8){return process.env[`RABETBASE_${_0x4200f8}`]||process.env[`LOVRABET_${_0x4200f8}`]||undefined;}export function isNonInteractive(_0x3f78d8){const _0x1ffa52=a366_0x4f96;return!!(_0x3f78d8[_0x1ffa52(0x1df)]||_0x3f78d8['ci']||env('CI')===_0x1ffa52(0x1e1)||process.env.CI===_0x1ffa52(0x1e1)||!process[_0x1ffa52(0x1e3)][_0x1ffa52(0x1e2)]||!isStdinRawModeSupported());}function a366_0x4488(){const _0x244881=['1806cDWkjD','20eahILU','4JQAysd','nonInteractive','1521328BVvItl','true','isTTY','stdout','1001GqIpBw','255033NPPytn','774686dVFZDb','setRawMode','25291618PSSrOp','1396161vtGqvw','4LAxorx','7266535xCVPqm','stdin'];a366_0x4488=function(){return _0x244881;};return a366_0x4488();}function isStdinRawModeSupported(){const _0x412271=a366_0x4f96;if(!process[_0x412271(0x1db)][_0x412271(0x1e2)])return![];try{const _0x3bef4e=process['stdin']['isRaw'];return process[_0x412271(0x1db)]['setRawMode'](!![]),process['stdin'][_0x412271(0x1d6)](_0x3bef4e??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a367_0x875111=a367_0x324a;(function(_0x3fe819,_0x1dc57f){const _0x1012c8=a367_0x324a,_0x45a084=_0x3fe819();while(!![]){try{const _0xb0dda3=-parseInt(_0x1012c8(0x1b9))/0x1+parseInt(_0x1012c8(0x1b4))/0x2+-parseInt(_0x1012c8(0x1c6))/0x3*(-parseInt(_0x1012c8(0x1a5))/0x4)+-parseInt(_0x1012c8(0x1ac))/0x5+-parseInt(_0x1012c8(0x19e))/0x6+parseInt(_0x1012c8(0x1c9))/0x7*(parseInt(_0x1012c8(0x1c3))/0x8)+parseInt(_0x1012c8(0x1b5))/0x9;if(_0xb0dda3===_0x1dc57f)break;else _0x45a084['push'](_0x45a084['shift']());}catch(_0x535b9a){_0x45a084['push'](_0x45a084['shift']());}}}(a367_0x469c,0xb441e));import a367_0x289ad3 from'winston';import a367_0x1674aa from'node:fs';import a367_0x157671 from'node:path';function a367_0x324a(_0x9ab0d7,_0x5e20ce){_0x9ab0d7=_0x9ab0d7-0x197;const _0x469c40=a367_0x469c();let _0x324ae5=_0x469c40[_0x9ab0d7];return _0x324ae5;}class Logger{[a367_0x875111(0x1a9)];['logFilePath'];[a367_0x875111(0x19a)]='';constructor(){const _0x3d37f5=a367_0x875111;this[_0x3d37f5(0x1a2)]='';}['setRawCommand'](_0xfa0b59){const _0x291330=a367_0x875111;this[_0x291330(0x19a)]=_0xfa0b59;}[a367_0x875111(0x1ca)](){const _0x93d2c9=a367_0x875111,_0x588bd9=a367_0x157671['dirname'](this[_0x93d2c9(0x1a2)]);!a367_0x1674aa[_0x93d2c9(0x1c8)](_0x588bd9)&&a367_0x1674aa[_0x93d2c9(0x1c2)](_0x588bd9,{'recursive':!![]});const _0x532e26=a367_0x289ad3['format'][_0x93d2c9(0x1c1)](a367_0x289ad3[_0x93d2c9(0x1c0)]['timestamp'](),a367_0x289ad3[_0x93d2c9(0x1c0)][_0x93d2c9(0x1ae)]({'stack':!![]}),a367_0x289ad3['format'][_0x93d2c9(0x1b1)](_0x3eb037=>{const _0x294882=_0x93d2c9,_0xc55903={'timestamp':_0x3eb037['timestamp']||new Date()[_0x294882(0x197)](),'level':_0x3eb037[_0x294882(0x1b0)]||_0x294882(0x1cb),'command':_0x3eb037[_0x294882(0x19b)]||_0x294882(0x198),'rawCommand':_0x3eb037[_0x294882(0x1be)]||this[_0x294882(0x19a)]||undefined,'message':_0x3eb037[_0x294882(0x1a6)]||'','duration':_0x3eb037[_0x294882(0x1b2)]||undefined,'details':_0x3eb037[_0x294882(0x1ab)]||undefined};return JSON[_0x294882(0x1cc)](_0xc55903);}));this['winstonLogger']=a367_0x289ad3[_0x93d2c9(0x1aa)]({'level':_0x93d2c9(0x1cb),'format':_0x532e26,'transports':[new a367_0x289ad3[(_0x93d2c9(0x1ba))]['File']({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a367_0x289ad3[_0x93d2c9(0x1af)]({'success':_0x93d2c9(0x1a1),'error':_0x93d2c9(0x19c),'warn':_0x93d2c9(0x199),'info':_0x93d2c9(0x19f)});}[a367_0x875111(0x1c4)](_0x47c29c){const _0x480b51=a367_0x875111;this[_0x480b51(0x1a2)]=a367_0x157671[_0x480b51(0x1a7)](_0x47c29c,'.lovrabet.log'),this[_0x480b51(0x1a9)]&&this[_0x480b51(0x1a9)]['clear'](),this[_0x480b51(0x1ca)]();}[a367_0x875111(0x1cb)](_0x55a68f,_0x32c51d,_0x437f8d){const _0x34a9c7=a367_0x875111;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x34a9c7(0x1a9)]['info'](_0x32c51d,{'command':_0x55a68f,'details':_0x437f8d});}[a367_0x875111(0x1c7)](_0x4e8f37,_0x55679b,_0x5da78b,_0x3c00f6){const _0x3b3e72=a367_0x875111;if(!this[_0x3b3e72(0x1a2)]||!this[_0x3b3e72(0x1a9)])return;this[_0x3b3e72(0x1a9)]['log'](_0x3b3e72(0x1cb),_0x55679b,{'level':_0x3b3e72(0x1c7),'command':_0x4e8f37,'duration':_0x5da78b,'details':_0x3c00f6});}[a367_0x875111(0x1a3)](_0x5ad518,_0x3bd396,_0x1c4afe){const _0x273707=a367_0x875111;if(!this[_0x273707(0x1a2)]||!this[_0x273707(0x1a9)])return;this[_0x273707(0x1a9)][_0x273707(0x1a3)](_0x3bd396,{'command':_0x5ad518,'details':_0x1c4afe});}[a367_0x875111(0x1bd)](_0x13dde9,_0x241799,_0x575295){const _0x1118c6=a367_0x875111;if(!this[_0x1118c6(0x1a2)]||!this[_0x1118c6(0x1a9)])return;this[_0x1118c6(0x1a9)][_0x1118c6(0x1bd)](_0x241799,{'command':_0x13dde9,'details':_0x575295});}async[a367_0x875111(0x1a4)](_0x2b2cfc,_0x1a38c4,_0x1baf1d){const _0x46edc3=a367_0x875111,_0x4c662e=Date['now']();this[_0x46edc3(0x1cb)](_0x2b2cfc,_0x46edc3(0x1b8)+_0x1a38c4);try{const _0x51e193=await _0x1baf1d(),_0x438939=Date[_0x46edc3(0x1b3)]()-_0x4c662e;return this['success'](_0x2b2cfc,_0x46edc3(0x1bc)+_0x1a38c4,_0x438939),_0x51e193;}catch(_0x50b210){const _0xda9ed8=Date[_0x46edc3(0x1b3)]()-_0x4c662e;this[_0x46edc3(0x1a3)](_0x2b2cfc,_0x46edc3(0x1bf)+_0x1a38c4,{'error':_0x50b210 instanceof Error?_0x50b210[_0x46edc3(0x1a6)]:String(_0x50b210),'duration':_0xda9ed8});throw _0x50b210;}}['readLogs'](){const _0x2b5d07=a367_0x875111;try{if(!a367_0x1674aa['existsSync'](this[_0x2b5d07(0x1a2)]))return[];const _0x24a44e=a367_0x1674aa[_0x2b5d07(0x1a0)](this[_0x2b5d07(0x1a2)],'utf8');return _0x24a44e[_0x2b5d07(0x1b7)]('\x0a')[_0x2b5d07(0x1c5)](_0x2f340b=>_0x2f340b[_0x2b5d07(0x1bb)]())['map'](_0x4c0f1a=>JSON[_0x2b5d07(0x1a8)](_0x4c0f1a));}catch(_0x221487){return console[_0x2b5d07(0x1bd)](_0x2b5d07(0x1ad),_0x221487),[];}}['clearLogs'](){const _0x50c3c8=a367_0x875111;try{a367_0x1674aa['existsSync'](this['logFilePath'])&&a367_0x1674aa[_0x50c3c8(0x1b6)](this[_0x50c3c8(0x1a2)],'','utf8');}catch(_0x3e689a){console[_0x50c3c8(0x1bd)](_0x50c3c8(0x19d),_0x3e689a);}}['getWinstonInstance'](){const _0x655d7=a367_0x875111;return this[_0x655d7(0x1a9)];}}function a367_0x469c(){const _0x144bfe=['winstonLogger','createLogger','details','1426595vYbDZf','Failed\x20to\x20read\x20logs:','errors','addColors','level','printf','duration','now','1922564ZkEZlR','2957823hqFIjN','writeFileSync','split','Starting:\x20','758274oSHAQI','transports','trim','Completed:\x20','warn','rawCommand','Failed:\x20','format','combine','mkdirSync','1416UrDcEf','setLogPath','filter','56409SXWJBM','success','existsSync','40453cuncAA','initWinstonLogger','info','stringify','toISOString','unknown','yellow','currentRawCommand','command','red','Failed\x20to\x20clear\x20logs:','7810848XWbrja','blue','readFileSync','green','logFilePath','error','logTask','164ffkLog','message','join','parse'];a367_0x469c=function(){return _0x144bfe;};return a367_0x469c();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a368_0x4646(){const _0x38c6ab=['10ARgdbm','object','1724688pQmRKi','26UUugit','12UeTrKC','105MdItVf','48752VGUAEV','79677WzIIVB','92356XuxFba','89880rKPqpI','175rslOhl','validation','2007599WfiEYC','33KvWogh','1103gQuBvL'];a368_0x4646=function(){return _0x38c6ab;};return a368_0x4646();}(function(_0x2c9150,_0x95d492){const _0x4320dd=a368_0x2607,_0x3fefb3=_0x2c9150();while(!![]){try{const _0x54a75f=parseInt(_0x4320dd(0x1ba))/0x1*(parseInt(_0x4320dd(0x1be))/0x2)+parseInt(_0x4320dd(0x1b9))/0x3*(-parseInt(_0x4320dd(0x1b4))/0x4)+-parseInt(_0x4320dd(0x1b1))/0x5*(-parseInt(_0x4320dd(0x1b5))/0x6)+-parseInt(_0x4320dd(0x1b6))/0x7*(-parseInt(_0x4320dd(0x1b2))/0x8)+-parseInt(_0x4320dd(0x1bd))/0x9+parseInt(_0x4320dd(0x1bb))/0xa*(parseInt(_0x4320dd(0x1b8))/0xb)+-parseInt(_0x4320dd(0x1bf))/0xc*(-parseInt(_0x4320dd(0x1b3))/0xd);if(_0x54a75f===_0x95d492)break;else _0x3fefb3['push'](_0x3fefb3['shift']());}catch(_0x484359){_0x3fefb3['push'](_0x3fefb3['shift']());}}}(a368_0x4646,0x36c28));function a368_0x2607(_0x34545a,_0x71c9ee){_0x34545a=_0x34545a-0x1b1;const _0x46463a=a368_0x4646();let _0x260721=_0x46463a[_0x34545a];return _0x260721;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x556029){const _0x54f71b=a368_0x2607;if(!_0x556029)return undefined;let _0x48e0bc;try{_0x48e0bc=JSON['parse'](_0x556029);}catch{throw CliErrors[_0x54f71b(0x1b7)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x556029);}if(!_0x48e0bc||typeof _0x48e0bc!==_0x54f71b(0x1bc)||Array['isArray'](_0x48e0bc))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x48e0bc;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a369_0x4e0d30=a369_0x3dc2;(function(_0x339047,_0x3b901e){const _0x2900fe=a369_0x3dc2,_0x431b1b=_0x339047();while(!![]){try{const _0x595b1c=parseInt(_0x2900fe(0x194))/0x1+parseInt(_0x2900fe(0x196))/0x2*(-parseInt(_0x2900fe(0x1a1))/0x3)+-parseInt(_0x2900fe(0x19f))/0x4*(-parseInt(_0x2900fe(0x198))/0x5)+parseInt(_0x2900fe(0x193))/0x6*(parseInt(_0x2900fe(0x19c))/0x7)+-parseInt(_0x2900fe(0x195))/0x8+parseInt(_0x2900fe(0x19b))/0x9*(-parseInt(_0x2900fe(0x199))/0xa)+parseInt(_0x2900fe(0x1a0))/0xb*(-parseInt(_0x2900fe(0x19d))/0xc);if(_0x595b1c===_0x3b901e)break;else _0x431b1b['push'](_0x431b1b['shift']());}catch(_0x5e6eb6){_0x431b1b['push'](_0x431b1b['shift']());}}}(a369_0x477a,0x56586));function a369_0x3dc2(_0x5c2aba,_0x51267e){_0x5c2aba=_0x5c2aba-0x193;const _0x477a00=a369_0x477a();let _0x3dc21c=_0x477a00[_0x5c2aba];return _0x3dc21c;}export const isWindows=process[a369_0x4e0d30(0x19a)]===a369_0x4e0d30(0x197);export function resolveNpmBin(_0x2e0495){const _0x336dce=a369_0x4e0d30;return isWindows?_0x2e0495+_0x336dce(0x19e):_0x2e0495;}function a369_0x477a(){const _0x587b11=['70IdiBSO','3976404kuZqwN','.cmd','20xoBarr','11OBLpbk','1469451OPUAgR','294342vuTCfh','661922yixmFD','971136mSTcer','2pnLoAa','win32','490020VNDbET','577110GOBzVh','platform','54RSHzjA'];a369_0x477a=function(){return _0x587b11;};return a369_0x477a();}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x2a2a0c){return new Promise(_0x3c9718=>setTimeout(_0x3c9718,_0x2a2a0c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a371_0x1e6789=a371_0x1c68;(function(_0x24890e,_0x4e5f46){const _0xbb24a6=a371_0x1c68,_0x2954ee=_0x24890e();while(!![]){try{const _0x346fcd=parseInt(_0xbb24a6(0xbf))/0x1+parseInt(_0xbb24a6(0xdb))/0x2+parseInt(_0xbb24a6(0xa3))/0x3+parseInt(_0xbb24a6(0xc0))/0x4+-parseInt(_0xbb24a6(0xa0))/0x5+-parseInt(_0xbb24a6(0xcc))/0x6*(-parseInt(_0xbb24a6(0xa2))/0x7)+parseInt(_0xbb24a6(0xa4))/0x8*(-parseInt(_0xbb24a6(0x9f))/0x9);if(_0x346fcd===_0x4e5f46)break;else _0x2954ee['push'](_0x2954ee['shift']());}catch(_0x3db4b1){_0x2954ee['push'](_0x2954ee['shift']());}}}(a371_0x1fab,0x55474));import a371_0x2c1676 from'node:fs';import a371_0x350e4a from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a371_0x1fab(){const _0x5a5119=['error','getSeconds','getHours','getDate','.tsx','processTemplate','357380oZpSjg','.scss','api','datasetCode','.jsx','writeFile','formatLocalTimestamp','charAt','slice','name','15399bvNitD','1864910UMobCE','info','2328459XPzSGq','1650762CyAWIk','4328xQpwCV','processFile','.css','endsWith','readFile','map','toDisplayTitle','message','.md','.tpl','utf8','pad','split','Template\x20content\x20replacement\x20completed','datasetCode:\x20\x22','.json','pop','toComponentName','copyFile','name:\x20\x22','toUpperCase','isDirectory','default','join','now','getMinutes','extname','49998hAdSsA','2145416LEtzLz','\x0a\x20\x20\x20\x20{\x20','padStart','tableName:\x20\x22','sdk-config','alias','promises','template','processDirectory','replace','isFile','includes','6IYgqUl','YourModel','LOVRABET','toLowerCase','replaceContent','mkdir','.js','success','Starting\x20template\x20content\x20replacement'];a371_0x1fab=function(){return _0x5a5119;};return a371_0x1fab();}const CLI_VERSION=getCliVersion();function a371_0x1c68(_0x4957ec,_0x329470){_0x4957ec=_0x4957ec-0x9d;const _0x1fabb3=a371_0x1fab();let _0x1c6809=_0x1fabb3[_0x4957ec];return _0x1c6809;}export class TemplateReplacer{static['pad'](_0x4c9e0f){const _0x461968=a371_0x1c68;return String(_0x4c9e0f)[_0x461968(0xc2)](0x2,'0');}static[a371_0x1e6789(0xe1)](_0x4e1dba){const _0x56808d=a371_0x1e6789,_0x29e680=_0x4e1dba['getFullYear'](),_0x5d335f=this[_0x56808d(0xaf)](_0x4e1dba['getMonth']()+0x1),_0x5530a5=this['pad'](_0x4e1dba[_0x56808d(0xd8)]()),_0x42f582=this[_0x56808d(0xaf)](_0x4e1dba[_0x56808d(0xd7)]()),_0x5bb16b=this[_0x56808d(0xaf)](_0x4e1dba[_0x56808d(0xbd)]()),_0x438676=this[_0x56808d(0xaf)](_0x4e1dba[_0x56808d(0xd6)]());return{'createdAt':_0x29e680+'-'+_0x5d335f+'-'+_0x5530a5+'\x20'+_0x42f582+':'+_0x5bb16b+':'+_0x438676,'createdDate':_0x29e680+'-'+_0x5d335f+'-'+_0x5530a5,'createdTime':_0x42f582+':'+_0x5bb16b+':'+_0x438676};}static[a371_0x1e6789(0xb5)](_0x454969){const _0x2f36c2=a371_0x1e6789,_0x3569db=_0x454969[_0x2f36c2(0xb0)]('/')[_0x2f36c2(0xb4)]()||_0x454969;return _0x3569db[_0x2f36c2(0xb0)]('-')[_0x2f36c2(0xa9)](_0x4e4151=>_0x4e4151[_0x2f36c2(0xe2)](0x0)['toUpperCase']()+_0x4e4151[_0x2f36c2(0x9d)](0x1)[_0x2f36c2(0xcf)]())[_0x2f36c2(0xbb)]('');}static[a371_0x1e6789(0xaa)](_0x415405){const _0x11260a=a371_0x1e6789,_0x4d697d=_0x415405[_0x11260a(0xb0)]('/')['pop']()||_0x415405;return _0x4d697d['split']('-')[_0x11260a(0xa9)](_0x159309=>_0x159309[_0x11260a(0xe2)](0x0)[_0x11260a(0xb8)]()+_0x159309[_0x11260a(0x9d)](0x1)['toLowerCase']())[_0x11260a(0xbb)]('\x20');}static[a371_0x1e6789(0xd0)](_0x2a6334,_0x27024e,_0x5b144e){const _0x454980=a371_0x1e6789,_0x3e7eba=this[_0x454980(0xb5)](_0x27024e),_0x37b0c0=this[_0x454980(0xaa)](_0x27024e),{createdAt:_0x14fddb,createdDate:_0x4279a8,createdTime:_0x5d7f79}=this[_0x454980(0xe1)](new Date());let _0x1a5788=_0x2a6334['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x454980(0xc9)](/\{ComponentName\}/g,_0x3e7eba)[_0x454980(0xc9)](/\{DisplayTitle\}/g,_0x37b0c0)[_0x454980(0xc9)](/\{PageName\}/g,_0x27024e)['replace'](/\{TemplateName\}/g,_0x5b144e)['replace'](/\{CreatedAt\}/g,_0x14fddb)[_0x454980(0xc9)](/\{CreatedDate\}/g,_0x4279a8)[_0x454980(0xc9)](/\{CreatedTime\}/g,_0x5d7f79);return _0x1a5788;}static['replaceApiContent'](_0x29aeec,_0x4a5521,_0x20e7a3,_0x40242f,_0x509706,_0x5a9341,_0x4658e1,_0x382277,_0x265b76){const _0xab3a03=a371_0x1e6789,_0x538b0d=new Date(),_0x22ce85=_0x538b0d['toISOString'](),_0x2cfb7e=_0x20e7a3[_0xab3a03(0xa9)](_0x41fcfc=>{const _0x2f2395=_0xab3a03,_0x14eff1=[_0x2f2395(0xb2)+_0x41fcfc[_0x2f2395(0xde)]+'\x22',_0x2f2395(0xc3)+_0x41fcfc['tableName']+'\x22',_0x2f2395(0xb7)+_0x41fcfc[_0x2f2395(0x9e)]+'\x22'];return _0x41fcfc[_0x2f2395(0xc5)]&&_0x14eff1['push']('alias:\x20\x22'+_0x41fcfc[_0x2f2395(0xc5)]+'\x22'),_0x2f2395(0xc1)+_0x14eff1[_0x2f2395(0xbb)](',\x20')+'\x20},';})[_0xab3a03(0xbb)](''),_0xd2df91=_0x40242f||_0x20e7a3[0x0]?.[_0xab3a03(0xc5)]||_0xab3a03(0xcd);let _0x31bfff=_0x29aeec[_0xab3a03(0xc9)](/\{AppCode\}/g,_0x4a5521)[_0xab3a03(0xc9)](/\{ModelConfigs\}/g,_0x2cfb7e)[_0xab3a03(0xc9)](/\{ExampleModelName\}/g,_0xd2df91)[_0xab3a03(0xc9)](/\{ApiFileName\}/g,_0x509706||_0xab3a03(0xdd))[_0xab3a03(0xc9)](/\{ConfigName\}/g,_0x5a9341||_0xab3a03(0xba))['replace'](/\{ClientConfigParam\}/g,_0x4658e1||'')[_0xab3a03(0xc9)](/\{SdkConfigFileName\}/g,_0x265b76||_0xab3a03(0xc4))[_0xab3a03(0xc9)](/\{VarPrefix\}/g,_0x382277||_0xab3a03(0xce))['replace'](/\{CreatedAt\}/g,_0x22ce85);return _0x31bfff;}static async[a371_0x1e6789(0xda)](_0x9ef831,_0x571a58,_0x48423f,_0x496059,_0x5d6338=!![]){const _0xacee3c=a371_0x1e6789,_0x175dcf=Date[_0xacee3c(0xbc)]();try{_0x5d6338&&logger[_0xacee3c(0xa1)](_0xacee3c(0xc7),_0xacee3c(0xd4),{'templatePath':_0x9ef831,'targetPath':_0x571a58,'pageName':_0x48423f,'templateName':_0x496059});await a371_0x2c1676[_0xacee3c(0xc6)][_0xacee3c(0xd1)](_0x571a58,{'recursive':!![]}),await this[_0xacee3c(0xc8)](_0x9ef831,_0x571a58,_0x48423f,_0x496059);if(_0x5d6338){const _0x102124=Date[_0xacee3c(0xbc)]()-_0x175dcf;logger[_0xacee3c(0xd3)](_0xacee3c(0xc7),_0xacee3c(0xb1),_0x102124,{'pageName':_0x48423f,'templateName':_0x496059});}}catch(_0x2a4630){if(_0x5d6338){const _0x35e492=Date[_0xacee3c(0xbc)]()-_0x175dcf;logger[_0xacee3c(0xd5)](_0xacee3c(0xc7),'Template\x20content\x20replacement\x20failed',{'templatePath':_0x9ef831,'targetPath':_0x571a58,'pageName':_0x48423f,'templateName':_0x496059,'error':_0x2a4630 instanceof Error?_0x2a4630[_0xacee3c(0xab)]:String(_0x2a4630),'duration':_0x35e492});}throw _0x2a4630;}}static async[a371_0x1e6789(0xc8)](_0x2300fd,_0x5d009b,_0x2c48a4,_0x3d6773){const _0x4451fa=a371_0x1e6789,_0x543f79=await a371_0x2c1676[_0x4451fa(0xc6)]['readdir'](_0x2300fd,{'withFileTypes':!![]});for(const _0x13425e of _0x543f79){const _0x2e0fc1=a371_0x350e4a['join'](_0x2300fd,_0x13425e[_0x4451fa(0x9e)]);let _0x351a29=a371_0x350e4a[_0x4451fa(0xbb)](_0x5d009b,_0x13425e[_0x4451fa(0x9e)]);_0x13425e['name'][_0x4451fa(0xa7)](_0x4451fa(0xad))&&(_0x351a29=a371_0x350e4a[_0x4451fa(0xbb)](_0x5d009b,_0x13425e[_0x4451fa(0x9e)][_0x4451fa(0xc9)](/\.tpl$/,'')));if(_0x13425e[_0x4451fa(0xb9)]())await a371_0x2c1676[_0x4451fa(0xc6)][_0x4451fa(0xd1)](_0x351a29,{'recursive':!![]}),await this[_0x4451fa(0xc8)](_0x2e0fc1,_0x351a29,_0x2c48a4,_0x3d6773);else _0x13425e[_0x4451fa(0xca)]()&&await this['processFile'](_0x2e0fc1,_0x351a29,_0x2c48a4,_0x3d6773);}}static async[a371_0x1e6789(0xa5)](_0x50080f,_0x101cb4,_0x3dc89e,_0x431e9d){const _0x12e21c=a371_0x1e6789,_0xff4ab9=a371_0x350e4a[_0x12e21c(0xbe)](_0x50080f)[_0x12e21c(0xcf)]();_0x50080f[_0x12e21c(0xa7)](_0x12e21c(0xad))&&(_0x101cb4=_0x101cb4['replace'](/\.tpl$/,''));const _0x51c20a=[_0x12e21c(0xd9),'.ts',_0x12e21c(0xdf),_0x12e21c(0xd2),_0x12e21c(0xb3),_0x12e21c(0xac),_0x12e21c(0xa6),_0x12e21c(0xdc),'.tpl'];if(_0x51c20a[_0x12e21c(0xcb)](_0xff4ab9)||_0x50080f[_0x12e21c(0xa7)](_0x12e21c(0xad))){const _0x42ab97=await a371_0x2c1676['promises'][_0x12e21c(0xa8)](_0x50080f,'utf8'),_0x56e498=this[_0x12e21c(0xd0)](_0x42ab97,_0x3dc89e,_0x431e9d);await a371_0x2c1676['promises'][_0x12e21c(0xe0)](_0x101cb4,_0x56e498,_0x12e21c(0xae));}else await a371_0x2c1676[_0x12e21c(0xc6)][_0x12e21c(0xb6)](_0x50080f,_0x101cb4);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ccf58,_0x5a37d0){const _0x5c575d=a372_0x2dd8,_0x577cf6=_0x3ccf58();while(!![]){try{const _0x435970=parseInt(_0x5c575d(0x123))/0x1+parseInt(_0x5c575d(0x131))/0x2+parseInt(_0x5c575d(0x125))/0x3*(parseInt(_0x5c575d(0x129))/0x4)+parseInt(_0x5c575d(0x135))/0x5+parseInt(_0x5c575d(0x120))/0x6*(parseInt(_0x5c575d(0x126))/0x7)+-parseInt(_0x5c575d(0x122))/0x8+-parseInt(_0x5c575d(0x132))/0x9*(parseInt(_0x5c575d(0x133))/0xa);if(_0x435970===_0x5a37d0)break;else _0x577cf6['push'](_0x577cf6['shift']());}catch(_0x11e9d1){_0x577cf6['push'](_0x577cf6['shift']());}}}(a372_0x80d4,0x18ffa));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';function a372_0x80d4(){const _0x27f0de=['now','471915RsLvHe','stableVersion','object','210vxuOxr','gte','295264RjOBnJ','191631BpDLHJ','number','6cmEeDp','17906OlLVLH','checkedAt','utf8','19196GDdPNc','lastNotifiedAt','\x20available,\x20current\x20','yes','stringify','parse','valid','trim','79794nOBdet','9MzNXGi','2857370tqFlGc'];a372_0x80d4=function(){return _0x27f0de;};return a372_0x80d4();}import a372_0xd6bfa5 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a372_0x2dd8(_0x479d07,_0x540d6b){_0x479d07=_0x479d07-0x120;const _0x80d431=a372_0x80d4();let _0x2dd83f=_0x80d431[_0x479d07];return _0x2dd83f;}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 _0x4fed31=a372_0x2dd8,_0x2cda64=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x4fed31(0x130)]()['toLowerCase']();return _0x2cda64==='1'||_0x2cda64==='true'||_0x2cda64===_0x4fed31(0x12c);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){return join(cacheRoot(),'rabetbase-cli','update-check.json');}async function readUpdateNoticeCache(){const _0x5a11e0=a372_0x2dd8;try{const _0x5d5b7c=await readFile(getUpdateNoticeCachePath(),_0x5a11e0(0x128)),_0xd50dbc=JSON[_0x5a11e0(0x12e)](_0x5d5b7c);if(!_0xd50dbc||typeof _0xd50dbc!==_0x5a11e0(0x137))return{};return _0xd50dbc;}catch{return{};}}async function writeUpdateNoticeCache(_0x5662db){const _0x3e74f8=a372_0x2dd8;try{const _0x5ccbfb=getUpdateNoticeCachePath();await mkdir(dirname(_0x5ccbfb),{'recursive':!![]}),await writeFile(_0x5ccbfb,JSON[_0x3e74f8(0x12d)](_0x5662db,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x3cb37a,_0x2c4180){const _0x3ac3be=a372_0x2dd8;return typeof _0x3cb37a[_0x3ac3be(0x127)]===_0x3ac3be(0x124)&&_0x2c4180-_0x3cb37a[_0x3ac3be(0x127)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x2b318a,_0x58c41b,_0x4e4169){const _0x4441a8=a372_0x2dd8;return _0x2b318a['lastNotifiedVersion']===_0x58c41b&&typeof _0x2b318a[_0x4441a8(0x12a)]===_0x4441a8(0x124)&&_0x4e4169-_0x2b318a[_0x4441a8(0x12a)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x5684e8){return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+'/v/'+_0x5684e8;}export async function resolveLatestUpdateNotice(){const _0x3d5dcd=a372_0x2dd8;if(isUpdateNoticeDisabled())return null;try{const _0x3cf0c1=Date[_0x3d5dcd(0x134)](),_0x3171bb=getCliVersion(),_0x29e78c=await readUpdateNoticeCache();let _0xf8faba=isFreshCheck(_0x29e78c,_0x3cf0c1)?_0x29e78c['latest']?.[_0x3d5dcd(0x130)]():undefined;if(!_0xf8faba&&!isFreshCheck(_0x29e78c,_0x3cf0c1)){const _0xcfe027=await getCliVersionPolicy();_0xf8faba=_0xcfe027?.[_0x3d5dcd(0x136)]?.[_0x3d5dcd(0x130)]()||undefined,await writeUpdateNoticeCache({..._0x29e78c,'checkedAt':_0x3cf0c1,'latest':_0xf8faba,'failed':!_0xf8faba});}if(!_0xf8faba||!a372_0xd6bfa5[_0x3d5dcd(0x12f)](_0x3171bb)||!a372_0xd6bfa5['valid'](_0xf8faba))return null;if(a372_0xd6bfa5[_0x3d5dcd(0x121)](_0x3171bb,_0xf8faba))return null;if(isRecentlyNotified(_0x29e78c,_0xf8faba,_0x3cf0c1))return null;const _0x1e8e82=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x29e78c,'checkedAt':isFreshCheck(_0x29e78c,_0x3cf0c1)?_0x29e78c[_0x3d5dcd(0x127)]:_0x3cf0c1,'latest':_0xf8faba,'failed':![],'lastNotifiedVersion':_0xf8faba,'lastNotifiedAt':_0x3cf0c1}),{'command':_0x1e8e82,'current':_0x3171bb,'latest':_0xf8faba,'url':buildNpmVersionUrl(_0xf8faba),'message':CLI_BIN_NAME+'\x20'+_0xf8faba+_0x3d5dcd(0x12b)+_0x3171bb+',\x20run:\x20'+_0x1e8e82};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a373_0x41f5(_0x48098d,_0x44cc1b){_0x48098d=_0x48098d-0x1b9;var _0x22cde1=a373_0x22cd();var _0x41f5c0=_0x22cde1[_0x48098d];return _0x41f5c0;}(function(_0x578d9d,_0x1c94ab){var _0x2a424c=a373_0x41f5,_0x5ef8c1=_0x578d9d();while(!![]){try{var _0x15f330=parseInt(_0x2a424c(0x1c1))/0x1*(-parseInt(_0x2a424c(0x1c2))/0x2)+-parseInt(_0x2a424c(0x1bb))/0x3*(-parseInt(_0x2a424c(0x1c4))/0x4)+parseInt(_0x2a424c(0x1ba))/0x5*(-parseInt(_0x2a424c(0x1bc))/0x6)+-parseInt(_0x2a424c(0x1bd))/0x7*(-parseInt(_0x2a424c(0x1b9))/0x8)+-parseInt(_0x2a424c(0x1c0))/0x9+-parseInt(_0x2a424c(0x1c3))/0xa*(parseInt(_0x2a424c(0x1bf))/0xb)+parseInt(_0x2a424c(0x1be))/0xc;if(_0x15f330===_0x1c94ab)break;else _0x5ef8c1['push'](_0x5ef8c1['shift']());}catch(_0x349d48){_0x5ef8c1['push'](_0x5ef8c1['shift']());}}}(a373_0x22cd,0xde189));function a373_0x22cd(){var _0x45ebc1=['209cASjwv','4495950bRLtbe','5362MiDwbR','362mYUJIR','658780NGkAMU','240952udRztb','8BYtLaM','703705QdMyQK','87MkmkJA','66VdoePR','7827029zIXeIG','27774732HoGwmn'];a373_0x22cd=function(){return _0x45ebc1;};return a373_0x22cd();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x438735,_0x6ebd25){var _0x4eda88=a374_0x4f08,_0x2140b7=_0x438735();while(!![]){try{var _0x443ebe=parseInt(_0x4eda88(0xb4))/0x1+parseInt(_0x4eda88(0xbc))/0x2*(-parseInt(_0x4eda88(0xb8))/0x3)+-parseInt(_0x4eda88(0xb9))/0x4*(parseInt(_0x4eda88(0xb5))/0x5)+parseInt(_0x4eda88(0xb6))/0x6+-parseInt(_0x4eda88(0xb7))/0x7+-parseInt(_0x4eda88(0xbb))/0x8+parseInt(_0x4eda88(0xba))/0x9;if(_0x443ebe===_0x6ebd25)break;else _0x2140b7['push'](_0x2140b7['shift']());}catch(_0x5c2b86){_0x2140b7['push'](_0x2140b7['shift']());}}}(a374_0x1254,0x91fd4));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x54d8fa,_0xd258c6){setActiveCookie(_0x54d8fa);try{return await _0xd258c6();}finally{clearActiveCookie();}}function a374_0x4f08(_0xce3f5d,_0x4e613a){_0xce3f5d=_0xce3f5d-0xb4;var _0x1254fb=a374_0x1254();var _0x4f0898=_0x1254fb[_0xce3f5d];return _0x4f0898;}function a374_0x1254(){var _0x357dfd=['154188KQOwZB','316JAvvII','23117490WKfplL','9245896OKmqdW','12UdwDOO','202457IkchLb','36930hbhOki','3460848QYnCtz','4916072tVpxxw'];a374_0x1254=function(){return _0x357dfd;};return a374_0x1254();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a375_0x5644(){var _0x21edcb=['5712392ATPgwx','60jOQTtJ','1728028qmKmjy','1899784GDQpSW','stderr','write','6OaxuEP','814438jEHozR','293064sspHZT','32758649kHoOZw','2JBwfFR','10pIHSAc','5560587VNMLtr'];a375_0x5644=function(){return _0x21edcb;};return a375_0x5644();}function a375_0x142e(_0x1a8411,_0x5bfb34){_0x1a8411=_0x1a8411-0xe2;var _0x564472=a375_0x5644();var _0x142e05=_0x564472[_0x1a8411];return _0x142e05;}(function(_0x17cb7f,_0x31c25e){var _0x295980=a375_0x142e,_0x412de3=_0x17cb7f();while(!![]){try{var _0x437b9c=-parseInt(_0x295980(0xe7))/0x1*(parseInt(_0x295980(0xea))/0x2)+-parseInt(_0x295980(0xe6))/0x3*(parseInt(_0x295980(0xe2))/0x4)+parseInt(_0x295980(0xee))/0x5*(-parseInt(_0x295980(0xe8))/0x6)+parseInt(_0x295980(0xed))/0x7+-parseInt(_0x295980(0xe3))/0x8+-parseInt(_0x295980(0xec))/0x9*(parseInt(_0x295980(0xeb))/0xa)+parseInt(_0x295980(0xe9))/0xb;if(_0x437b9c===_0x31c25e)break;else _0x412de3['push'](_0x412de3['shift']());}catch(_0x4447a7){_0x412de3['push'](_0x412de3['shift']());}}}(a375_0x5644,0xa49ab));export function writeCliSideChannelLine(_0x546c23){var _0x168d2e=a375_0x142e;process[_0x168d2e(0xe4)][_0x168d2e(0xe5)](_0x546c23+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.10-beta.1",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=24.0.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"prebuild": "node scripts/generate-build-info.js && node scripts/generate-builtin-skill-manifest.mjs --check",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.
|
|
3
|
+
version: 2.5.10-beta.1
|
|
4
4
|
description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, Instant API access policies, database connections, pages, host frontend integration, frontend subapp resources, SQL, Backend Functions, approval flows and workflows, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, Instant API allow/deny/route policy, project creation, api pull/codegen, dblink, page, host frontend integration, subapp resource versions, SQL, BFF, creating or designing an approval flow, workflow, business process, or multi-step approval, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["rabetbase"]
|
|
8
|
-
node: ">=
|
|
8
|
+
node: ">=24.0.0"
|
|
9
9
|
cliHelp: "rabetbase --help"
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase-dataset-generation
|
|
3
|
-
version: 2.5.
|
|
3
|
+
version: 2.5.10-beta.1
|
|
4
4
|
description: "根据自然语言需求设计并创建 Lovrabet DOV2 METADATA 数据集、字段和 lookup 关系;由调用 rabetbase CLI 的 Agent 建模,支持单实体、多实体和已有数据集引用。"
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["rabetbase"]
|
|
8
|
-
node: ">=
|
|
8
|
+
node: ">=24.0.0"
|
|
9
9
|
cliHelp: "rabetbase dataset --help"
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase-page-generation
|
|
3
|
-
version: 2.5.
|
|
3
|
+
version: 2.5.10-beta.1
|
|
4
4
|
description: "根据用户需求,为已有 Dataset 选择、生成、串联、验证和发布 CustomJSX 页面;提供列表、详情、新增、更新基础模板,并支持裁剪或扩展页面。"
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["rabetbase"]
|
|
8
|
-
node: ">=
|
|
8
|
+
node: ">=24.0.0"
|
|
9
9
|
cliHelp: "rabetbase page --help"
|
|
10
10
|
---
|
|
11
11
|
|