@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-beta.3
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/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- 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/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.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- 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.d.ts +7 -0
- 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.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- 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.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- 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-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/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.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- 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/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/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.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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/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.d.ts +2 -0
- 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.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +176 -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.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- package/lib/core/instant-api-policy/config.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.d.ts +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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +0 -10
- 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/types/index.d.ts +11 -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.d.ts +12 -0
- 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 +4 -1
- package/skills/rabetbase/SKILL.md +31 -9
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -60
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +10 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a333_0x43db81=a333_0x300e;(function(_0x6e0c7b,_0x46c2b0){const _0x1d4eca=a333_0x300e,_0x59db18=_0x6e0c7b();while(!![]){try{const _0x6ba81=-parseInt(_0x1d4eca(0x1bd))/0x1+parseInt(_0x1d4eca(0x1ca))/0x2*(-parseInt(_0x1d4eca(0x1d0))/0x3)+parseInt(_0x1d4eca(0x1ce))/0x4+-parseInt(_0x1d4eca(0x1cb))/0x5*(-parseInt(_0x1d4eca(0x1df))/0x6)+-parseInt(_0x1d4eca(0x1d8))/0x7+-parseInt(_0x1d4eca(0x1e1))/0x8*(parseInt(_0x1d4eca(0x1cc))/0x9)+-parseInt(_0x1d4eca(0x1e4))/0xa*(parseInt(_0x1d4eca(0x1db))/0xb);if(_0x6ba81===_0x46c2b0)break;else _0x59db18['push'](_0x59db18['shift']());}catch(_0x95961d){_0x59db18['push'](_0x59db18['shift']());}}}(a333_0x5548,0x4d78f));export const CORE_IDE_CONFIGS={'cursor':{'name':a333_0x43db81(0x1dc),'description':a333_0x43db81(0x1d5),'folders':[a333_0x43db81(0x1be),'.cursor'],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1c4)}]},'windsurf':{'name':a333_0x43db81(0x1cf),'description':a333_0x43db81(0x1e3),'folders':[a333_0x43db81(0x1c7)],'files':[{'type':'file','path':a333_0x43db81(0x1c3)}]},'claude':{'name':a333_0x43db81(0x1c0),'description':'Claude\x20Code','folders':[a333_0x43db81(0x1b8)],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1b5)}]},'cline':{'name':a333_0x43db81(0x1bc),'description':a333_0x43db81(0x1d1),'folders':['.cline'],'files':[{'type':'file','path':a333_0x43db81(0x1b7)}]},'codex':{'name':a333_0x43db81(0x1d7),'description':a333_0x43db81(0x1d9),'folders':['.codex'],'files':[{'type':a333_0x43db81(0x1e2),'path':'.codex/skills/lovrabet/SKILL.md'}]},'opencode':{'name':a333_0x43db81(0x1c1),'description':'OpenCode\x20IDE','folders':['.opencode'],'files':[{'type':a333_0x43db81(0x1e2),'path':'.opencode/skills/lovrabet/SKILL.md'}]},'qoder':{'name':a333_0x43db81(0x1c6),'description':'Qoder\x20IDE','folders':['.qoder'],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1e0)},{'type':'file','path':a333_0x43db81(0x1c8)}]},'codebuddy':{'name':a333_0x43db81(0x1ba),'description':'CodeBuddy\x20IDE','folders':['.codebuddy'],'files':[{'type':'file','path':a333_0x43db81(0x1c5)}]},'trae':{'name':a333_0x43db81(0x1b9),'description':'Trae\x20IDE','folders':[a333_0x43db81(0x1c2)],'files':[{'type':'file','path':'.trae/skills/lovrabet/SKILL.md'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a333_0x43db81(0x1e5),'description':'Generic\x20template\x20fallback','folders':['.agent'],'files':[{'type':'file','path':a333_0x43db81(0x1bb)}]},'antigravity':{'name':a333_0x43db81(0x1b4),'description':a333_0x43db81(0x1c9),'folders':['.agent'],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1bb)}]}};function a333_0x300e(_0x41cf3d,_0x5084b7){_0x41cf3d=_0x41cf3d-0x1b4;const _0x55489a=a333_0x5548();let _0x300e25=_0x55489a[_0x41cf3d];return _0x300e25;}export const CORE_IDE_LIST=[a333_0x43db81(0x1dd),a333_0x43db81(0x1b6),a333_0x43db81(0x1da),'codex',a333_0x43db81(0x1d6),a333_0x43db81(0x1bf),a333_0x43db81(0x1d3),a333_0x43db81(0x1d2),a333_0x43db81(0x1d4)];export const IDE_LIST=['antigravity',a333_0x43db81(0x1dd),a333_0x43db81(0x1b6),a333_0x43db81(0x1da),a333_0x43db81(0x1cd),a333_0x43db81(0x1d6),a333_0x43db81(0x1bf),a333_0x43db81(0x1d3),a333_0x43db81(0x1d2),a333_0x43db81(0x1d4),a333_0x43db81(0x1de)];function a333_0x5548(){const _0x453010=['2248656tHiDCv','Windsurf','6249ccCLyx','Cline\x20IDE','trae','qoder','windsurf','Cursor\x20IDE','cursor','Codex','1659819TsBjGZ','Codex\x20IDE','codebuddy','568733lucMPS','Cursor','claude','agent','6XnKaLQ','.qoder/rules/rabetbase.md','296jNhmNZ','file','Windsurf\x20IDE','20ijSRBy','Other\x20(generic\x20template)','Antigravity','.claude/skills/lovrabet/SKILL.md','cline','.cline/skills/lovrabet/SKILL.md','.claude','Trae','CodeBuddy','.agent/skills/lovrabet/SKILL.md','Cline','123352tioArR','.cursorrules','opencode','Claude\x20Code','OpenCode','.trae','.windsurf/workflows/rabetbase.md','.cursor/skills/rabetbase.md','.codebuddy/skills/lovrabet/SKILL.md','Qoder','.windsurf','.qoder/skills/lovrabet/SKILL.md','Antigravity\x20IDE','382oGWqtP','3146245HgGyYs','3006tLoepO','codex'];a333_0x5548=function(){return _0x453010;};return a333_0x5548();}export const ALL_CORE_IDES=['cursor','windsurf',a333_0x43db81(0x1dd),a333_0x43db81(0x1b6),a333_0x43db81(0x1cd),'opencode',a333_0x43db81(0x1d3),a333_0x43db81(0x1da),a333_0x43db81(0x1d2)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35578f,_0x6786b0){const _0x36d147=a334_0x29c3,_0x1387b1=_0x35578f();while(!![]){try{const _0xd4f556=-parseInt(_0x36d147(0x84))/0x1+-parseInt(_0x36d147(0x7c))/0x2*(-parseInt(_0x36d147(0x82))/0x3)+-parseInt(_0x36d147(0x81))/0x4+parseInt(_0x36d147(0x80))/0x5+-parseInt(_0x36d147(0x7f))/0x6*(-parseInt(_0x36d147(0x83))/0x7)+-parseInt(_0x36d147(0x7d))/0x8+parseInt(_0x36d147(0x85))/0x9*(parseInt(_0x36d147(0x7e))/0xa);if(_0xd4f556===_0x6786b0)break;else _0x1387b1['push'](_0x1387b1['shift']());}catch(_0x2834e8){_0x1387b1['push'](_0x1387b1['shift']());}}}(a334_0x2ea4,0x863ce));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a334_0x2ea4(){const _0x1310b4=['2528808PlSxJq','6UGYueC','231mwvmUF','610220oCkyAv','27KmVhxm','655418VtiyUT','4760352lrbAKD','2552690KWBxyN','24QPPbuq','4829735grYbgz'];a334_0x2ea4=function(){return _0x1310b4;};return a334_0x2ea4();}import{CliErrors}from'../errors.js';function a334_0x29c3(_0x274b3c,_0x54a229){_0x274b3c=_0x274b3c-0x7c;const _0x2ea422=a334_0x2ea4();let _0x29c3e4=_0x2ea422[_0x274b3c];return _0x29c3e4;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a335_0x16bd(){const _0x275940=['30XSTSlh','942156sJiEQm','3081fUMQki','462538GndLYH','2410680WCYIFs','15817020wZVckR','node','10413896fKrHwE','stableVersion','sdk','3092KsHtwp','/config.json','application/json','18TTXEvd','/config/index.json','791203ObipTZ'];a335_0x16bd=function(){return _0x275940;};return a335_0x16bd();}(function(_0x217d15,_0x48d6a0){const _0x498c7f=a335_0x5cdf,_0x16bb9a=_0x217d15();while(!![]){try{const _0x15252c=-parseInt(_0x498c7f(0xe0))/0x1+-parseInt(_0x498c7f(0xde))/0x2+parseInt(_0x498c7f(0xdf))/0x3*(parseInt(_0x498c7f(0xd7))/0x4)+-parseInt(_0x498c7f(0xe1))/0x5+-parseInt(_0x498c7f(0xdd))/0x6*(parseInt(_0x498c7f(0xdc))/0x7)+-parseInt(_0x498c7f(0xd4))/0x8+-parseInt(_0x498c7f(0xda))/0x9*(-parseInt(_0x498c7f(0xe2))/0xa);if(_0x15252c===_0x48d6a0)break;else _0x16bb9a['push'](_0x16bb9a['shift']());}catch(_0x4dbe61){_0x16bb9a['push'](_0x16bb9a['shift']());}}}(a335_0x16bd,0xa4b51));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x1be585=a335_0x5cdf,_0x28ff05=getTemplateBaseUrl(),_0x2eaa30=[_0x28ff05+_0x1be585(0xd8),_0x28ff05+_0x1be585(0xdb)];for(const _0x47d942 of _0x2eaa30){try{const _0x2aac63=await fetch(_0x47d942,{'headers':{'Accept':_0x1be585(0xd9)}});if(!_0x2aac63['ok'])continue;const _0x4c2f1e=await _0x2aac63['json']();if(!_0x4c2f1e['cli']?.[_0x1be585(0xd5)]||!_0x4c2f1e[_0x1be585(0xd6)]?.[_0x1be585(0xe3)]?.[_0x1be585(0xd5)])continue;return _0x4c2f1e;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a335_0x5cdf(_0xf35c91,_0x45f217){_0xf35c91=_0xf35c91-0xd4;const _0x16bd1c=a335_0x16bd();let _0x5cdf34=_0x16bd1c[_0xf35c91];return _0x5cdf34;}let hasCachedConfig=![];export async function getCdnConfig(){const _0x5116e9=Date['now']();if(hasCachedConfig){const _0x55be41=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x5116e9-cacheTime<_0x55be41)return cachedConfig;}const _0x107d53=await fetchCdnConfig();return cachedConfig=_0x107d53,cacheTime=_0x5116e9,hasCachedConfig=!![],_0x107d53;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a336_0x152524=a336_0x145a;function a336_0x145a(_0x28ca44,_0x1e81c1){_0x28ca44=_0x28ca44-0x146;const _0x4e7519=a336_0x4e75();let _0x145ac8=_0x4e7519[_0x28ca44];return _0x145ac8;}(function(_0x5aa900,_0xa72b57){const _0x57165d=a336_0x145a,_0x3ee8e5=_0x5aa900();while(!![]){try{const _0x9db78=-parseInt(_0x57165d(0x158))/0x1*(parseInt(_0x57165d(0x15e))/0x2)+-parseInt(_0x57165d(0x16a))/0x3*(-parseInt(_0x57165d(0x147))/0x4)+parseInt(_0x57165d(0x169))/0x5+-parseInt(_0x57165d(0x160))/0x6*(parseInt(_0x57165d(0x156))/0x7)+parseInt(_0x57165d(0x154))/0x8*(parseInt(_0x57165d(0x14e))/0x9)+parseInt(_0x57165d(0x15b))/0xa+parseInt(_0x57165d(0x14c))/0xb;if(_0x9db78===_0xa72b57)break;else _0x3ee8e5['push'](_0x3ee8e5['shift']());}catch(_0x110a97){_0x3ee8e5['push'](_0x3ee8e5['shift']());}}}(a336_0x4e75,0xc2fa5));import a336_0x720b8c from'node:fs';import a336_0x2cfac9 from'node:path';import a336_0x453d42 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a336_0x152524(0x15a);function a336_0x4e75(){const _0x132446=['\x1b[0m','devDependencies','package.json','\x20\x20\x20Stable\x20version:\x20','node_modules','208xjGMQt','↪\x20SDK\x20update\x20available','691159XaVyhi','minVersion','2167GnznFn','utf-8','1.2.0','2567970SGGXAu','log','sdk','668EhQydi','stableVersion','96smdyma','readFileSync','needsUpgrade','dependencies','npm\x20install\x20','packageName','\x1b[33m','latest','existsSync','6866875TMmJHd','3LuCnKI','coerce','\x20\x20\x20Current\x20version:\x20','@lovrabet/sdk','2971564WgOLGQ','version','join','utf8','parse','3551174aNwsFs','node','140643zExqQs'];a336_0x4e75=function(){return _0x132446;};return a336_0x4e75();}function isNonNumericVersion(_0x1f58ac){const _0x31fd5d=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x31fd5d['some'](_0x19148f=>_0x19148f['test'](_0x1f58ac));}function getInstalledVersion(_0x185c5a,_0xa68644){const _0x4b907d=a336_0x152524;try{const _0x558184=a336_0x2cfac9[_0x4b907d(0x149)](_0x185c5a,_0x4b907d(0x153),_0xa68644,_0x4b907d(0x151));if(a336_0x720b8c[_0x4b907d(0x168)](_0x558184)){const _0x34684d=JSON[_0x4b907d(0x14b)](a336_0x720b8c[_0x4b907d(0x161)](_0x558184,_0x4b907d(0x159)));return _0x34684d[_0x4b907d(0x148)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x442cc9=a336_0x152524;try{const _0x3e15c2=await getCdnConfig();return _0x3e15c2?.[_0x442cc9(0x15d)]?.[_0x442cc9(0x14d)]?.[_0x442cc9(0x15f)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x427a18=a336_0x152524;try{const _0x3e8861=await getCdnConfig();return _0x3e8861?.[_0x427a18(0x15d)]?.[_0x427a18(0x14d)]?.[_0x427a18(0x165)]||_0x427a18(0x146);}catch{return _0x427a18(0x146);}}export async function checkSdkVersion(_0x28936e){const _0x57e291=a336_0x152524,_0x447fa6=a336_0x2cfac9[_0x57e291(0x149)](_0x28936e,_0x57e291(0x151)),[_0x4e2626,_0x4a68b3]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x3f2335=_0x4e2626||FALLBACK_MIN_SDK_VERSION;if(!a336_0x720b8c['existsSync'](_0x447fa6))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};try{const _0x38973d=JSON[_0x57e291(0x14b)](a336_0x720b8c[_0x57e291(0x161)](_0x447fa6,'utf8')),_0x2c1d00=_0x38973d[_0x57e291(0x163)]||{},_0x2f75a8=_0x38973d[_0x57e291(0x150)]||{},_0x20ba97=_0x2c1d00[_0x4a68b3]||_0x2f75a8[_0x4a68b3];if(!_0x20ba97)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};let _0x8ce546=getInstalledVersion(_0x28936e,_0x4a68b3);!_0x8ce546&&(_0x8ce546=_0x20ba97);if(isNonNumericVersion(_0x20ba97))return{'installed':!![],'version':_0x8ce546,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};const _0x2d1dcc=a336_0x453d42[_0x57e291(0x16b)](_0x8ce546),_0xb8f8a2=a336_0x453d42[_0x57e291(0x16b)](_0x3f2335),_0x5bbeae=_0x2d1dcc&&_0xb8f8a2?a336_0x453d42['lt'](_0x2d1dcc,_0xb8f8a2):![];return{'installed':!![],'version':_0x8ce546,'needsUpgrade':_0x5bbeae,'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};}}export function checkSdkVersionSync(_0x2c239f){const _0x35a3f6=a336_0x152524,_0xda1264=a336_0x2cfac9[_0x35a3f6(0x149)](_0x2c239f,'package.json'),_0x2f32e1='@lovrabet/sdk';if(!a336_0x720b8c['existsSync'](_0xda1264))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};try{const _0x4997e2=JSON[_0x35a3f6(0x14b)](a336_0x720b8c[_0x35a3f6(0x161)](_0xda1264,_0x35a3f6(0x14a))),_0x2aa63=_0x4997e2[_0x35a3f6(0x163)]||{},_0x467fdf=_0x4997e2[_0x35a3f6(0x150)]||{},_0x2fdad9=_0x2aa63[_0x2f32e1]||_0x467fdf[_0x2f32e1];if(!_0x2fdad9)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};let _0x2c6e2b=getInstalledVersion(_0x2c239f,_0x2f32e1);!_0x2c6e2b&&(_0x2c6e2b=_0x2fdad9);if(isNonNumericVersion(_0x2fdad9))return{'installed':!![],'version':_0x2c6e2b,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};const _0x10d946=a336_0x453d42[_0x35a3f6(0x16b)](_0x2c6e2b),_0x2d44cb=_0x10d946?a336_0x453d42['lt'](_0x10d946,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x2c6e2b,'needsUpgrade':_0x2d44cb,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x5e42c3){const _0x577773=a336_0x152524;if(!_0x5e42c3[_0x577773(0x162)])return;const _0x190901=_0x577773(0x166),_0xec53e0=_0x577773(0x14f),_0x4e1642='\x1b[1m',_0x346436=_0x5e42c3[_0x577773(0x165)]||'@lovrabet/sdk',_0x5a7efd=_0x5e42c3[_0x577773(0x15f)]||_0x5e42c3[_0x577773(0x157)],_0x48d249=_0x577773(0x164)+_0x346436+'@'+(_0x5a7efd||_0x577773(0x167));console['log'](),console[_0x577773(0x15c)](''+_0x190901+_0x4e1642+_0x577773(0x155)+_0xec53e0),console['log'](_0x190901+_0x577773(0x16c)+_0x346436+'@'+_0x5e42c3['version']+_0xec53e0),console[_0x577773(0x15c)](_0x190901+_0x577773(0x152)+_0x5a7efd+_0xec53e0),console[_0x577773(0x15c)](_0x190901+'\x20\x20\x20Upgrade\x20command:\x20'+_0x48d249+_0xec53e0),console[_0x577773(0x15c)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb3df4b,_0x4403f2){const _0x33499c=a337_0x2cc7,_0x4920c3=_0xb3df4b();while(!![]){try{const _0x3cb617=parseInt(_0x33499c(0x94))/0x1+parseInt(_0x33499c(0xa3))/0x2*(-parseInt(_0x33499c(0xa8))/0x3)+-parseInt(_0x33499c(0x96))/0x4*(-parseInt(_0x33499c(0x8f))/0x5)+-parseInt(_0x33499c(0x9b))/0x6*(-parseInt(_0x33499c(0x97))/0x7)+parseInt(_0x33499c(0x8b))/0x8+parseInt(_0x33499c(0x91))/0x9+parseInt(_0x33499c(0x93))/0xa*(-parseInt(_0x33499c(0x95))/0xb);if(_0x3cb617===_0x4403f2)break;else _0x4920c3['push'](_0x4920c3['shift']());}catch(_0x1ff458){_0x4920c3['push'](_0x4920c3['shift']());}}}(a337_0x494b,0x98a70));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a337_0x1d6470 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(_0x584cf2){const _0xc6a021=a337_0x2cc7,_0x3a6394=_0x584cf2['stableVersion']||_0xc6a021(0x8c);return _0xc6a021(0x9c)+NPM_PACKAGE_NAME+'@'+_0x3a6394;}function a337_0x2cc7(_0x1dd184,_0x3488b2){_0x1dd184=_0x1dd184-0x86;const _0x494b25=a337_0x494b();let _0x2cc717=_0x494b25[_0x1dd184];return _0x2cc717;}function getCurrentCliVersion(){const _0x4d4d74=a337_0x2cc7;try{const _0x33ece8=fileURLToPath(import.meta.url),_0x22d78c=resolve(dirname(_0x33ece8),_0x4d4d74(0xa6)),_0x62fe9b=resolve(_0x22d78c,_0x4d4d74(0x98)),_0x1e4bea=JSON['parse'](readFileSync(_0x62fe9b,'utf-8'));return _0x1e4bea[_0x4d4d74(0x8d)]||'1.0.0';}catch{return _0x4d4d74(0x89);}}export async function checkCliVersion(){const _0x1e39f5=a337_0x2cc7,_0x4cd31e=getCurrentCliVersion(),_0x4d8562=await getCliVersionPolicy(),_0x20f7a9=_0x4d8562?.['stableVersion']||null,_0x129025=_0x4d8562?.[_0x1e39f5(0x87)]||null;let _0x31cb83=![],_0x494810=![];const _0x11a8e1=a337_0x1d6470[_0x1e39f5(0x8e)](_0x4cd31e);if(_0x11a8e1&&_0x20f7a9)try{const _0x3d733d=a337_0x1d6470[_0x1e39f5(0x8e)](_0x20f7a9);if(_0x3d733d)_0x31cb83=a337_0x1d6470['lt'](_0x11a8e1,_0x3d733d);}catch{}if(_0x11a8e1&&_0x129025)try{const _0x555ef4=a337_0x1d6470[_0x1e39f5(0x8e)](_0x129025);if(_0x555ef4)_0x494810=a337_0x1d6470['lt'](_0x11a8e1,_0x555ef4);}catch{}return _0x494810&&(_0x31cb83=!![]),{'currentVersion':_0x4cd31e,'stableVersion':_0x20f7a9,'minimumVersion':_0x129025,'needsUpgrade':_0x31cb83,'belowMinimum':_0x494810,'isPreRelease':![],'upgradeMessage':_0x4d8562?.['upgradeMessage'],'minimumVersionMessage':_0x4d8562?.[_0x1e39f5(0x8a)]};}export function printCliUpgradeWarning(_0x56624a){const _0x32adb6=a337_0x2cc7;if(!_0x56624a['needsUpgrade']&&!_0x56624a[_0x32adb6(0x86)])return;const _0x2b25b7='\x1b[31m',_0x238ed0=_0x32adb6(0xa2),_0x4cda9d=_0x32adb6(0xac),_0x59aa13='\x1b[1m',_0x4b6567=getCliUpgradeCommand(_0x56624a);console[_0x32adb6(0xa5)](),_0x56624a['belowMinimum']?(console[_0x32adb6(0xa5)](''+_0x2b25b7+_0x59aa13+_0x32adb6(0xa0)+_0x4cda9d),console[_0x32adb6(0xa5)](_0x2b25b7+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x56624a[_0x32adb6(0x9d)]+_0x4cda9d),_0x56624a[_0x32adb6(0x87)]&&console['log'](_0x2b25b7+'\x20\x20\x20Minimum\x20supported:\x20'+_0x56624a['minimumVersion']+_0x4cda9d),_0x56624a['stableVersion']&&_0x56624a['stableVersion']!==_0x56624a['minimumVersion']&&console[_0x32adb6(0xa5)](_0x2b25b7+_0x32adb6(0x88)+_0x56624a['stableVersion']+_0x4cda9d),_0x56624a[_0x32adb6(0x8a)]&&console[_0x32adb6(0xa5)](_0x2b25b7+_0x32adb6(0x99)+_0x56624a[_0x32adb6(0x8a)]+_0x4cda9d),console[_0x32adb6(0xa5)](_0x2b25b7+_0x32adb6(0x9a)+_0x4b6567+_0x4cda9d)):(console[_0x32adb6(0xa5)](''+_0x238ed0+_0x59aa13+_0x32adb6(0xa7)+_0x4cda9d),console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0xa4)+_0x56624a[_0x32adb6(0x9d)]+_0x4cda9d),console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0xab)+_0x56624a[_0x32adb6(0xa1)]+_0x4cda9d),_0x56624a[_0x32adb6(0x9f)]&&console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0x99)+_0x56624a[_0x32adb6(0x9f)]+_0x4cda9d),console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0x9a)+_0x4b6567+_0x4cda9d)),console[_0x32adb6(0xa5)]();}function a337_0x494b(){const _0x4f7220=['filter','Upgrade\x20command:\x20','\x20\x20\x20Stable\x20version:\x20','\x1b[0m','belowMinimum','minimumVersion','\x20\x20\x20Recommended\x20stable:\x20','1.0.0','minimumVersionMessage','8728752CHovtL','latest','version','coerce','35dXUAAi','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','9876465dqWHag','validation','610OsqKJq','959933rbgcou','622127CToOHw','435124rJqRbE','7ptunpO','package.json','\x20\x20\x20','\x20\x20\x20Upgrade\x20command:\x20','5589714YxzrVl','npm\x20install\x20-g\x20','currentVersion','join','upgradeMessage','↪\x20Critical\x20CLI\x20upgrade\x20required','stableVersion','\x1b[33m','6NdFYMo','\x20\x20\x20Current\x20CLI\x20version:\x20','log','../..','↪\x20New\x20version\x20available','766257XinHrJ'];a337_0x494b=function(){return _0x4f7220;};return a337_0x494b();}export function assertCliVersionSupported(_0x16440c){const _0x27bfd5=a337_0x2cc7;if(!_0x16440c['belowMinimum'])return;const _0x487c65=[_0x16440c['minimumVersionMessage'],'Current\x20version:\x20'+_0x16440c[_0x27bfd5(0x9d)],_0x16440c[_0x27bfd5(0x87)]?'Minimum\x20supported:\x20'+_0x16440c[_0x27bfd5(0x87)]:null,_0x27bfd5(0xaa)+getCliUpgradeCommand(_0x16440c)][_0x27bfd5(0xa9)](Boolean)[_0x27bfd5(0x9e)]('\x0a');throw CliErrors[_0x27bfd5(0x92)](_0x27bfd5(0x90),_0x487c65);}
|
|
@@ -11,10 +11,22 @@ export interface ProjectTemplateCdnDescriptor {
|
|
|
11
11
|
size: number;
|
|
12
12
|
}
|
|
13
13
|
export interface RabetbaseCdnConfig {
|
|
14
|
+
schemaVersion?: number;
|
|
14
15
|
cli?: Record<string, unknown>;
|
|
15
16
|
projectTemplate?: ProjectTemplateCdnDescriptor;
|
|
17
|
+
beta?: {
|
|
18
|
+
projectTemplate?: ProjectTemplateCdnDescriptor;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
16
21
|
[key: string]: unknown;
|
|
17
22
|
}
|
|
23
|
+
export declare function isBetaCliVersion(version: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the project template channel without changing the legacy contract:
|
|
26
|
+
* stable releases keep reading the top-level descriptor, while beta releases
|
|
27
|
+
* may override it under `beta.projectTemplate`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveProjectTemplateDescriptor(config: RabetbaseCdnConfig, cliVersion: string): ProjectTemplateCdnDescriptor | undefined;
|
|
18
30
|
export declare function fetchRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
|
|
19
31
|
export declare function fetchCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
20
32
|
export declare function getRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10f0cb,_0x41e307){const _0x7493f=a338_0x4e3e,_0x165fad=_0x10f0cb();while(!![]){try{const _0x562494=parseInt(_0x7493f(0x1a7))/0x1*(-parseInt(_0x7493f(0x1a9))/0x2)+parseInt(_0x7493f(0x1ae))/0x3+parseInt(_0x7493f(0x1b5))/0x4*(parseInt(_0x7493f(0x1a8))/0x5)+parseInt(_0x7493f(0x1b1))/0x6*(parseInt(_0x7493f(0x1bb))/0x7)+parseInt(_0x7493f(0x1bd))/0x8+-parseInt(_0x7493f(0x1b4))/0x9*(parseInt(_0x7493f(0x1b6))/0xa)+-parseInt(_0x7493f(0x1b3))/0xb;if(_0x562494===_0x41e307)break;else _0x165fad['push'](_0x165fad['shift']());}catch(_0x2626ae){_0x165fad['push'](_0x165fad['shift']());}}}(a338_0x2baa,0x32161));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';import a338_0x5027f6 from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x580689){const _0x40cfb9=a338_0x4e3e,_0x195495=a338_0x5027f6[_0x40cfb9(0x1bc)](_0x580689);return _0x195495?a338_0x5027f6[_0x40cfb9(0x1b8)](_0x195495)?.[0x0]==='beta':![];}export function resolveProjectTemplateDescriptor(_0x5f04f7,_0x221624){const _0x18e59a=a338_0x4e3e;if(isBetaCliVersion(_0x221624))return _0x5f04f7[_0x18e59a(0x1a6)]?.['projectTemplate']??_0x5f04f7[_0x18e59a(0x1a5)];return _0x5f04f7[_0x18e59a(0x1a5)];}function pickString(_0x305bc1){const _0x2c8d22=a338_0x4e3e;return typeof _0x305bc1===_0x2c8d22(0x1ad)&&_0x305bc1[_0x2c8d22(0x1b2)]()[_0x2c8d22(0x1a3)]>0x0?_0x305bc1[_0x2c8d22(0x1b2)]():null;}function normalizeCliVersionPolicy(_0x4d6d65){const _0x5ce57c=a338_0x4e3e;if(!_0x4d6d65||typeof _0x4d6d65!=='object')return null;const _0x90969b=_0x4d6d65,_0x30f729=_0x90969b['cli']&&typeof _0x90969b[_0x5ce57c(0x1b7)]===_0x5ce57c(0x1aa)?_0x90969b[_0x5ce57c(0x1b7)]:_0x90969b,_0x3f1680=pickString(_0x30f729['stableVersion'])||pickString(_0x30f729['latestVersion'])||pickString(_0x30f729['recommendedVersion']),_0x49eae2=pickString(_0x30f729[_0x5ce57c(0x1b0)])||pickString(_0x30f729[_0x5ce57c(0x1ac)]);if(!_0x3f1680&&!_0x49eae2)return null;return{'stableVersion':_0x3f1680,'minimumVersion':_0x49eae2,'upgradeMessage':pickString(_0x30f729[_0x5ce57c(0x1b9)])||undefined,'minimumVersionMessage':pickString(_0x30f729[_0x5ce57c(0x1af)])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x4d29a1=a338_0x4e3e,_0xcb6b86=new AbortController(),_0x48125a=setTimeout(()=>_0xcb6b86[_0x4d29a1(0x1ba)](),FETCH_TIMEOUT_MS);try{const _0x1d6d06=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4d29a1(0x1a2)},'signal':_0xcb6b86[_0x4d29a1(0x1a4)]});if(!_0x1d6d06['ok'])return null;const _0x2068d7=await _0x1d6d06[_0x4d29a1(0x1ab)]();return _0x2068d7&&typeof _0x2068d7===_0x4d29a1(0x1aa)?_0x2068d7:null;}catch{return null;}finally{clearTimeout(_0x48125a);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];function a338_0x4e3e(_0x469238,_0x56149a){_0x469238=_0x469238-0x1a2;const _0x2baaeb=a338_0x2baa();let _0x4e3e0b=_0x2baaeb[_0x469238];return _0x4e3e0b;}function a338_0x2baa(){const _0x5ab609=['3142840fDmXwp','cli','prerelease','upgradeMessage','abort','6076jBsLVA','valid','2213920jEpbKU','application/json','length','signal','projectTemplate','beta','14020ywAsld','76185OVGeLr','26rfLKAM','object','json','minVersion','string','839313pFOjGf','minimumVersionMessage','minimumVersion','2172VzSyYE','trim','5043863eyotJY','9IwRiIi','76ggSWNv'];a338_0x2baa=function(){return _0x5ab609;};return a338_0x2baa();}export async function getRabetbaseCdnConfig(){const _0x2ca347=Date['now']();if(hasCachedConfig){const _0x15c981=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2ca347-cacheTime<_0x15c981)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x2ca347,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 a339_0x1a332a=a339_0x286b;(function(_0x400efd,_0x3fcf5e){const _0x559d57=a339_0x286b,_0x5a6fde=_0x400efd();while(!![]){try{const _0x43e6c7=parseInt(_0x559d57(0x1d8))/0x1*(parseInt(_0x559d57(0x1d3))/0x2)+-parseInt(_0x559d57(0x1d7))/0x3*(-parseInt(_0x559d57(0x1ce))/0x4)+parseInt(_0x559d57(0x1d5))/0x5*(parseInt(_0x559d57(0x1d4))/0x6)+-parseInt(_0x559d57(0x1cd))/0x7+-parseInt(_0x559d57(0x1db))/0x8+parseInt(_0x559d57(0x1d0))/0x9*(-parseInt(_0x559d57(0x1d6))/0xa)+-parseInt(_0x559d57(0x1da))/0xb*(-parseInt(_0x559d57(0x1cf))/0xc);if(_0x43e6c7===_0x3fcf5e)break;else _0x5a6fde['push'](_0x5a6fde['shift']());}catch(_0xf358c5){_0x5a6fde['push'](_0x5a6fde['shift']());}}}(a339_0xb1b1,0xe5961));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a339_0x50c915,getMultiAppConfigs as a339_0x549cdb,getTemplateBaseUrl as a339_0xbb1234}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a339_0x286b(_0x7b0f8a,_0x31e260){_0x7b0f8a=_0x7b0f8a-0x1cd;const _0xb1b14a=a339_0xb1b1();let _0x286b68=_0xb1b14a[_0x7b0f8a];return _0x286b68;}export{isInProject}from'../context.js';export function readConfig(_0x44849b){const _0x491232=a339_0x286b,_0xb15184=readRawConfig(_0x44849b);return _0xb15184[_0x491232(0x1d1)]&&typeof _0xb15184[_0x491232(0x1d1)]===_0x491232(0x1d9)&&initEnv(_0xb15184[_0x491232(0x1d1)]),_0xb15184;}export function getConfigAppCode(){return a339_0x50c915();}export function getMultiAppConfigs(_0xe29288=a339_0x1a332a(0x1d2)){return a339_0x549cdb(_0xe29288);}function a339_0xb1b1(){const _0xdee32d=['440712AfpkUQ','8575317TuBZLM','env','project','2OdOuEM','24wFkrxT','1229270EHjgTG','10vyTslI','590931SIEoml','906553ksbInf','string','143eTtTMH','6032296Psqgqd','7693077puqhet','28DGToZW'];a339_0xb1b1=function(){return _0xdee32d;};return a339_0xb1b1();}export function getTemplateBaseUrl(){return a339_0xbb1234();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x308ea7,_0x188662){const _0x4c3716=a340_0x3872,_0x3bd3df=_0x308ea7();while(!![]){try{const _0x3613f1=-parseInt(_0x4c3716(0x128))/0x1+parseInt(_0x4c3716(0x12a))/0x2*(parseInt(_0x4c3716(0x131))/0x3)+-parseInt(_0x4c3716(0x134))/0x4+parseInt(_0x4c3716(0x130))/0x5+parseInt(_0x4c3716(0x133))/0x6*(-parseInt(_0x4c3716(0x12c))/0x7)+parseInt(_0x4c3716(0x12e))/0x8*(-parseInt(_0x4c3716(0x132))/0x9)+-parseInt(_0x4c3716(0x135))/0xa*(-parseInt(_0x4c3716(0x12f))/0xb);if(_0x3613f1===_0x188662)break;else _0x3bd3df['push'](_0x3bd3df['shift']());}catch(_0xba22e1){_0x3bd3df['push'](_0x3bd3df['shift']());}}}(a340_0x244c,0x68c00));function toFiniteNumber(_0x48565e){const _0x3303bb=a340_0x3872;if(typeof _0x48565e===_0x3303bb(0x12d)&&Number[_0x3303bb(0x129)](_0x48565e))return _0x48565e;if(typeof _0x48565e==='string'){const _0x72bfd4=_0x48565e[_0x3303bb(0x127)]();if(!_0x72bfd4)return undefined;const _0x1aa4cc=Number(_0x72bfd4);if(Number[_0x3303bb(0x129)](_0x1aa4cc))return _0x1aa4cc;}return undefined;}function a340_0x3872(_0x8fe285,_0x5a8800){_0x8fe285=_0x8fe285-0x127;const _0x244c9d=a340_0x244c();let _0x387219=_0x244c9d[_0x8fe285];return _0x387219;}function a340_0x244c(){const _0x551ef3=['33lHQljd','3782095DTkVde','6eETsdw','195309jxKEPw','252ncqSTO','813792BFUHdV','2091510MEEFHI','trim','94400XxxBwi','isFinite','320154XOoMIH','object','90517OxYUIy','number','160KvIPnM'];a340_0x244c=function(){return _0x551ef3;};return a340_0x244c();}export function normalizeEntityWithIdResponse(_0x30ae12){const _0x25031e=a340_0x3872,_0x4d2c69=toFiniteNumber(_0x30ae12);if(_0x4d2c69!==undefined)return{'id':_0x4d2c69,'entity':{'id':_0x4d2c69}};if(!_0x30ae12||typeof _0x30ae12!==_0x25031e(0x12b))return{'id':undefined,'entity':{}};const _0x53ddaa={..._0x30ae12},_0x51ed71=toFiniteNumber(_0x53ddaa['id']);return _0x51ed71!==undefined&&(_0x53ddaa['id']=_0x51ed71),{'id':_0x51ed71,'entity':_0x53ddaa};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e7721,_0x376f5c){const _0x564ac1=a341_0x5c35,_0x13f619=_0x3e7721();while(!![]){try{const _0x19ae26=-parseInt(_0x564ac1(0x86))/0x1*(parseInt(_0x564ac1(0x7e))/0x2)+parseInt(_0x564ac1(0x84))/0x3+parseInt(_0x564ac1(0x83))/0x4+parseInt(_0x564ac1(0x80))/0x5+parseInt(_0x564ac1(0x7f))/0x6*(-parseInt(_0x564ac1(0x82))/0x7)+parseInt(_0x564ac1(0x81))/0x8*(parseInt(_0x564ac1(0x7d))/0x9)+parseInt(_0x564ac1(0x7c))/0xa;if(_0x19ae26===_0x376f5c)break;else _0x13f619['push'](_0x13f619['shift']());}catch(_0x2a4a61){_0x13f619['push'](_0x13f619['shift']());}}}(a341_0x5e70,0x1f944));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x5c01d1,_0x4c60a2){const _0x5680f1=a341_0x5c35,_0x2a23d6=statSync(_0x5c01d1);if(_0x2a23d6[_0x5680f1(0x85)]()){!existsSync(_0x4c60a2)&&mkdirSync(_0x4c60a2,{'recursive':!![]});const _0x125666=readdirSync(_0x5c01d1);for(const _0x1db64f of _0x125666){await copyDir(join(_0x5c01d1,_0x1db64f),join(_0x4c60a2,_0x1db64f));}}else copyFileSync(_0x5c01d1,_0x4c60a2);}function a341_0x5c35(_0x3ae9c3,_0x1db546){_0x3ae9c3=_0x3ae9c3-0x7c;const _0x5e7036=a341_0x5e70();let _0x5c35be=_0x5e7036[_0x3ae9c3];return _0x5c35be;}export function ensureDir(_0x4520fb){!existsSync(_0x4520fb)&&mkdirSync(_0x4520fb,{'recursive':!![]});}function a341_0x5e70(){const _0x28df29=['21728geCGsS','452625ufhodk','isDirectory','105977PgRUQt','122510KHRiqV','9yipPGP','4vrisIm','47298LCNVyg','797870prahbO','1555832DqChfz','161FKllTF'];a341_0x5e70=function(){return _0x28df29;};return a341_0x5e70();}export function pathExists(_0x1e6f24){return existsSync(_0x1e6f24);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a342_0x58878f=a342_0x4563;(function(_0x405527,_0x2ca249){const _0x3239f3=a342_0x4563,_0x3113ee=_0x405527();while(!![]){try{const _0x47f89f=parseInt(_0x3239f3(0xa5))/0x1*(parseInt(_0x3239f3(0x97))/0x2)+-parseInt(_0x3239f3(0x9c))/0x3*(parseInt(_0x3239f3(0xa1))/0x4)+-parseInt(_0x3239f3(0x94))/0x5+-parseInt(_0x3239f3(0x93))/0x6*(-parseInt(_0x3239f3(0xaa))/0x7)+-parseInt(_0x3239f3(0x90))/0x8+parseInt(_0x3239f3(0x99))/0x9+-parseInt(_0x3239f3(0x95))/0xa*(-parseInt(_0x3239f3(0x8b))/0xb);if(_0x47f89f===_0x2ca249)break;else _0x3113ee['push'](_0x3113ee['shift']());}catch(_0x53f622){_0x3113ee['push'](_0x3113ee['shift']());}}}(a342_0x394f,0x9f826));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 _0x274753=a342_0x4563,_0x5cab9e=getTemplateBaseUrl();return _0x5cab9e+_0x274753(0x9f);}const CACHE_DIR=join(homedir(),a342_0x58878f(0x91),'cache');export async function fetchGuidesFromCDN(){const _0x526618=a342_0x58878f,_0x27f03f=getGuidesCdnUrl(),_0xc27b1a=await fetch(_0x27f03f,{'headers':{'Accept':'application/json'}});if(!_0xc27b1a['ok'])throw new Error(_0x526618(0x92)+_0xc27b1a[_0x526618(0xa9)]+'\x20'+_0xc27b1a[_0x526618(0x9e)]);const _0x4537b8=await _0xc27b1a[_0x526618(0xa6)]();if(!_0x4537b8[_0x526618(0x9d)]||typeof _0x4537b8[_0x526618(0x9d)]!=='object')throw new Error(_0x526618(0x9a));return _0x4537b8;}export function writeGuidesToProject(_0x3e4105,_0x278ef4,_0x12c83d=a342_0x58878f(0xa3),_0x273a33){const _0x389cd9=a342_0x58878f,_0x500a3c=join(_0x278ef4,_0x12c83d);mkdirSync(_0x500a3c,{'recursive':!![]});for(const [_0x25ef00,_0x1db369]of Object[_0x389cd9(0xa2)](_0x3e4105[_0x389cd9(0x9d)])){let _0x1a5207=_0x1db369[_0x389cd9(0x8d)];_0x1db369[_0x389cd9(0x98)]&&(_0x1a5207=appendUpdateTime(_0x1a5207,_0x1db369[_0x389cd9(0x98)])),writeFileSync(join(_0x500a3c,_0x25ef00+'.md'),_0x1a5207,_0x389cd9(0x8f));}}export function appendUpdateTime(_0x434508,_0x288346){const _0x5f3cb5=a342_0x58878f;return _0x434508=_0x434508[_0x5f3cb5(0xa7)](/\n*>更新时间:.*$/m,''),_0x434508[_0x5f3cb5(0x8c)]()+(_0x5f3cb5(0x9b)+_0x288346);}export function getSkillTemplate(_0x4e8336){const _0x4abe20=a342_0x58878f;return _0x4e8336[_0x4abe20(0xac)]?.[_0x4abe20(0x8d)]||'';}export function appendExtendContents(_0x485e93,_0xe3cb61,_0x131f54){const _0x7e4dcc=a342_0x58878f,_0x12e4f3=[];for(const [,_0x391063]of Object[_0x7e4dcc(0xa2)](_0xe3cb61[_0x7e4dcc(0x9d)])){_0x391063[_0x7e4dcc(0xa8)]&&_0x12e4f3[_0x7e4dcc(0xab)](_0x391063[_0x7e4dcc(0xa8)][_0x7e4dcc(0x8c)]());}if(_0x12e4f3[_0x7e4dcc(0x8e)]===0x0)return _0x485e93;return _0x485e93[_0x7e4dcc(0x8c)]()+'\x0a\x0a'+_0x12e4f3[_0x7e4dcc(0x96)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x5fa697,_0x3b8bd8,_0xf8eef7){const _0x44eef7=a342_0x58878f,_0x3d9fd8=getSkillTemplate(_0x5fa697);if(!_0x3d9fd8)throw new Error('CDN\x20data\x20is\x20missing\x20skillTemplate');const _0x37e6df=dirname(_0x3b8bd8);mkdirSync(_0x37e6df,{'recursive':!![]});let _0x593343=_0x3d9fd8[_0x44eef7(0xa7)](/\{\{IDE_NAME\}\}/g,_0xf8eef7);_0x593343=appendExtendContents(_0x593343,_0x5fa697),_0x5fa697[_0x44eef7(0xac)]['lastUpdated']&&(_0x593343=appendUpdateTime(_0x593343,_0x5fa697[_0x44eef7(0xac)][_0x44eef7(0x98)])),writeFileSync(_0x3b8bd8,_0x593343,_0x44eef7(0x8f));}function a342_0x394f(){const _0x2cb0c2=['extendContent','status','666323rsHhrD','push','skillTemplate','2683241muiZJF','trimEnd','content','length','utf-8','8545672AVMOBv','.lovrabet','CDN\x20request\x20failed:\x20','78OTMQYG','1631045AHZZHr','20MzVXHH','join','350418xWCxTf','lastUpdated','532107jmnxZO','CDN\x20returned\x20invalid\x20data','\x0a\x0a>更新时间:','3SZRiXi','guides','statusText','/skills/guides.json','map','2450876KqUCIf','entries','.lovrabet/skill/guides','title','5btiOyU','json','replace'];a342_0x394f=function(){return _0x2cb0c2;};return a342_0x394f();}function a342_0x4563(_0x4bb3a8,_0x17eba5){_0x4bb3a8=_0x4bb3a8-0x8b;const _0x394f89=a342_0x394f();let _0x456398=_0x394f89[_0x4bb3a8];return _0x456398;}export async function installGuides(_0x2c46d3){const _0x358be4=a342_0x58878f,_0x43eb1d=await fetchGuidesFromCDN();return writeGuidesToProject(_0x43eb1d,_0x2c46d3),Object['keys'](_0x43eb1d[_0x358be4(0x9d)])[_0x358be4(0x8e)];}export function getGuidesSummary(_0x556aa1){const _0x5e4a2e=a342_0x58878f;return Object[_0x5e4a2e(0xa2)](_0x556aa1['guides'])[_0x5e4a2e(0xa0)](([_0x1f4171,_0x2bff81])=>({'key':_0x1f4171,'title':_0x2bff81[_0x5e4a2e(0xa4)],'path':_0x2bff81['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a343_0xd8ee(_0x130b0d,_0x47d66d){_0x130b0d=_0x130b0d-0x6d;const _0x5eaf5d=a343_0x5eaf();let _0xd8eeb5=_0x5eaf5d[_0x130b0d];return _0xd8eeb5;}(function(_0x42922,_0xfd6786){const _0x393f63=a343_0xd8ee,_0x154d25=_0x42922();while(!![]){try{const _0x30b12e=-parseInt(_0x393f63(0x72))/0x1*(-parseInt(_0x393f63(0x78))/0x2)+-parseInt(_0x393f63(0x84))/0x3*(parseInt(_0x393f63(0x86))/0x4)+-parseInt(_0x393f63(0x87))/0x5+-parseInt(_0x393f63(0x80))/0x6*(parseInt(_0x393f63(0x7c))/0x7)+parseInt(_0x393f63(0x6e))/0x8+-parseInt(_0x393f63(0x8a))/0x9+parseInt(_0x393f63(0x7a))/0xa;if(_0x30b12e===_0xfd6786)break;else _0x154d25['push'](_0x154d25['shift']());}catch(_0x590bed){_0x154d25['push'](_0x154d25['shift']());}}}(a343_0x5eaf,0x864ae));export async function httpRequest(_0x3c6212,_0x5a495d={}){const _0x1ea567=a343_0xd8ee,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x5a495d;let _0x79572a=null;for(let _0x34cebb=0x0;_0x34cebb<=retries;_0x34cebb++){try{const _0x471112=new AbortController(),_0x2b281=setTimeout(()=>_0x471112[_0x1ea567(0x71)](),timeout),_0x266c5a=await fetch(_0x3c6212,{'headers':headers,'signal':_0x471112['signal']});clearTimeout(_0x2b281);let _0x4e414f;const _0xd1611a=_0x266c5a['headers'][_0x1ea567(0x6d)](_0x1ea567(0x77));return _0xd1611a?.[_0x1ea567(0x73)](_0x1ea567(0x82))?_0x4e414f=await _0x266c5a[_0x1ea567(0x7e)]():_0x4e414f=await _0x266c5a[_0x1ea567(0x81)](),{'ok':_0x266c5a['ok'],'status':_0x266c5a[_0x1ea567(0x7b)],'statusText':_0x266c5a[_0x1ea567(0x88)],'data':_0x4e414f,'headers':_0x266c5a[_0x1ea567(0x70)],'url':_0x266c5a['url'],'text':()=>_0x266c5a[_0x1ea567(0x81)]()};}catch(_0x250f7f){_0x79572a=_0x250f7f instanceof Error?_0x250f7f:new Error(String(_0x250f7f));if(_0x34cebb===retries)break;if(shouldRetry(_0x250f7f)){console[_0x1ea567(0x7d)](_0x1ea567(0x79)+(_0x34cebb+0x1)+_0x1ea567(0x83)+retryDelay+_0x1ea567(0x7f)),await sleep(retryDelay);continue;}else break;}}throw _0x79572a||new Error('Request\x20failed');}function shouldRetry(_0x2f658f){const _0x464e0d=a343_0xd8ee;if(_0x2f658f instanceof Error){if(_0x2f658f['name']===_0x464e0d(0x76))return![];if(_0x2f658f[_0x464e0d(0x74)]===_0x464e0d(0x85)&&_0x2f658f[_0x464e0d(0x89)][_0x464e0d(0x73)](_0x464e0d(0x6f)))return!![];if(_0x2f658f[_0x464e0d(0x89)]['includes']('ECONNRESET'))return!![];if(_0x2f658f[_0x464e0d(0x89)][_0x464e0d(0x73)](_0x464e0d(0x75)))return![];}return![];}function a343_0x5eaf(){const _0x53dbc0=['75714iNCPtI','text','application/json','\x20in\x20','4737YitUyN','TypeError','2780wgnBhp','3290070cMuZiZ','statusText','message','7164846TcEgbA','get','8075368pVcRyU','fetch','headers','abort','137413QmvKrR','includes','name','ENOTFOUND','AbortError','content-type','16TllufA','*\x20Request\x20failed;\x20retry\x20','11568970wnALxF','status','91aumotE','log','json','ms...'];a343_0x5eaf=function(){return _0x53dbc0;};return a343_0x5eaf();}function sleep(_0x11bada){return new Promise(_0x10b645=>setTimeout(_0x10b645,_0x11bada));}export function validateUrl(_0x104cc3){try{return new URL(_0x104cc3),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21468d,_0x3c5c48){const _0x41cb9e=a344_0x45a1,_0x1030aa=_0x21468d();while(!![]){try{const _0x17b7a7=parseInt(_0x41cb9e(0x167))/0x1*(parseInt(_0x41cb9e(0x16e))/0x2)+parseInt(_0x41cb9e(0x16f))/0x3+-parseInt(_0x41cb9e(0x172))/0x4*(-parseInt(_0x41cb9e(0x176))/0x5)+-parseInt(_0x41cb9e(0x16a))/0x6+-parseInt(_0x41cb9e(0x175))/0x7*(-parseInt(_0x41cb9e(0x173))/0x8)+parseInt(_0x41cb9e(0x16d))/0x9+-parseInt(_0x41cb9e(0x169))/0xa;if(_0x17b7a7===_0x3c5c48)break;else _0x1030aa['push'](_0x1030aa['shift']());}catch(_0x8e217c){_0x1030aa['push'](_0x1030aa['shift']());}}}(a344_0x5e31,0x6969b));function env(_0x47df5c){return process.env[`RABETBASE_${_0x47df5c}`]||process.env[`LOVRABET_${_0x47df5c}`]||undefined;}export function isNonInteractive(_0x2da682){const _0x58fca3=a344_0x45a1;return!!(_0x2da682[_0x58fca3(0x168)]||_0x2da682['ci']||env('CI')===_0x58fca3(0x170)||process.env.CI===_0x58fca3(0x170)||!process[_0x58fca3(0x174)][_0x58fca3(0x16c)]||!isStdinRawModeSupported());}function a344_0x45a1(_0x420944,_0x12a101){_0x420944=_0x420944-0x166;const _0x5e31de=a344_0x5e31();let _0x45a145=_0x5e31de[_0x420944];return _0x45a145;}function a344_0x5e31(){const _0x419efe=['stdout','7VCWIaZ','13270qLlGXw','stdin','346YMJsMG','nonInteractive','6714110BATxiB','4166640OErmTl','setRawMode','isTTY','1004940dnlJSW','3036dOVsPb','1024290IsxpNt','true','isRaw','628kFxlYd','3221008CXJbSY'];a344_0x5e31=function(){return _0x419efe;};return a344_0x5e31();}function isStdinRawModeSupported(){const _0x2f315a=a344_0x45a1;if(!process[_0x2f315a(0x166)]['isTTY'])return![];try{const _0x26eb65=process[_0x2f315a(0x166)][_0x2f315a(0x171)];return process['stdin'][_0x2f315a(0x16b)](!![]),process[_0x2f315a(0x166)][_0x2f315a(0x16b)](_0x26eb65??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a345_0x51c9fe=a345_0x46e1;function a345_0x288b(){const _0x5db7d4=['error','File','split','details','warn','8918872eYAnmb','readFileSync','command','winstonLogger','green','clearLogs','duration','25eRQAnS','logFilePath','filter','message','213191pgmwuu','clear','569408VeTQCT','existsSync','689661PZBrgt','join','combine','info','rawCommand','addColors','readLogs','success','printf','Failed:\x20','Starting:\x20','481134NoXgUo','createLogger','log','dirname','writeFileSync','initWinstonLogger','now','233908BiJrZW','logTask','1449028mXPezB','getWinstonInstance','errors','mkdirSync','trim','map','yellow','parse','transports','currentRawCommand','timestamp','Completed:\x20','setRawCommand','stringify','.lovrabet.log','format','utf8'];a345_0x288b=function(){return _0x5db7d4;};return a345_0x288b();}(function(_0x2fa785,_0x6671a1){const _0x5b7f7e=a345_0x46e1,_0x1bf926=_0x2fa785();while(!![]){try{const _0x4d48a2=parseInt(_0x5b7f7e(0xee))/0x1+parseInt(_0x5b7f7e(0xf0))/0x2+parseInt(_0x5b7f7e(0xf2))/0x3+parseInt(_0x5b7f7e(0x104))/0x4*(parseInt(_0x5b7f7e(0xea))/0x5)+parseInt(_0x5b7f7e(0xfd))/0x6+parseInt(_0x5b7f7e(0x106))/0x7+-parseInt(_0x5b7f7e(0xe3))/0x8;if(_0x4d48a2===_0x6671a1)break;else _0x1bf926['push'](_0x1bf926['shift']());}catch(_0x388638){_0x1bf926['push'](_0x1bf926['shift']());}}}(a345_0x288b,0x2eff5));function a345_0x46e1(_0xe93a07,_0x58007){_0xe93a07=_0xe93a07-0xe0;const _0x288bb4=a345_0x288b();let _0x46e189=_0x288bb4[_0xe93a07];return _0x46e189;}import a345_0x158ce1 from'winston';import a345_0x2a0059 from'node:fs';import a345_0x2fedb6 from'node:path';class Logger{[a345_0x51c9fe(0xe6)];[a345_0x51c9fe(0xeb)];[a345_0x51c9fe(0x10f)]='';constructor(){const _0x599c01=a345_0x51c9fe;this[_0x599c01(0xeb)]='';}[a345_0x51c9fe(0x112)](_0x72da20){const _0x57c4ca=a345_0x51c9fe;this[_0x57c4ca(0x10f)]=_0x72da20;}[a345_0x51c9fe(0x102)](){const _0xeadbb6=a345_0x51c9fe,_0x1947cc=a345_0x2fedb6[_0xeadbb6(0x100)](this[_0xeadbb6(0xeb)]);!a345_0x2a0059[_0xeadbb6(0xf1)](_0x1947cc)&&a345_0x2a0059[_0xeadbb6(0x109)](_0x1947cc,{'recursive':!![]});const _0x29e28c=a345_0x158ce1[_0xeadbb6(0x115)][_0xeadbb6(0xf4)](a345_0x158ce1['format'][_0xeadbb6(0x110)](),a345_0x158ce1[_0xeadbb6(0x115)][_0xeadbb6(0x108)]({'stack':!![]}),a345_0x158ce1[_0xeadbb6(0x115)][_0xeadbb6(0xfa)](_0x581358=>{const _0x587083=_0xeadbb6,_0x4cd786={'timestamp':_0x581358[_0x587083(0x110)]||new Date()['toISOString'](),'level':_0x581358['level']||'info','command':_0x581358[_0x587083(0xe5)]||'unknown','rawCommand':_0x581358[_0x587083(0xf6)]||this['currentRawCommand']||undefined,'message':_0x581358[_0x587083(0xed)]||'','duration':_0x581358[_0x587083(0xe9)]||undefined,'details':_0x581358[_0x587083(0xe1)]||undefined};return JSON[_0x587083(0x113)](_0x4cd786);}));this[_0xeadbb6(0xe6)]=a345_0x158ce1[_0xeadbb6(0xfe)]({'level':'info','format':_0x29e28c,'transports':[new a345_0x158ce1[(_0xeadbb6(0x10e))][(_0xeadbb6(0x118))]({'filename':this[_0xeadbb6(0xeb)],'level':_0xeadbb6(0xf5)})],'silent':![]}),a345_0x158ce1[_0xeadbb6(0xf7)]({'success':_0xeadbb6(0xe7),'error':'red','warn':_0xeadbb6(0x10c),'info':'blue'});}['setLogPath'](_0x39f304){const _0x570f3f=a345_0x51c9fe;this['logFilePath']=a345_0x2fedb6[_0x570f3f(0xf3)](_0x39f304,_0x570f3f(0x114)),this[_0x570f3f(0xe6)]&&this[_0x570f3f(0xe6)][_0x570f3f(0xef)](),this[_0x570f3f(0x102)]();}[a345_0x51c9fe(0xf5)](_0x466438,_0x35b810,_0x193269){const _0x128141=a345_0x51c9fe;if(!this[_0x128141(0xeb)]||!this[_0x128141(0xe6)])return;this[_0x128141(0xe6)]['info'](_0x35b810,{'command':_0x466438,'details':_0x193269});}[a345_0x51c9fe(0xf9)](_0x162820,_0x117b51,_0xd36b9e,_0x322349){const _0x557f14=a345_0x51c9fe;if(!this[_0x557f14(0xeb)]||!this['winstonLogger'])return;this[_0x557f14(0xe6)][_0x557f14(0xff)](_0x557f14(0xf5),_0x117b51,{'level':_0x557f14(0xf9),'command':_0x162820,'duration':_0xd36b9e,'details':_0x322349});}['error'](_0x1275b0,_0x354cec,_0x3c4799){const _0x5bce4a=a345_0x51c9fe;if(!this[_0x5bce4a(0xeb)]||!this['winstonLogger'])return;this['winstonLogger'][_0x5bce4a(0x117)](_0x354cec,{'command':_0x1275b0,'details':_0x3c4799});}[a345_0x51c9fe(0xe2)](_0x4ddaff,_0x585bd9,_0x66fc27){const _0x5a5f84=a345_0x51c9fe;if(!this['logFilePath']||!this[_0x5a5f84(0xe6)])return;this[_0x5a5f84(0xe6)][_0x5a5f84(0xe2)](_0x585bd9,{'command':_0x4ddaff,'details':_0x66fc27});}async[a345_0x51c9fe(0x105)](_0x4caaf1,_0x353514,_0x5a68f2){const _0x46dedd=a345_0x51c9fe,_0x2fd600=Date['now']();this[_0x46dedd(0xf5)](_0x4caaf1,_0x46dedd(0xfc)+_0x353514);try{const _0x2ba1a1=await _0x5a68f2(),_0x53dc93=Date[_0x46dedd(0x103)]()-_0x2fd600;return this[_0x46dedd(0xf9)](_0x4caaf1,_0x46dedd(0x111)+_0x353514,_0x53dc93),_0x2ba1a1;}catch(_0x4083e1){const _0x4268b7=Date[_0x46dedd(0x103)]()-_0x2fd600;this['error'](_0x4caaf1,_0x46dedd(0xfb)+_0x353514,{'error':_0x4083e1 instanceof Error?_0x4083e1[_0x46dedd(0xed)]:String(_0x4083e1),'duration':_0x4268b7});throw _0x4083e1;}}[a345_0x51c9fe(0xf8)](){const _0x4d2011=a345_0x51c9fe;try{if(!a345_0x2a0059['existsSync'](this[_0x4d2011(0xeb)]))return[];const _0xa29306=a345_0x2a0059[_0x4d2011(0xe4)](this[_0x4d2011(0xeb)],_0x4d2011(0x116));return _0xa29306[_0x4d2011(0xe0)]('\x0a')[_0x4d2011(0xec)](_0x2a3b23=>_0x2a3b23[_0x4d2011(0x10a)]())[_0x4d2011(0x10b)](_0x3a6754=>JSON[_0x4d2011(0x10d)](_0x3a6754));}catch(_0x5d375f){return console[_0x4d2011(0xe2)]('Failed\x20to\x20read\x20logs:',_0x5d375f),[];}}[a345_0x51c9fe(0xe8)](){const _0x1b6a3c=a345_0x51c9fe;try{a345_0x2a0059['existsSync'](this[_0x1b6a3c(0xeb)])&&a345_0x2a0059[_0x1b6a3c(0x101)](this[_0x1b6a3c(0xeb)],'',_0x1b6a3c(0x116));}catch(_0x2cdc1b){console[_0x1b6a3c(0xe2)]('Failed\x20to\x20clear\x20logs:',_0x2cdc1b);}}[a345_0x51c9fe(0x107)](){const _0x4348cd=a345_0x51c9fe;return this[_0x4348cd(0xe6)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2abf10,_0x296788){const _0x1fd82d=a346_0x48c5,_0x2c87e5=_0x2abf10();while(!![]){try{const _0x4bc610=parseInt(_0x1fd82d(0x1e4))/0x1*(-parseInt(_0x1fd82d(0x1d8))/0x2)+-parseInt(_0x1fd82d(0x1dd))/0x3*(-parseInt(_0x1fd82d(0x1df))/0x4)+parseInt(_0x1fd82d(0x1da))/0x5+parseInt(_0x1fd82d(0x1e3))/0x6+-parseInt(_0x1fd82d(0x1e2))/0x7+parseInt(_0x1fd82d(0x1e1))/0x8+-parseInt(_0x1fd82d(0x1d9))/0x9;if(_0x4bc610===_0x296788)break;else _0x2c87e5['push'](_0x2c87e5['shift']());}catch(_0x5be161){_0x2c87e5['push'](_0x2c87e5['shift']());}}}(a346_0x4ae9,0x47e55));function a346_0x48c5(_0x4ed6d7,_0x1bec1a){_0x4ed6d7=_0x4ed6d7-0x1d6;const _0x4ae97b=a346_0x4ae9();let _0x48c573=_0x4ae97b[_0x4ed6d7];return _0x48c573;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x162837){const _0xe8eafb=a346_0x48c5;if(!_0x162837)return undefined;let _0x5cece9;try{_0x5cece9=JSON[_0xe8eafb(0x1e0)](_0x162837);}catch{throw CliErrors[_0xe8eafb(0x1d6)](_0xe8eafb(0x1e5)+_0x162837);}if(!_0x5cece9||typeof _0x5cece9!==_0xe8eafb(0x1dc)||Array[_0xe8eafb(0x1de)](_0x5cece9))throw CliErrors[_0xe8eafb(0x1d6)](_0xe8eafb(0x1db),_0xe8eafb(0x1d7));return _0x5cece9;}function a346_0x4ae9(){const _0x22bfaf=['Example:\x20--params\x20\x27{\x22id\x22:123}\x27','6qdswkV','1720053tqazWk','1574260qONAhi','--params\x20must\x20be\x20a\x20JSON\x20object','object','102369UzhdRN','isArray','44vveAuR','parse','3515448LKRORb','1349677pVfjvn','483756fSkJTN','177283OIpnOq','Invalid\x20JSON\x20for\x20--params:\x20','validation'];a346_0x4ae9=function(){return _0x22bfaf;};return a346_0x4ae9();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a347_0x2c578e=a347_0xf3e6;(function(_0x5ea098,_0x372211){const _0x52d134=a347_0xf3e6,_0x42f46e=_0x5ea098();while(!![]){try{const _0x5cecbc=-parseInt(_0x52d134(0xe9))/0x1*(parseInt(_0x52d134(0xe1))/0x2)+parseInt(_0x52d134(0xe0))/0x3*(-parseInt(_0x52d134(0xe2))/0x4)+parseInt(_0x52d134(0xdf))/0x5*(parseInt(_0x52d134(0xe6))/0x6)+parseInt(_0x52d134(0xea))/0x7*(parseInt(_0x52d134(0xe3))/0x8)+-parseInt(_0x52d134(0xeb))/0x9+parseInt(_0x52d134(0xe4))/0xa+parseInt(_0x52d134(0xe8))/0xb;if(_0x5cecbc===_0x372211)break;else _0x42f46e['push'](_0x42f46e['shift']());}catch(_0x4e081b){_0x42f46e['push'](_0x42f46e['shift']());}}}(a347_0x4dcf,0x38705));function a347_0x4dcf(){const _0xd11c6=['5815095gDpoBU','3AbeffG','2293179JNaLap','3798558iXwQJI','.cmd','169460hOpFEm','24bVlGXR','302558xXKqAv','141008XKucWP','8PrTeXJ','2278180rxribi','platform','54mUttSD','win32'];a347_0x4dcf=function(){return _0xd11c6;};return a347_0x4dcf();}function a347_0xf3e6(_0x2d1877,_0x12318a){_0x2d1877=_0x2d1877-0xdf;const _0x4dcfae=a347_0x4dcf();let _0xf3e62e=_0x4dcfae[_0x2d1877];return _0xf3e62e;}export const isWindows=process[a347_0x2c578e(0xe5)]===a347_0x2c578e(0xe7);export function resolveNpmBin(_0x2955d2){const _0x5ad202=a347_0x2c578e;return isWindows?_0x2955d2+_0x5ad202(0xec):_0x2955d2;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x8a76e5){return new Promise(_0x1ef6e4=>setTimeout(_0x1ef6e4,_0x8a76e5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a349_0x3d8b(){const _0x5e1c01=['replaceApiContent','copyFile','getMinutes','map','formatLocalTimestamp','.scss','.tsx','getSeconds','message','readFile','.css','toUpperCase','push','alias:\x20\x22','6169572rPsvkC','toComponentName','getDate','2227897oVYxIB','.tpl','readdir','writeFile','10HTazRY','getHours','2745556iqOOPe','endsWith','pad','getFullYear','toDisplayTitle','5621016VYQzYO','YourModel','.md','8hwPYII','.json','mkdir','.js','isDirectory','join','24458hNDOWF','split','replace','processDirectory','error','128ogqJRO','toLowerCase','charAt','Template\x20content\x20replacement\x20failed','replaceContent','api','padStart','tableName:\x20\x22','3213200teidbC','sdk-config','slice','name:\x20\x22','5690313APwisu','pop','getMonth','tableName','now','alias','default','utf8','name','toISOString','Starting\x20template\x20content\x20replacement','LOVRABET','\x0a\x20\x20\x20\x20{\x20','processFile','template','promises','datasetCode','\x20},'];a349_0x3d8b=function(){return _0x5e1c01;};return a349_0x3d8b();}const a349_0x26c0a8=a349_0x183f;(function(_0x5aa4fe,_0x1a8be1){const _0x3627c1=a349_0x183f,_0x2415f8=_0x5aa4fe();while(!![]){try{const _0x5c0692=-parseInt(_0x3627c1(0xfa))/0x1*(-parseInt(_0x3627c1(0xf5))/0x2)+-parseInt(_0x3627c1(0xec))/0x3+parseInt(_0x3627c1(0xe7))/0x4+parseInt(_0x3627c1(0x102))/0x5+-parseInt(_0x3627c1(0xde))/0x6+parseInt(_0x3627c1(0xe1))/0x7*(parseInt(_0x3627c1(0xef))/0x8)+parseInt(_0x3627c1(0x106))/0x9*(parseInt(_0x3627c1(0xe5))/0xa);if(_0x5c0692===_0x1a8be1)break;else _0x2415f8['push'](_0x2415f8['shift']());}catch(_0x4fa30c){_0x2415f8['push'](_0x2415f8['shift']());}}}(a349_0x3d8b,0xe6357));import a349_0x4db5c9 from'node:fs';import a349_0x5440b7 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a349_0x183f(_0x5f17aa,_0x148430){_0x5f17aa=_0x5f17aa-0xd1;const _0x3d8be7=a349_0x3d8b();let _0x183fca=_0x3d8be7[_0x5f17aa];return _0x183fca;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a349_0x26c0a8(0xe9)](_0x25c42d){const _0xc65851=a349_0x26c0a8;return String(_0x25c42d)[_0xc65851(0x100)](0x2,'0');}static[a349_0x26c0a8(0xd4)](_0x53128f){const _0x427fa1=a349_0x26c0a8,_0x148104=_0x53128f[_0x427fa1(0xea)](),_0x52bbf6=this[_0x427fa1(0xe9)](_0x53128f[_0x427fa1(0x108)]()+0x1),_0x384504=this[_0x427fa1(0xe9)](_0x53128f[_0x427fa1(0xe0)]()),_0x5f514a=this['pad'](_0x53128f[_0x427fa1(0xe6)]()),_0x135a73=this[_0x427fa1(0xe9)](_0x53128f[_0x427fa1(0xd2)]()),_0x4a3ad2=this['pad'](_0x53128f[_0x427fa1(0xd7)]());return{'createdAt':_0x148104+'-'+_0x52bbf6+'-'+_0x384504+'\x20'+_0x5f514a+':'+_0x135a73+':'+_0x4a3ad2,'createdDate':_0x148104+'-'+_0x52bbf6+'-'+_0x384504,'createdTime':_0x5f514a+':'+_0x135a73+':'+_0x4a3ad2};}static[a349_0x26c0a8(0xdf)](_0x4e4031){const _0x42e48b=a349_0x26c0a8,_0x444456=_0x4e4031[_0x42e48b(0xf6)]('/')[_0x42e48b(0x107)]()||_0x4e4031;return _0x444456[_0x42e48b(0xf6)]('-')['map'](_0x164506=>_0x164506['charAt'](0x0)[_0x42e48b(0xdb)]()+_0x164506[_0x42e48b(0x104)](0x1)[_0x42e48b(0xfb)]())[_0x42e48b(0xf4)]('');}static[a349_0x26c0a8(0xeb)](_0xc0b481){const _0x226a2f=a349_0x26c0a8,_0x41a675=_0xc0b481[_0x226a2f(0xf6)]('/')[_0x226a2f(0x107)]()||_0xc0b481;return _0x41a675[_0x226a2f(0xf6)]('-')[_0x226a2f(0xd3)](_0x37264e=>_0x37264e[_0x226a2f(0xfc)](0x0)[_0x226a2f(0xdb)]()+_0x37264e[_0x226a2f(0x104)](0x1)[_0x226a2f(0xfb)]())['join']('\x20');}static[a349_0x26c0a8(0xfe)](_0x23449c,_0x172ba7,_0x416746){const _0xfdccc3=a349_0x26c0a8,_0x2894b0=this['toComponentName'](_0x172ba7),_0x41ebd6=this['toDisplayTitle'](_0x172ba7),{createdAt:_0x46dc2f,createdDate:_0x476cc1,createdTime:_0x12d165}=this[_0xfdccc3(0xd4)](new Date());let _0x8fec54=_0x23449c[_0xfdccc3(0xf7)](/\{CliVersion\}/g,CLI_VERSION)[_0xfdccc3(0xf7)](/\{ComponentName\}/g,_0x2894b0)[_0xfdccc3(0xf7)](/\{DisplayTitle\}/g,_0x41ebd6)['replace'](/\{PageName\}/g,_0x172ba7)[_0xfdccc3(0xf7)](/\{TemplateName\}/g,_0x416746)[_0xfdccc3(0xf7)](/\{CreatedAt\}/g,_0x46dc2f)[_0xfdccc3(0xf7)](/\{CreatedDate\}/g,_0x476cc1)[_0xfdccc3(0xf7)](/\{CreatedTime\}/g,_0x12d165);return _0x8fec54;}static[a349_0x26c0a8(0x118)](_0x5a1f45,_0x278f55,_0x28da4e,_0x3901b4,_0x1c3a74,_0x6da68b,_0x486007,_0x2af2aa,_0x1fd594){const _0x2c3cfa=a349_0x26c0a8,_0x1fb85c=new Date(),_0x51ef6c=_0x1fb85c[_0x2c3cfa(0x10f)](),_0x5b9c27=_0x28da4e[_0x2c3cfa(0xd3)](_0x58647c=>{const _0x818d4=_0x2c3cfa,_0x5b56a8=['datasetCode:\x20\x22'+_0x58647c[_0x818d4(0x116)]+'\x22',_0x818d4(0x101)+_0x58647c[_0x818d4(0x109)]+'\x22',_0x818d4(0x105)+_0x58647c[_0x818d4(0x10e)]+'\x22'];return _0x58647c['alias']&&_0x5b56a8[_0x818d4(0xdc)](_0x818d4(0xdd)+_0x58647c[_0x818d4(0x10b)]+'\x22'),_0x818d4(0x112)+_0x5b56a8[_0x818d4(0xf4)](',\x20')+_0x818d4(0x117);})['join'](''),_0x35521d=_0x3901b4||_0x28da4e[0x0]?.['alias']||_0x2c3cfa(0xed);let _0x167b9a=_0x5a1f45[_0x2c3cfa(0xf7)](/\{AppCode\}/g,_0x278f55)[_0x2c3cfa(0xf7)](/\{ModelConfigs\}/g,_0x5b9c27)['replace'](/\{ExampleModelName\}/g,_0x35521d)[_0x2c3cfa(0xf7)](/\{ApiFileName\}/g,_0x1c3a74||_0x2c3cfa(0xff))[_0x2c3cfa(0xf7)](/\{ConfigName\}/g,_0x6da68b||_0x2c3cfa(0x10c))[_0x2c3cfa(0xf7)](/\{ClientConfigParam\}/g,_0x486007||'')[_0x2c3cfa(0xf7)](/\{SdkConfigFileName\}/g,_0x1fd594||_0x2c3cfa(0x103))[_0x2c3cfa(0xf7)](/\{VarPrefix\}/g,_0x2af2aa||_0x2c3cfa(0x111))[_0x2c3cfa(0xf7)](/\{CreatedAt\}/g,_0x51ef6c);return _0x167b9a;}static async['processTemplate'](_0x47330f,_0x1238c4,_0x14e444,_0x3ee316,_0x657738=!![]){const _0x2f7e87=a349_0x26c0a8,_0x1ec7a1=Date[_0x2f7e87(0x10a)]();try{_0x657738&&logger['info'](_0x2f7e87(0x114),_0x2f7e87(0x110),{'templatePath':_0x47330f,'targetPath':_0x1238c4,'pageName':_0x14e444,'templateName':_0x3ee316});await a349_0x4db5c9[_0x2f7e87(0x115)][_0x2f7e87(0xf1)](_0x1238c4,{'recursive':!![]}),await this[_0x2f7e87(0xf8)](_0x47330f,_0x1238c4,_0x14e444,_0x3ee316);if(_0x657738){const _0xebf82b=Date[_0x2f7e87(0x10a)]()-_0x1ec7a1;logger['success'](_0x2f7e87(0x114),'Template\x20content\x20replacement\x20completed',_0xebf82b,{'pageName':_0x14e444,'templateName':_0x3ee316});}}catch(_0x573cc4){if(_0x657738){const _0x4f6fb2=Date[_0x2f7e87(0x10a)]()-_0x1ec7a1;logger[_0x2f7e87(0xf9)](_0x2f7e87(0x114),_0x2f7e87(0xfd),{'templatePath':_0x47330f,'targetPath':_0x1238c4,'pageName':_0x14e444,'templateName':_0x3ee316,'error':_0x573cc4 instanceof Error?_0x573cc4[_0x2f7e87(0xd8)]:String(_0x573cc4),'duration':_0x4f6fb2});}throw _0x573cc4;}}static async['processDirectory'](_0x25680e,_0xa1916a,_0x41f67e,_0x45c798){const _0x36feb3=a349_0x26c0a8,_0x2f3eba=await a349_0x4db5c9[_0x36feb3(0x115)][_0x36feb3(0xe3)](_0x25680e,{'withFileTypes':!![]});for(const _0x516b6f of _0x2f3eba){const _0xa1669c=a349_0x5440b7['join'](_0x25680e,_0x516b6f['name']);let _0x20087c=a349_0x5440b7[_0x36feb3(0xf4)](_0xa1916a,_0x516b6f[_0x36feb3(0x10e)]);_0x516b6f[_0x36feb3(0x10e)][_0x36feb3(0xe8)](_0x36feb3(0xe2))&&(_0x20087c=a349_0x5440b7[_0x36feb3(0xf4)](_0xa1916a,_0x516b6f['name'][_0x36feb3(0xf7)](/\.tpl$/,'')));if(_0x516b6f[_0x36feb3(0xf3)]())await a349_0x4db5c9['promises'][_0x36feb3(0xf1)](_0x20087c,{'recursive':!![]}),await this[_0x36feb3(0xf8)](_0xa1669c,_0x20087c,_0x41f67e,_0x45c798);else _0x516b6f['isFile']()&&await this[_0x36feb3(0x113)](_0xa1669c,_0x20087c,_0x41f67e,_0x45c798);}}static async[a349_0x26c0a8(0x113)](_0x25d210,_0x350341,_0x4cbf43,_0x4372c5){const _0x4c1b04=a349_0x26c0a8,_0x2e19cc=a349_0x5440b7['extname'](_0x25d210)[_0x4c1b04(0xfb)]();_0x25d210['endsWith']('.tpl')&&(_0x350341=_0x350341[_0x4c1b04(0xf7)](/\.tpl$/,''));const _0x228d37=[_0x4c1b04(0xd6),'.ts','.jsx',_0x4c1b04(0xf2),_0x4c1b04(0xf0),_0x4c1b04(0xee),_0x4c1b04(0xda),_0x4c1b04(0xd5),_0x4c1b04(0xe2)];if(_0x228d37['includes'](_0x2e19cc)||_0x25d210['endsWith']('.tpl')){const _0x112519=await a349_0x4db5c9[_0x4c1b04(0x115)][_0x4c1b04(0xd9)](_0x25d210,_0x4c1b04(0x10d)),_0x2736b7=this['replaceContent'](_0x112519,_0x4cbf43,_0x4372c5);await a349_0x4db5c9[_0x4c1b04(0x115)][_0x4c1b04(0xe4)](_0x350341,_0x2736b7,_0x4c1b04(0x10d));}else await a349_0x4db5c9[_0x4c1b04(0x115)][_0x4c1b04(0xd1)](_0x25d210,_0x350341);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3749b9,_0x151853){const _0x4de585=a350_0x4e6d,_0x1c5091=_0x3749b9();while(!![]){try{const _0x3a1234=parseInt(_0x4de585(0x11e))/0x1*(-parseInt(_0x4de585(0x12b))/0x2)+parseInt(_0x4de585(0x122))/0x3+parseInt(_0x4de585(0x125))/0x4*(parseInt(_0x4de585(0x119))/0x5)+-parseInt(_0x4de585(0x115))/0x6+-parseInt(_0x4de585(0x124))/0x7+parseInt(_0x4de585(0x11a))/0x8*(parseInt(_0x4de585(0x111))/0x9)+parseInt(_0x4de585(0x12c))/0xa*(parseInt(_0x4de585(0x10f))/0xb);if(_0x3a1234===_0x151853)break;else _0x1c5091['push'](_0x1c5091['shift']());}catch(_0x1da84e){_0x1c5091['push'](_0x1c5091['shift']());}}}(a350_0x1f27,0xd3cee));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a350_0x3d37a6 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a350_0x4e6d(_0x4d3644,_0x44df7b){_0x4d3644=_0x4d3644-0x10f;const _0x1f2729=a350_0x1f27();let _0x4e6ddd=_0x1f2729[_0x4d3644];return _0x4e6ddd;}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a350_0x1f27(){const _0x1ddc9c=['8gxMRhn','/v/','yes','lastNotifiedAt','8371pWEywj','utf8','parse','trim','3568443HmZbsp',',\x20run:\x20','10533509FARlDO','43060VSgNSw','now','gte','toLowerCase','object','\x20update','226UAxZqF','10UwZGEk','checkedAt','latest','11844437GFRIae','number','10456497VbqccS','lastNotifiedVersion','valid','stableVersion','6924060oUTZyo','rabetbase-cli','stringify','true','485IvkHfI'];a350_0x1f27=function(){return _0x1ddc9c;};return a350_0x1f27();}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 _0x1d5a13=a350_0x4e6d,_0x31f58c=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x1d5a13(0x121)]()[_0x1d5a13(0x128)]();return _0x31f58c==='1'||_0x31f58c===_0x1d5a13(0x118)||_0x31f58c===_0x1d5a13(0x11c);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x266759=a350_0x4e6d;return join(cacheRoot(),_0x266759(0x116),'update-check.json');}async function readUpdateNoticeCache(){const _0xdda0c=a350_0x4e6d;try{const _0x38820c=await readFile(getUpdateNoticeCachePath(),_0xdda0c(0x11f)),_0x4a4b8a=JSON[_0xdda0c(0x120)](_0x38820c);if(!_0x4a4b8a||typeof _0x4a4b8a!==_0xdda0c(0x129))return{};return _0x4a4b8a;}catch{return{};}}async function writeUpdateNoticeCache(_0x36e18){const _0x65d5b5=a350_0x4e6d;try{const _0x1bc86e=getUpdateNoticeCachePath();await mkdir(dirname(_0x1bc86e),{'recursive':!![]}),await writeFile(_0x1bc86e,JSON[_0x65d5b5(0x117)](_0x36e18,null,0x2)+'\x0a',_0x65d5b5(0x11f));}catch{}}function isFreshCheck(_0x152505,_0x57c59e){const _0x37cc08=a350_0x4e6d;return typeof _0x152505[_0x37cc08(0x12d)]===_0x37cc08(0x110)&&_0x57c59e-_0x152505[_0x37cc08(0x12d)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0xac24f5,_0x19b905,_0xfc72f2){const _0x2762d4=a350_0x4e6d;return _0xac24f5[_0x2762d4(0x112)]===_0x19b905&&typeof _0xac24f5[_0x2762d4(0x11d)]===_0x2762d4(0x110)&&_0xfc72f2-_0xac24f5[_0x2762d4(0x11d)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x785a65){const _0x1f8f61=a350_0x4e6d;return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+_0x1f8f61(0x11b)+_0x785a65;}export async function resolveLatestUpdateNotice(){const _0x1b48de=a350_0x4e6d;if(isUpdateNoticeDisabled())return null;try{const _0x2650c0=Date[_0x1b48de(0x126)](),_0x437ce4=getCliVersion(),_0x29f940=await readUpdateNoticeCache();let _0x26fe65=isFreshCheck(_0x29f940,_0x2650c0)?_0x29f940[_0x1b48de(0x12e)]?.[_0x1b48de(0x121)]():undefined;if(!_0x26fe65&&!isFreshCheck(_0x29f940,_0x2650c0)){const _0x2b3700=await getCliVersionPolicy();_0x26fe65=_0x2b3700?.[_0x1b48de(0x114)]?.[_0x1b48de(0x121)]()||undefined,await writeUpdateNoticeCache({..._0x29f940,'checkedAt':_0x2650c0,'latest':_0x26fe65,'failed':!_0x26fe65});}if(!_0x26fe65||!a350_0x3d37a6[_0x1b48de(0x113)](_0x437ce4)||!a350_0x3d37a6['valid'](_0x26fe65))return null;if(a350_0x3d37a6[_0x1b48de(0x127)](_0x437ce4,_0x26fe65))return null;if(isRecentlyNotified(_0x29f940,_0x26fe65,_0x2650c0))return null;const _0x1c1873=CLI_BIN_NAME+_0x1b48de(0x12a);return await writeUpdateNoticeCache({..._0x29f940,'checkedAt':isFreshCheck(_0x29f940,_0x2650c0)?_0x29f940[_0x1b48de(0x12d)]:_0x2650c0,'latest':_0x26fe65,'failed':![],'lastNotifiedVersion':_0x26fe65,'lastNotifiedAt':_0x2650c0}),{'command':_0x1c1873,'current':_0x437ce4,'latest':_0x26fe65,'url':buildNpmVersionUrl(_0x26fe65),'message':CLI_BIN_NAME+'\x20'+_0x26fe65+'\x20available,\x20current\x20'+_0x437ce4+_0x1b48de(0x123)+_0x1c1873};}catch{return null;}}
|