@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-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/README.md +10 -0
- 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.d.ts +2 -2
- 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.d.ts +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/context.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- 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/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.d.ts +0 -28
- 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/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- 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/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 +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-issue-report.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29565d,_0x250496){const _0x23f2cd=a358_0x2231,_0x1a95ac=_0x29565d();while(!![]){try{const _0x1b56fe=-parseInt(_0x23f2cd(0x86))/0x1+-parseInt(_0x23f2cd(0x8d))/0x2*(-parseInt(_0x23f2cd(0x83))/0x3)+parseInt(_0x23f2cd(0x90))/0x4*(parseInt(_0x23f2cd(0x99))/0x5)+parseInt(_0x23f2cd(0x93))/0x6+parseInt(_0x23f2cd(0x8c))/0x7*(parseInt(_0x23f2cd(0x8e))/0x8)+-parseInt(_0x23f2cd(0x96))/0x9+-parseInt(_0x23f2cd(0x97))/0xa;if(_0x1b56fe===_0x250496)break;else _0x1a95ac['push'](_0x1a95ac['shift']());}catch(_0x3f79ad){_0x1a95ac['push'](_0x1a95ac['shift']());}}}(a358_0x3792,0x93261));import a358_0x47dda8 from'node:fs';import a358_0xa1bc6b from'node:path';import a358_0x4ba222 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0xd5e193){const _0xc4dde0=a358_0x2231,_0x80783c=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x80783c[_0xc4dde0(0x79)](_0x194f30=>_0x194f30[_0xc4dde0(0x88)](_0xd5e193));}function getInstalledVersion(_0x48eced,_0x277b45){const _0x29121f=a358_0x2231;try{const _0x42f674=a358_0xa1bc6b['join'](_0x48eced,_0x29121f(0x81),_0x277b45,_0x29121f(0x7c));if(a358_0x47dda8[_0x29121f(0x78)](_0x42f674)){const _0x3c7783=JSON['parse'](a358_0x47dda8[_0x29121f(0x7f)](_0x42f674,'utf-8'));return _0x3c7783[_0x29121f(0x7b)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x433e98=a358_0x2231;try{const _0x2c3e74=await getCdnConfig();return _0x2c3e74?.[_0x433e98(0x7a)]?.['node']?.[_0x433e98(0x95)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x31a16f=a358_0x2231;try{const _0x2d295d=await getCdnConfig();return _0x2d295d?.[_0x31a16f(0x7a)]?.[_0x31a16f(0x9c)]?.[_0x31a16f(0x91)]||_0x31a16f(0x8a);}catch{return _0x31a16f(0x8a);}}export async function checkSdkVersion(_0xc2b1f3){const _0x564602=a358_0x2231,_0x2bb419=a358_0xa1bc6b[_0x564602(0x80)](_0xc2b1f3,_0x564602(0x7c)),[_0x4c368c,_0x44a8e3]=await Promise[_0x564602(0x8b)]([getSdkStableVersion(),getSdkPackageName()]),_0x1d28dc=_0x4c368c||FALLBACK_MIN_SDK_VERSION;if(!a358_0x47dda8[_0x564602(0x78)](_0x2bb419))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1d28dc,'packageName':_0x44a8e3,'stableVersion':_0x4c368c};try{const _0x51c9c4=JSON[_0x564602(0x7d)](a358_0x47dda8[_0x564602(0x7f)](_0x2bb419,'utf8')),_0x2370e5=_0x51c9c4[_0x564602(0x85)]||{},_0x4ae81b=_0x51c9c4[_0x564602(0x9b)]||{},_0x119ba4=_0x2370e5[_0x44a8e3]||_0x4ae81b[_0x44a8e3];if(!_0x119ba4)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1d28dc,'packageName':_0x44a8e3,'stableVersion':_0x4c368c};let _0x1a434d=getInstalledVersion(_0xc2b1f3,_0x44a8e3);!_0x1a434d&&(_0x1a434d=_0x119ba4);if(isNonNumericVersion(_0x119ba4))return{'installed':!![],'version':_0x1a434d,'needsUpgrade':![],'minVersion':_0x1d28dc,'packageName':_0x44a8e3,'stableVersion':_0x4c368c};const _0x3faa86=a358_0x4ba222[_0x564602(0x87)](_0x1a434d),_0x41fa4f=a358_0x4ba222[_0x564602(0x87)](_0x1d28dc),_0x5ac06e=_0x3faa86&&_0x41fa4f?a358_0x4ba222['lt'](_0x3faa86,_0x41fa4f):![];return{'installed':!![],'version':_0x1a434d,'needsUpgrade':_0x5ac06e,'minVersion':_0x1d28dc,'packageName':_0x44a8e3,'stableVersion':_0x4c368c};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1d28dc,'packageName':_0x44a8e3,'stableVersion':_0x4c368c};}}function a358_0x3792(){const _0x1947f0=['log','stableVersion','6182451IHwhCB','8472540ppwcKR','\x1b[33m','1984695QwdqRC','minVersion','devDependencies','node','existsSync','some','sdk','version','package.json','parse','\x1b[1m','readFileSync','join','node_modules','\x1b[0m','114tgAReI','npm\x20install\x20','dependencies','942861IjKWfq','coerce','test','utf8','@lovrabet/sdk','all','1134lnzsgk','26492LThzuc','29048srfHqA','\x20\x20\x20Upgrade\x20command:\x20','12JUpjJI','packageName','\x20\x20\x20Current\x20version:\x20','4784328RaPjBO'];a358_0x3792=function(){return _0x1947f0;};return a358_0x3792();}function a358_0x2231(_0x196990,_0x677218){_0x196990=_0x196990-0x78;const _0x3792a9=a358_0x3792();let _0x2231b3=_0x3792a9[_0x196990];return _0x2231b3;}export function checkSdkVersionSync(_0x22a128){const _0x586c78=a358_0x2231,_0x1697dd=a358_0xa1bc6b[_0x586c78(0x80)](_0x22a128,'package.json'),_0x37d82e=_0x586c78(0x8a);if(!a358_0x47dda8[_0x586c78(0x78)](_0x1697dd))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x37d82e,'stableVersion':null};try{const _0x3c47b1=JSON[_0x586c78(0x7d)](a358_0x47dda8['readFileSync'](_0x1697dd,_0x586c78(0x89))),_0x5b22b0=_0x3c47b1[_0x586c78(0x85)]||{},_0x38cfb=_0x3c47b1[_0x586c78(0x9b)]||{},_0x1455e6=_0x5b22b0[_0x37d82e]||_0x38cfb[_0x37d82e];if(!_0x1455e6)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x37d82e,'stableVersion':null};let _0x43ef00=getInstalledVersion(_0x22a128,_0x37d82e);!_0x43ef00&&(_0x43ef00=_0x1455e6);if(isNonNumericVersion(_0x1455e6))return{'installed':!![],'version':_0x43ef00,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x37d82e,'stableVersion':null};const _0x348a90=a358_0x4ba222[_0x586c78(0x87)](_0x43ef00),_0x51a4c9=_0x348a90?a358_0x4ba222['lt'](_0x348a90,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x43ef00,'needsUpgrade':_0x51a4c9,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x37d82e,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x37d82e,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4fe447){const _0x15e4f1=a358_0x2231;if(!_0x4fe447['needsUpgrade'])return;const _0x156531=_0x15e4f1(0x98),_0x443701=_0x15e4f1(0x82),_0x46349c=_0x15e4f1(0x7e),_0x1539e2=_0x4fe447['packageName']||_0x15e4f1(0x8a),_0x3e4991=_0x4fe447[_0x15e4f1(0x95)]||_0x4fe447[_0x15e4f1(0x9a)],_0x3641db=_0x15e4f1(0x84)+_0x1539e2+'@'+(_0x3e4991||'latest');console[_0x15e4f1(0x94)](),console[_0x15e4f1(0x94)](''+_0x156531+_0x46349c+'↪\x20SDK\x20update\x20available'+_0x443701),console[_0x15e4f1(0x94)](_0x156531+_0x15e4f1(0x92)+_0x1539e2+'@'+_0x4fe447[_0x15e4f1(0x7b)]+_0x443701),console[_0x15e4f1(0x94)](_0x156531+'\x20\x20\x20Stable\x20version:\x20'+_0x3e4991+_0x443701),console[_0x15e4f1(0x94)](_0x156531+_0x15e4f1(0x8f)+_0x3641db+_0x443701),console[_0x15e4f1(0x94)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x160bd4,_0xf9b44c){const _0x3203b8=a359_0x3f1a,_0x1bd8b0=_0x160bd4();while(!![]){try{const _0x272202=parseInt(_0x3203b8(0xa0))/0x1*(-parseInt(_0x3203b8(0x96))/0x2)+-parseInt(_0x3203b8(0xa6))/0x3+parseInt(_0x3203b8(0x88))/0x4*(-parseInt(_0x3203b8(0xa2))/0x5)+parseInt(_0x3203b8(0x92))/0x6+-parseInt(_0x3203b8(0x9a))/0x7+-parseInt(_0x3203b8(0x8a))/0x8+parseInt(_0x3203b8(0x98))/0x9;if(_0x272202===_0xf9b44c)break;else _0x1bd8b0['push'](_0x1bd8b0['shift']());}catch(_0x2e1a6c){_0x1bd8b0['push'](_0x1bd8b0['shift']());}}}(a359_0x577f,0x4bc0c));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a359_0x546fdf from'semver';function a359_0x3f1a(_0x2138be,_0x2a0814){_0x2138be=_0x2138be-0x87;const _0x577ff1=a359_0x577f();let _0x3f1ad2=_0x577ff1[_0x2138be];return _0x3f1ad2;}function a359_0x577f(){const _0x2ed917=['1.0.0','1xBZQQZ','npm\x20install\x20-g\x20','2960565GnpDaZ','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20Recommended\x20stable:\x20','minimumVersionMessage','1493976ysKCoB','↪\x20Critical\x20CLI\x20upgrade\x20required','join','\x20\x20\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','package.json','stableVersion','filter','minimumVersion','needsUpgrade','4GyyVLe','log','3840200wzjqkl','\x20\x20\x20Minimum\x20supported:\x20','\x1b[0m','Minimum\x20supported:\x20','Current\x20version:\x20','parse','Upgrade\x20command:\x20','../..','804306ByFbCQ','coerce','utf-8','belowMinimum','1036204RXOqvK','validation','20432601GwCEVx','latest','40768puiERO','\x20\x20\x20Stable\x20version:\x20','currentVersion','\x1b[31m','upgradeMessage'];a359_0x577f=function(){return _0x2ed917;};return a359_0x577f();}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x395c15){const _0x55e517=a359_0x3f1a,_0x29b2e6=_0x395c15['stableVersion']||_0x55e517(0x99);return _0x55e517(0xa1)+NPM_PACKAGE_NAME+'@'+_0x29b2e6;}function getCurrentCliVersion(){const _0x33fcf4=a359_0x3f1a;try{const _0x1fa59d=fileURLToPath(import.meta.url),_0xce7957=resolve(dirname(_0x1fa59d),_0x33fcf4(0x91)),_0x2766ff=resolve(_0xce7957,_0x33fcf4(0xab)),_0x15c681=JSON[_0x33fcf4(0x8f)](readFileSync(_0x2766ff,_0x33fcf4(0x94)));return _0x15c681['version']||'1.0.0';}catch{return _0x33fcf4(0x9f);}}export async function checkCliVersion(){const _0x59dfab=a359_0x3f1a,_0x1d1e48=getCurrentCliVersion(),_0x4622a6=await getCliVersionPolicy(),_0x287457=_0x4622a6?.[_0x59dfab(0xac)]||null,_0x22a6d9=_0x4622a6?.[_0x59dfab(0xae)]||null;let _0x1a7966=![],_0xe52055=![];const _0x3e2513=a359_0x546fdf[_0x59dfab(0x93)](_0x1d1e48);if(_0x3e2513&&_0x287457)try{const _0x521e12=a359_0x546fdf['coerce'](_0x287457);if(_0x521e12)_0x1a7966=a359_0x546fdf['lt'](_0x3e2513,_0x521e12);}catch{}if(_0x3e2513&&_0x22a6d9)try{const _0x458906=a359_0x546fdf[_0x59dfab(0x93)](_0x22a6d9);if(_0x458906)_0xe52055=a359_0x546fdf['lt'](_0x3e2513,_0x458906);}catch{}return _0xe52055&&(_0x1a7966=!![]),{'currentVersion':_0x1d1e48,'stableVersion':_0x287457,'minimumVersion':_0x22a6d9,'needsUpgrade':_0x1a7966,'belowMinimum':_0xe52055,'isPreRelease':![],'upgradeMessage':_0x4622a6?.[_0x59dfab(0x9e)],'minimumVersionMessage':_0x4622a6?.[_0x59dfab(0xa5)]};}export function printCliUpgradeWarning(_0x35d41b){const _0x3d7e9d=a359_0x3f1a;if(!_0x35d41b[_0x3d7e9d(0x87)]&&!_0x35d41b[_0x3d7e9d(0x95)])return;const _0x42abff=_0x3d7e9d(0x9d),_0x32ee45='\x1b[33m',_0x178ff0=_0x3d7e9d(0x8c),_0x3c7c8a='\x1b[1m',_0x20dc83=getCliUpgradeCommand(_0x35d41b);console[_0x3d7e9d(0x89)](),_0x35d41b[_0x3d7e9d(0x95)]?(console[_0x3d7e9d(0x89)](''+_0x42abff+_0x3c7c8a+_0x3d7e9d(0xa7)+_0x178ff0),console[_0x3d7e9d(0x89)](_0x42abff+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x35d41b['currentVersion']+_0x178ff0),_0x35d41b[_0x3d7e9d(0xae)]&&console[_0x3d7e9d(0x89)](_0x42abff+_0x3d7e9d(0x8b)+_0x35d41b[_0x3d7e9d(0xae)]+_0x178ff0),_0x35d41b[_0x3d7e9d(0xac)]&&_0x35d41b['stableVersion']!==_0x35d41b[_0x3d7e9d(0xae)]&&console[_0x3d7e9d(0x89)](_0x42abff+_0x3d7e9d(0xa4)+_0x35d41b[_0x3d7e9d(0xac)]+_0x178ff0),_0x35d41b[_0x3d7e9d(0xa5)]&&console[_0x3d7e9d(0x89)](_0x42abff+_0x3d7e9d(0xa9)+_0x35d41b[_0x3d7e9d(0xa5)]+_0x178ff0),console[_0x3d7e9d(0x89)](_0x42abff+_0x3d7e9d(0xa3)+_0x20dc83+_0x178ff0)):(console[_0x3d7e9d(0x89)](''+_0x32ee45+_0x3c7c8a+'↪\x20New\x20version\x20available'+_0x178ff0),console['log'](_0x32ee45+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x35d41b[_0x3d7e9d(0x9c)]+_0x178ff0),console[_0x3d7e9d(0x89)](_0x32ee45+_0x3d7e9d(0x9b)+_0x35d41b[_0x3d7e9d(0xac)]+_0x178ff0),_0x35d41b[_0x3d7e9d(0x9e)]&&console[_0x3d7e9d(0x89)](_0x32ee45+'\x20\x20\x20'+_0x35d41b[_0x3d7e9d(0x9e)]+_0x178ff0),console['log'](_0x32ee45+_0x3d7e9d(0xa3)+_0x20dc83+_0x178ff0)),console[_0x3d7e9d(0x89)]();}export function assertCliVersionSupported(_0x246dd3){const _0xc20b7f=a359_0x3f1a;if(!_0x246dd3[_0xc20b7f(0x95)])return;const _0x224272=[_0x246dd3[_0xc20b7f(0xa5)],_0xc20b7f(0x8e)+_0x246dd3['currentVersion'],_0x246dd3[_0xc20b7f(0xae)]?_0xc20b7f(0x8d)+_0x246dd3[_0xc20b7f(0xae)]:null,_0xc20b7f(0x90)+getCliUpgradeCommand(_0x246dd3)][_0xc20b7f(0xad)](Boolean)[_0xc20b7f(0xa8)]('\x0a');throw CliErrors[_0xc20b7f(0x97)](_0xc20b7f(0xaa),_0x224272);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x37cb28,_0x24ce02){const _0x224396=a360_0x3cad,_0x5b1efe=_0x37cb28();while(!![]){try{const _0x53dc55=-parseInt(_0x224396(0x15e))/0x1+parseInt(_0x224396(0x14e))/0x2*(parseInt(_0x224396(0x163))/0x3)+parseInt(_0x224396(0x15b))/0x4*(parseInt(_0x224396(0x15f))/0x5)+-parseInt(_0x224396(0x166))/0x6+-parseInt(_0x224396(0x15a))/0x7*(parseInt(_0x224396(0x160))/0x8)+-parseInt(_0x224396(0x165))/0x9+parseInt(_0x224396(0x153))/0xa*(parseInt(_0x224396(0x155))/0xb);if(_0x53dc55===_0x24ce02)break;else _0x5b1efe['push'](_0x5b1efe['shift']());}catch(_0x3e00a5){_0x5b1efe['push'](_0x5b1efe['shift']());}}}(a360_0x34cb,0xae73e));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a360_0x1bd98e from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function a360_0x3cad(_0x18f82c,_0x53e533){_0x18f82c=_0x18f82c-0x14c;const _0x34cb3b=a360_0x34cb();let _0x3cad86=_0x34cb3b[_0x18f82c];return _0x3cad86;}export function isBetaCliVersion(_0x468a47){const _0x26c943=a360_0x3cad,_0x291d0c=a360_0x1bd98e['valid'](_0x468a47);return _0x291d0c?a360_0x1bd98e[_0x26c943(0x157)](_0x291d0c)?.[0x0]===_0x26c943(0x15c):![];}export function resolveProjectTemplateDescriptor(_0x94ab47,_0xec3b48){const _0x4e686a=a360_0x3cad;if(isBetaCliVersion(_0xec3b48))return _0x94ab47[_0x4e686a(0x15c)]?.[_0x4e686a(0x15d)]??_0x94ab47['projectTemplate'];return _0x94ab47[_0x4e686a(0x15d)];}function pickString(_0x59bec6){const _0x4e73f0=a360_0x3cad;return typeof _0x59bec6===_0x4e73f0(0x151)&&_0x59bec6[_0x4e73f0(0x159)]()[_0x4e73f0(0x162)]>0x0?_0x59bec6['trim']():null;}function normalizeCliVersionPolicy(_0x49cba3){const _0x15e0ef=a360_0x3cad;if(!_0x49cba3||typeof _0x49cba3!=='object')return null;const _0x529217=_0x49cba3,_0x6f21ac=_0x529217['cli']&&typeof _0x529217[_0x15e0ef(0x164)]===_0x15e0ef(0x152)?_0x529217[_0x15e0ef(0x164)]:_0x529217,_0x15fd28=pickString(_0x6f21ac[_0x15e0ef(0x167)])||pickString(_0x6f21ac['latestVersion'])||pickString(_0x6f21ac[_0x15e0ef(0x154)]),_0x130072=pickString(_0x6f21ac[_0x15e0ef(0x150)])||pickString(_0x6f21ac['minVersion']);if(!_0x15fd28&&!_0x130072)return null;return{'stableVersion':_0x15fd28,'minimumVersion':_0x130072,'upgradeMessage':pickString(_0x6f21ac[_0x15e0ef(0x168)])||undefined,'minimumVersionMessage':pickString(_0x6f21ac[_0x15e0ef(0x14d)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x248bef){const _0x18633d=a360_0x3cad,_0x5c300e=new AbortController(),_0x5b7888=setTimeout(()=>_0x5c300e[_0x18633d(0x158)](),FETCH_TIMEOUT_MS);try{const _0xb5305b=await fetch(_0x248bef,{'headers':{'Accept':_0x18633d(0x14f)},'signal':_0x5c300e[_0x18633d(0x156)]});if(!_0xb5305b['ok'])return null;const _0x380dbe=await _0xb5305b[_0x18633d(0x14c)]();return _0x380dbe&&typeof _0x380dbe==='object'?_0x380dbe:null;}catch{return null;}finally{clearTimeout(_0x5b7888);}}function a360_0x34cb(){const _0xe8d768=['289996ckyBWi','application/json','minimumVersion','string','object','10UimBpt','recommendedVersion','12659273dnoUfu','signal','prerelease','abort','trim','3516772osjbkX','3956464bmyYBf','beta','projectTemplate','1219554ZGTWMw','5DwiqRB','8FrjROG','now','length','21svLgyW','cli','483597sPXonY','3988224YSHHDr','stableVersion','upgradeMessage','json','minimumVersionMessage'];a360_0x34cb=function(){return _0xe8d768;};return a360_0x34cb();}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}export async function fetchProjectTemplateCdnConfig(){const _0x1b98b5=await getRabetbaseCdnConfig();return _0x1b98b5?{'config':_0x1b98b5,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x186f60=a360_0x3cad,_0x5d6aa2=Date[_0x186f60(0x161)]();if(hasCachedConfig){const _0xf6735f=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x5d6aa2-cacheTime<_0xf6735f)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x5d6aa2,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_0x5bb6d4=a361_0x4838;(function(_0x15b3d8,_0x309ba9){const _0x212b0a=a361_0x4838,_0x5bdaa0=_0x15b3d8();while(!![]){try{const _0xf01fb8=-parseInt(_0x212b0a(0x87))/0x1*(parseInt(_0x212b0a(0x82))/0x2)+-parseInt(_0x212b0a(0x8c))/0x3*(-parseInt(_0x212b0a(0x8d))/0x4)+parseInt(_0x212b0a(0x89))/0x5+-parseInt(_0x212b0a(0x83))/0x6+parseInt(_0x212b0a(0x8a))/0x7+-parseInt(_0x212b0a(0x8b))/0x8+-parseInt(_0x212b0a(0x84))/0x9*(-parseInt(_0x212b0a(0x86))/0xa);if(_0xf01fb8===_0x309ba9)break;else _0x5bdaa0['push'](_0x5bdaa0['shift']());}catch(_0x2bc17b){_0x5bdaa0['push'](_0x5bdaa0['shift']());}}}(a361_0x37e2,0xcac90));function a361_0x4838(_0x2c5030,_0xf2cca8){_0x2c5030=_0x2c5030-0x82;const _0x37e2c3=a361_0x37e2();let _0x4838b4=_0x37e2c3[_0x2c5030];return _0x4838b4;}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a361_0x41d5c3,getMultiAppConfigs as a361_0x4c0e13,getTemplateBaseUrl as a361_0x22e53d}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a361_0x37e2(){const _0x23d0b4=['env','174490Mxbzvg','133jOsusI','project','7810685VOeSlw','8514450iSRwXC','10825488pUVKoO','3XOrijR','3757596woOMte','string','23590YGULHl','2409492wToOGI','225XzRrzb'];a361_0x37e2=function(){return _0x23d0b4;};return a361_0x37e2();}export function readConfig(_0x46f994){const _0x35f83d=a361_0x4838,_0x2ebb16=readRawConfig(_0x46f994);return _0x2ebb16[_0x35f83d(0x85)]&&typeof _0x2ebb16['env']===_0x35f83d(0x8e)&&initEnv(_0x2ebb16[_0x35f83d(0x85)]),_0x2ebb16;}export function getConfigAppCode(){return a361_0x41d5c3();}export function getMultiAppConfigs(_0x2ed61d=a361_0x5bb6d4(0x88)){return a361_0x4c0e13(_0x2ed61d);}export function getTemplateBaseUrl(){return a361_0x22e53d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bc14e,_0x2da450){const _0x2b8692=a362_0x839b,_0x10991d=_0x1bc14e();while(!![]){try{const _0x2c9381=-parseInt(_0x2b8692(0x1b3))/0x1*(-parseInt(_0x2b8692(0x1b2))/0x2)+-parseInt(_0x2b8692(0x1b6))/0x3*(parseInt(_0x2b8692(0x1ba))/0x4)+parseInt(_0x2b8692(0x1af))/0x5*(-parseInt(_0x2b8692(0x1b4))/0x6)+-parseInt(_0x2b8692(0x1b9))/0x7*(-parseInt(_0x2b8692(0x1b1))/0x8)+parseInt(_0x2b8692(0x1bd))/0x9*(-parseInt(_0x2b8692(0x1b7))/0xa)+-parseInt(_0x2b8692(0x1ae))/0xb+parseInt(_0x2b8692(0x1ad))/0xc;if(_0x2c9381===_0x2da450)break;else _0x10991d['push'](_0x10991d['shift']());}catch(_0x593029){_0x10991d['push'](_0x10991d['shift']());}}}(a362_0x4b85,0x1bd44));function toFiniteNumber(_0x5cf945){const _0x2971de=a362_0x839b;if(typeof _0x5cf945===_0x2971de(0x1b5)&&Number[_0x2971de(0x1bb)](_0x5cf945))return _0x5cf945;if(typeof _0x5cf945===_0x2971de(0x1b0)){const _0x10481d=_0x5cf945[_0x2971de(0x1b8)]();if(!_0x10481d)return undefined;const _0x384526=Number(_0x10481d);if(Number[_0x2971de(0x1bb)](_0x384526))return _0x384526;}return undefined;}function a362_0x839b(_0x3a662f,_0x58928d){_0x3a662f=_0x3a662f-0x1ad;const _0x4b8571=a362_0x4b85();let _0x839b73=_0x4b8571[_0x3a662f];return _0x839b73;}export function normalizeEntityWithIdResponse(_0x1fdba9){const _0x284743=a362_0x839b,_0x137f6b=toFiniteNumber(_0x1fdba9);if(_0x137f6b!==undefined)return{'id':_0x137f6b,'entity':{'id':_0x137f6b}};if(!_0x1fdba9||typeof _0x1fdba9!==_0x284743(0x1bc))return{'id':undefined,'entity':{}};const _0x1b42bd={..._0x1fdba9},_0x5ace17=toFiniteNumber(_0x1b42bd['id']);return _0x5ace17!==undefined&&(_0x1b42bd['id']=_0x5ace17),{'id':_0x5ace17,'entity':_0x1b42bd};}function a362_0x4b85(){const _0x239170=['1370ynixGI','trim','14IYSnkd','237412VXqqQg','isFinite','object','1629XIqvCN','2187108uOmUQT','981486lHAFUd','2030lkEsZd','string','286544LSEJCd','33038hciXnA','5qgdHhp','726sCSSzm','number','3jBCvcf'];a362_0x4b85=function(){return _0x239170;};return a362_0x4b85();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f65d0,_0x3d5886){const _0x10757d=a363_0x2939,_0x23a843=_0x3f65d0();while(!![]){try{const _0x59ef11=parseInt(_0x10757d(0x168))/0x1+-parseInt(_0x10757d(0x166))/0x2*(-parseInt(_0x10757d(0x167))/0x3)+-parseInt(_0x10757d(0x165))/0x4+-parseInt(_0x10757d(0x16b))/0x5*(-parseInt(_0x10757d(0x16d))/0x6)+parseInt(_0x10757d(0x169))/0x7+parseInt(_0x10757d(0x16a))/0x8+-parseInt(_0x10757d(0x16c))/0x9;if(_0x59ef11===_0x3d5886)break;else _0x23a843['push'](_0x23a843['shift']());}catch(_0x3de186){_0x23a843['push'](_0x23a843['shift']());}}}(a363_0x5a2d,0x87415));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x560487,_0x3e7817){const _0x32bf3f=statSync(_0x560487);if(_0x32bf3f['isDirectory']()){!existsSync(_0x3e7817)&&mkdirSync(_0x3e7817,{'recursive':!![]});const _0x5585dd=readdirSync(_0x560487);for(const _0x55cc10 of _0x5585dd){await copyDir(join(_0x560487,_0x55cc10),join(_0x3e7817,_0x55cc10));}}else copyFileSync(_0x560487,_0x3e7817);}export function ensureDir(_0x1ba37b){!existsSync(_0x1ba37b)&&mkdirSync(_0x1ba37b,{'recursive':!![]});}function a363_0x5a2d(){const _0x3a4732=['1158886sePpCn','3zmHOKN','362127LdxeeQ','5400304qnKlsd','1063488nqRfuB','315110XUAkhx','13751532ojJsug','90PARNnp','2837420UKDQGm'];a363_0x5a2d=function(){return _0x3a4732;};return a363_0x5a2d();}function a363_0x2939(_0x452568,_0x1ea8fc){_0x452568=_0x452568-0x165;const _0x5a2d43=a363_0x5a2d();let _0x293970=_0x5a2d43[_0x452568];return _0x293970;}export function pathExists(_0x21fd83){return existsSync(_0x21fd83);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a364_0x53502e=a364_0x4145;(function(_0xdde5dc,_0x2794e2){const _0x13d66c=a364_0x4145,_0x5a4531=_0xdde5dc();while(!![]){try{const _0x3060bf=parseInt(_0x13d66c(0x168))/0x1+parseInt(_0x13d66c(0x178))/0x2*(-parseInt(_0x13d66c(0x176))/0x3)+parseInt(_0x13d66c(0x170))/0x4*(-parseInt(_0x13d66c(0x184))/0x5)+parseInt(_0x13d66c(0x173))/0x6+parseInt(_0x13d66c(0x182))/0x7+-parseInt(_0x13d66c(0x16d))/0x8*(-parseInt(_0x13d66c(0x166))/0x9)+-parseInt(_0x13d66c(0x17c))/0xa;if(_0x3060bf===_0x2794e2)break;else _0x5a4531['push'](_0x5a4531['shift']());}catch(_0x1f22df){_0x5a4531['push'](_0x5a4531['shift']());}}}(a364_0x1a4b,0x9a6f8));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function a364_0x1a4b(){const _0x15d1b1=['cache','.lovrabet','join','keys','8063536JBaHRi','guides','extendContent','878428vlnhDk','skillTemplate','CDN\x20returned\x20invalid\x20data','6351978AGumYF','/skills/guides.json','lastUpdated','18219uqGlhq','entries','142HbrPPS','json','title','.md','5557370nEPxki','trimEnd','.lovrabet/skill/guides','application/json','replace','utf-8','491435HIriFZ','content','25RTKbHd','\x0a\x0a>更新时间:','push','object','map','length','9cqsvue','status','580713GiKqwz'];a364_0x1a4b=function(){return _0x15d1b1;};return a364_0x1a4b();}function getGuidesCdnUrl(){const _0x4dd8d6=a364_0x4145,_0x20cadb=getTemplateBaseUrl();return _0x20cadb+_0x4dd8d6(0x174);}const CACHE_DIR=join(homedir(),a364_0x53502e(0x16a),a364_0x53502e(0x169));export async function fetchGuidesFromCDN(){const _0x47bb65=a364_0x53502e,_0x25b618=getGuidesCdnUrl(),_0x5528f7=await fetch(_0x25b618,{'headers':{'Accept':_0x47bb65(0x17f)}});if(!_0x5528f7['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x5528f7[_0x47bb65(0x167)]+'\x20'+_0x5528f7['statusText']);const _0x1d752a=await _0x5528f7[_0x47bb65(0x179)]();if(!_0x1d752a['guides']||typeof _0x1d752a[_0x47bb65(0x16e)]!==_0x47bb65(0x187))throw new Error(_0x47bb65(0x172));return _0x1d752a;}export function writeGuidesToProject(_0x4f3a93,_0x1d6ee2,_0x385566=a364_0x53502e(0x17e),_0x18cf8e){const _0x54785a=a364_0x53502e,_0x57c637=join(_0x1d6ee2,_0x385566);mkdirSync(_0x57c637,{'recursive':!![]});for(const [_0x384c34,_0x30860f]of Object[_0x54785a(0x177)](_0x4f3a93[_0x54785a(0x16e)])){let _0x4123d5=_0x30860f[_0x54785a(0x183)];_0x30860f['lastUpdated']&&(_0x4123d5=appendUpdateTime(_0x4123d5,_0x30860f['lastUpdated'])),writeFileSync(join(_0x57c637,_0x384c34+_0x54785a(0x17b)),_0x4123d5,'utf-8');}}export function appendUpdateTime(_0x3353e5,_0x4c0249){const _0x340b2a=a364_0x53502e;return _0x3353e5=_0x3353e5[_0x340b2a(0x180)](/\n*>更新时间:.*$/m,''),_0x3353e5[_0x340b2a(0x17d)]()+(_0x340b2a(0x185)+_0x4c0249);}function a364_0x4145(_0x484ea2,_0x2689a6){_0x484ea2=_0x484ea2-0x166;const _0x1a4b24=a364_0x1a4b();let _0x4145c0=_0x1a4b24[_0x484ea2];return _0x4145c0;}export function getSkillTemplate(_0xdccbf4){return _0xdccbf4['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x4ab40a,_0x44483,_0x19130c){const _0x11dfa4=a364_0x53502e,_0x30074e=[];for(const [,_0x130f4c]of Object[_0x11dfa4(0x177)](_0x44483[_0x11dfa4(0x16e)])){_0x130f4c[_0x11dfa4(0x16f)]&&_0x30074e[_0x11dfa4(0x186)](_0x130f4c['extendContent']['trimEnd']());}if(_0x30074e[_0x11dfa4(0x189)]===0x0)return _0x4ab40a;return _0x4ab40a[_0x11dfa4(0x17d)]()+'\x0a\x0a'+_0x30074e[_0x11dfa4(0x16b)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x40f0b5,_0x5b9fb3,_0x464f4a){const _0x12dce2=a364_0x53502e,_0x1a0258=getSkillTemplate(_0x40f0b5);if(!_0x1a0258)throw new Error('CDN\x20data\x20is\x20missing\x20skillTemplate');const _0x3537e2=dirname(_0x5b9fb3);mkdirSync(_0x3537e2,{'recursive':!![]});let _0x52e883=_0x1a0258[_0x12dce2(0x180)](/\{\{IDE_NAME\}\}/g,_0x464f4a);_0x52e883=appendExtendContents(_0x52e883,_0x40f0b5),_0x40f0b5['skillTemplate'][_0x12dce2(0x175)]&&(_0x52e883=appendUpdateTime(_0x52e883,_0x40f0b5[_0x12dce2(0x171)][_0x12dce2(0x175)])),writeFileSync(_0x5b9fb3,_0x52e883,_0x12dce2(0x181));}export async function installGuides(_0x2a3f7f){const _0x298993=a364_0x53502e,_0x3d0852=await fetchGuidesFromCDN();return writeGuidesToProject(_0x3d0852,_0x2a3f7f),Object[_0x298993(0x16c)](_0x3d0852[_0x298993(0x16e)])[_0x298993(0x189)];}export function getGuidesSummary(_0x4ea421){const _0x2b78e8=a364_0x53502e;return Object[_0x2b78e8(0x177)](_0x4ea421[_0x2b78e8(0x16e)])[_0x2b78e8(0x188)](([_0x53bd77,_0x340287])=>({'key':_0x53bd77,'title':_0x340287[_0x2b78e8(0x17a)],'path':_0x340287['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e4c6a,_0x4987ee){const _0xa1ce7b=a365_0x518a,_0x8a953b=_0x3e4c6a();while(!![]){try{const _0x4b65fc=parseInt(_0xa1ce7b(0x1f4))/0x1+-parseInt(_0xa1ce7b(0x1f9))/0x2*(parseInt(_0xa1ce7b(0x1f2))/0x3)+parseInt(_0xa1ce7b(0x1f6))/0x4+-parseInt(_0xa1ce7b(0x1ee))/0x5*(-parseInt(_0xa1ce7b(0x1f0))/0x6)+parseInt(_0xa1ce7b(0x1ed))/0x7+parseInt(_0xa1ce7b(0x1fe))/0x8+-parseInt(_0xa1ce7b(0x1fd))/0x9*(parseInt(_0xa1ce7b(0x1f3))/0xa);if(_0x4b65fc===_0x4987ee)break;else _0x8a953b['push'](_0x8a953b['shift']());}catch(_0x1de4d6){_0x8a953b['push'](_0x8a953b['shift']());}}}(a365_0x1efd,0x20185));export async function httpRequest(_0x536198,_0x46643b={}){const _0x105a03=a365_0x518a,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x46643b;let _0x314092=null;for(let _0x5327c2=0x0;_0x5327c2<=retries;_0x5327c2++){try{const _0x1c80dc=new AbortController(),_0x380583=setTimeout(()=>_0x1c80dc['abort'](),timeout),_0x41141e=await fetch(_0x536198,{'headers':headers,'signal':_0x1c80dc['signal']});clearTimeout(_0x380583);let _0x4d325f;const _0x3d9ffe=_0x41141e[_0x105a03(0x1f8)]['get']('content-type');return _0x3d9ffe?.[_0x105a03(0x1ef)](_0x105a03(0x1f5))?_0x4d325f=await _0x41141e[_0x105a03(0x1fc)]():_0x4d325f=await _0x41141e[_0x105a03(0x205)](),{'ok':_0x41141e['ok'],'status':_0x41141e[_0x105a03(0x200)],'statusText':_0x41141e[_0x105a03(0x1fb)],'data':_0x4d325f,'headers':_0x41141e[_0x105a03(0x1f8)],'url':_0x41141e[_0x105a03(0x1fa)],'text':()=>_0x41141e[_0x105a03(0x205)]()};}catch(_0x291539){_0x314092=_0x291539 instanceof Error?_0x291539:new Error(String(_0x291539));if(_0x5327c2===retries)break;if(shouldRetry(_0x291539)){console[_0x105a03(0x1ec)]('*\x20Request\x20failed;\x20retry\x20'+(_0x5327c2+0x1)+_0x105a03(0x1ff)+retryDelay+'ms...'),await sleep(retryDelay);continue;}else break;}}throw _0x314092||new Error(_0x105a03(0x1f7));}function a365_0x1efd(){const _0x2a58f1=['Request\x20failed','headers','96394VfZkQK','url','statusText','json','9Sohkqb','349744EhMGCT','\x20in\x20','status','ECONNRESET','ENOTFOUND','fetch','TypeError','text','message','log','777595DriXyv','35jCgKSE','includes','89934WSggzi','name','9xaJEBc','2612690glScug','189438xAmSzk','application/json','352628WFTwcB'];a365_0x1efd=function(){return _0x2a58f1;};return a365_0x1efd();}function shouldRetry(_0x52f4b0){const _0x90e439=a365_0x518a;if(_0x52f4b0 instanceof Error){if(_0x52f4b0['name']==='AbortError')return![];if(_0x52f4b0[_0x90e439(0x1f1)]===_0x90e439(0x204)&&_0x52f4b0[_0x90e439(0x206)][_0x90e439(0x1ef)](_0x90e439(0x203)))return!![];if(_0x52f4b0[_0x90e439(0x206)][_0x90e439(0x1ef)](_0x90e439(0x201)))return!![];if(_0x52f4b0[_0x90e439(0x206)][_0x90e439(0x1ef)](_0x90e439(0x202)))return![];}return![];}function a365_0x518a(_0x38f47f,_0x5def80){_0x38f47f=_0x38f47f-0x1ec;const _0x1efd03=a365_0x1efd();let _0x518a78=_0x1efd03[_0x38f47f];return _0x518a78;}function sleep(_0x2f1a48){return new Promise(_0x33d1a8=>setTimeout(_0x33d1a8,_0x2f1a48));}export function validateUrl(_0x5ac7bd){try{return new URL(_0x5ac7bd),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21f29b,_0x227aab){const _0x53659b=a366_0x19b0,_0x4472af=_0x21f29b();while(!![]){try{const _0x8938a4=-parseInt(_0x53659b(0x1fb))/0x1+parseInt(_0x53659b(0x1f9))/0x2*(parseInt(_0x53659b(0x1fe))/0x3)+-parseInt(_0x53659b(0x1ff))/0x4+parseInt(_0x53659b(0x1f8))/0x5+parseInt(_0x53659b(0x1f6))/0x6*(-parseInt(_0x53659b(0x1f7))/0x7)+-parseInt(_0x53659b(0x1fa))/0x8+parseInt(_0x53659b(0x1fd))/0x9*(parseInt(_0x53659b(0x1f5))/0xa);if(_0x8938a4===_0x227aab)break;else _0x4472af['push'](_0x4472af['shift']());}catch(_0x322b66){_0x4472af['push'](_0x4472af['shift']());}}}(a366_0x13e7,0x2cef3));function env(_0x5100a5){return process.env[`RABETBASE_${_0x5100a5}`]||process.env[`LOVRABET_${_0x5100a5}`]||undefined;}export function isNonInteractive(_0x447a40){const _0x2e51cb=a366_0x19b0;return!!(_0x447a40['nonInteractive']||_0x447a40['ci']||env('CI')==='true'||process.env.CI==='true'||!process['stdout'][_0x2e51cb(0x1fc)]||!isStdinRawModeSupported());}function a366_0x13e7(){const _0x301b47=['276GpJgiw','861784fkTJRI','stdin','setRawMode','72690wXibhf','896604rCskCw','7LVrfQv','1302110VriPTG','5204UsHPjf','1201048IBWFCV','76966onspEh','isTTY','342bGZBdE'];a366_0x13e7=function(){return _0x301b47;};return a366_0x13e7();}function a366_0x19b0(_0xf16900,_0x2d964e){_0xf16900=_0xf16900-0x1f4;const _0x13e7a1=a366_0x13e7();let _0x19b0b2=_0x13e7a1[_0xf16900];return _0x19b0b2;}function isStdinRawModeSupported(){const _0x337c69=a366_0x19b0;if(!process['stdin']['isTTY'])return![];try{const _0x263896=process['stdin']['isRaw'];return process[_0x337c69(0x200)]['setRawMode'](!![]),process[_0x337c69(0x200)][_0x337c69(0x1f4)](_0x263896??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a367_0x4d74ad=a367_0xda4c;(function(_0x1a97de,_0x20f758){const _0x194658=a367_0xda4c,_0x3b2866=_0x1a97de();while(!![]){try{const _0x597069=-parseInt(_0x194658(0x10b))/0x1+parseInt(_0x194658(0xec))/0x2+-parseInt(_0x194658(0x120))/0x3+parseInt(_0x194658(0xf1))/0x4+parseInt(_0x194658(0x100))/0x5*(parseInt(_0x194658(0x11f))/0x6)+-parseInt(_0x194658(0x119))/0x7+parseInt(_0x194658(0x117))/0x8;if(_0x597069===_0x20f758)break;else _0x3b2866['push'](_0x3b2866['shift']());}catch(_0x13b007){_0x3b2866['push'](_0x3b2866['shift']());}}}(a367_0x3a21,0xb2aa5));function a367_0xda4c(_0x3d577d,_0x47607e){_0x3d577d=_0x3d577d-0xe8;const _0x3a210d=a367_0x3a21();let _0xda4c4=_0x3a210d[_0x3d577d];return _0xda4c4;}import a367_0x16f737 from'winston';import a367_0x284b0e from'node:fs';function a367_0x3a21(){const _0x5d99f1=['trim','errors','parse','698382iNmhBu','readFileSync','existsSync','toISOString','split','225684odiikl','filter','success','combine','command','logFilePath','rawCommand','transports','log','winstonLogger','warn','printf','now','clear','level','985605XRMyIo','Failed:\x20','Failed\x20to\x20read\x20logs:','setRawCommand','File','error','setLogPath','duration','timestamp','readLogs','unknown','909962CaLrNT','createLogger','writeFileSync','clearLogs','message','Completed:\x20','join','addColors','red','currentRawCommand','info','getWinstonInstance','15662080JlctMN','initWinstonLogger','6693869oMMiTE','dirname','yellow','green','format','logTask','42gyAGsh','3435531hdXqHr','details','Failed\x20to\x20clear\x20logs:','utf8'];a367_0x3a21=function(){return _0x5d99f1;};return a367_0x3a21();}import a367_0x4b0a95 from'node:path';class Logger{[a367_0x4d74ad(0xfa)];['logFilePath'];[a367_0x4d74ad(0x114)]='';constructor(){const _0x3fde7a=a367_0x4d74ad;this[_0x3fde7a(0xf6)]='';}[a367_0x4d74ad(0x103)](_0x2ffc46){this['currentRawCommand']=_0x2ffc46;}[a367_0x4d74ad(0x118)](){const _0x4b450f=a367_0x4d74ad,_0x6b426=a367_0x4b0a95[_0x4b450f(0x11a)](this[_0x4b450f(0xf6)]);!a367_0x284b0e[_0x4b450f(0xee)](_0x6b426)&&a367_0x284b0e['mkdirSync'](_0x6b426,{'recursive':!![]});const _0x209448=a367_0x16f737['format'][_0x4b450f(0xf4)](a367_0x16f737[_0x4b450f(0x11d)][_0x4b450f(0x108)](),a367_0x16f737[_0x4b450f(0x11d)][_0x4b450f(0xea)]({'stack':!![]}),a367_0x16f737[_0x4b450f(0x11d)][_0x4b450f(0xfc)](_0x39122c=>{const _0x2466eb=_0x4b450f,_0x119b80={'timestamp':_0x39122c[_0x2466eb(0x108)]||new Date()[_0x2466eb(0xef)](),'level':_0x39122c[_0x2466eb(0xff)]||_0x2466eb(0x115),'command':_0x39122c[_0x2466eb(0xf5)]||_0x2466eb(0x10a),'rawCommand':_0x39122c[_0x2466eb(0xf7)]||this['currentRawCommand']||undefined,'message':_0x39122c[_0x2466eb(0x10f)]||'','duration':_0x39122c[_0x2466eb(0x107)]||undefined,'details':_0x39122c[_0x2466eb(0x121)]||undefined};return JSON['stringify'](_0x119b80);}));this[_0x4b450f(0xfa)]=a367_0x16f737[_0x4b450f(0x10c)]({'level':_0x4b450f(0x115),'format':_0x209448,'transports':[new a367_0x16f737[(_0x4b450f(0xf8))][(_0x4b450f(0x104))]({'filename':this[_0x4b450f(0xf6)],'level':_0x4b450f(0x115)})],'silent':![]}),a367_0x16f737[_0x4b450f(0x112)]({'success':_0x4b450f(0x11c),'error':_0x4b450f(0x113),'warn':_0x4b450f(0x11b),'info':'blue'});}[a367_0x4d74ad(0x106)](_0x386df2){const _0x334c17=a367_0x4d74ad;this[_0x334c17(0xf6)]=a367_0x4b0a95[_0x334c17(0x111)](_0x386df2,'.lovrabet.log'),this['winstonLogger']&&this[_0x334c17(0xfa)][_0x334c17(0xfe)](),this['initWinstonLogger']();}[a367_0x4d74ad(0x115)](_0x2522f4,_0x72c772,_0x3ce36e){const _0x50a4b7=a367_0x4d74ad;if(!this[_0x50a4b7(0xf6)]||!this['winstonLogger'])return;this[_0x50a4b7(0xfa)][_0x50a4b7(0x115)](_0x72c772,{'command':_0x2522f4,'details':_0x3ce36e});}['success'](_0x11bcdd,_0x533213,_0x1fc5ba,_0x3dc4c6){const _0x39ec21=a367_0x4d74ad;if(!this[_0x39ec21(0xf6)]||!this[_0x39ec21(0xfa)])return;this[_0x39ec21(0xfa)][_0x39ec21(0xf9)](_0x39ec21(0x115),_0x533213,{'level':_0x39ec21(0xf3),'command':_0x11bcdd,'duration':_0x1fc5ba,'details':_0x3dc4c6});}[a367_0x4d74ad(0x105)](_0x2e91de,_0x29df8e,_0x37564e){const _0x56fbec=a367_0x4d74ad;if(!this['logFilePath']||!this[_0x56fbec(0xfa)])return;this[_0x56fbec(0xfa)][_0x56fbec(0x105)](_0x29df8e,{'command':_0x2e91de,'details':_0x37564e});}[a367_0x4d74ad(0xfb)](_0x1e549e,_0x1ecf7f,_0xcaf43){const _0x384b61=a367_0x4d74ad;if(!this[_0x384b61(0xf6)]||!this[_0x384b61(0xfa)])return;this[_0x384b61(0xfa)][_0x384b61(0xfb)](_0x1ecf7f,{'command':_0x1e549e,'details':_0xcaf43});}async[a367_0x4d74ad(0x11e)](_0x3b0ed7,_0x1321ae,_0x5ce0fa){const _0x232615=a367_0x4d74ad,_0x5b2b5a=Date[_0x232615(0xfd)]();this[_0x232615(0x115)](_0x3b0ed7,'Starting:\x20'+_0x1321ae);try{const _0xba2c59=await _0x5ce0fa(),_0x401d95=Date[_0x232615(0xfd)]()-_0x5b2b5a;return this[_0x232615(0xf3)](_0x3b0ed7,_0x232615(0x110)+_0x1321ae,_0x401d95),_0xba2c59;}catch(_0x56a2d8){const _0x1e074f=Date[_0x232615(0xfd)]()-_0x5b2b5a;this[_0x232615(0x105)](_0x3b0ed7,_0x232615(0x101)+_0x1321ae,{'error':_0x56a2d8 instanceof Error?_0x56a2d8[_0x232615(0x10f)]:String(_0x56a2d8),'duration':_0x1e074f});throw _0x56a2d8;}}[a367_0x4d74ad(0x109)](){const _0x1f557c=a367_0x4d74ad;try{if(!a367_0x284b0e[_0x1f557c(0xee)](this[_0x1f557c(0xf6)]))return[];const _0x224746=a367_0x284b0e[_0x1f557c(0xed)](this[_0x1f557c(0xf6)],'utf8');return _0x224746[_0x1f557c(0xf0)]('\x0a')[_0x1f557c(0xf2)](_0x28000c=>_0x28000c[_0x1f557c(0xe9)]())['map'](_0x15bbe1=>JSON[_0x1f557c(0xeb)](_0x15bbe1));}catch(_0x1ea51b){return console[_0x1f557c(0xfb)](_0x1f557c(0x102),_0x1ea51b),[];}}[a367_0x4d74ad(0x10e)](){const _0x1e595b=a367_0x4d74ad;try{a367_0x284b0e['existsSync'](this[_0x1e595b(0xf6)])&&a367_0x284b0e[_0x1e595b(0x10d)](this['logFilePath'],'',_0x1e595b(0xe8));}catch(_0xdd6089){console[_0x1e595b(0xfb)](_0x1e595b(0x122),_0xdd6089);}}[a367_0x4d74ad(0x116)](){const _0x4b0ee2=a367_0x4d74ad;return this[_0x4b0ee2(0xfa)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a368_0x5c00(_0x22fd2f,_0x2b5e90){_0x22fd2f=_0x22fd2f-0xf5;const _0xcf8fa7=a368_0xcf8f();let _0x5c007c=_0xcf8fa7[_0x22fd2f];return _0x5c007c;}(function(_0x5e0bc0,_0x4e9899){const _0x75b17a=a368_0x5c00,_0x5f412e=_0x5e0bc0();while(!![]){try{const _0x3266f6=-parseInt(_0x75b17a(0x101))/0x1*(parseInt(_0x75b17a(0xfe))/0x2)+-parseInt(_0x75b17a(0xf7))/0x3*(-parseInt(_0x75b17a(0xfa))/0x4)+parseInt(_0x75b17a(0xf5))/0x5*(-parseInt(_0x75b17a(0xff))/0x6)+parseInt(_0x75b17a(0xf8))/0x7*(-parseInt(_0x75b17a(0xfd))/0x8)+parseInt(_0x75b17a(0x102))/0x9+-parseInt(_0x75b17a(0xfc))/0xa+parseInt(_0x75b17a(0xf6))/0xb;if(_0x3266f6===_0x4e9899)break;else _0x5f412e['push'](_0x5f412e['shift']());}catch(_0x2fe4c3){_0x5f412e['push'](_0x5f412e['shift']());}}}(a368_0xcf8f,0x25043));import{CliErrors}from'../errors.js';function a368_0xcf8f(){const _0x4cbdcc=['128BHnJrd','1294jmNPpe','18eXdsoU','validation','397lokapc','2353995UsntOc','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','483150XzJYUJ','9273484zhTjGh','105ByBAvg','80591lhCqiU','parse','6920JsThXg','isArray','2825730NrREQu'];a368_0xcf8f=function(){return _0x4cbdcc;};return a368_0xcf8f();}export function parseJsonParams(_0x197da9){const _0x14f08f=a368_0x5c00;if(!_0x197da9)return undefined;let _0x4ddffc;try{_0x4ddffc=JSON[_0x14f08f(0xf9)](_0x197da9);}catch{throw CliErrors[_0x14f08f(0x100)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x197da9);}if(!_0x4ddffc||typeof _0x4ddffc!=='object'||Array[_0x14f08f(0xfb)](_0x4ddffc))throw CliErrors[_0x14f08f(0x100)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x14f08f(0x103));return _0x4ddffc;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a369_0x1a300d=a369_0x5d28;(function(_0x1f7c5c,_0x47dd47){const _0x77ca02=a369_0x5d28,_0x2c51c6=_0x1f7c5c();while(!![]){try{const _0x57a51d=parseInt(_0x77ca02(0x13b))/0x1*(parseInt(_0x77ca02(0x130))/0x2)+-parseInt(_0x77ca02(0x137))/0x3*(parseInt(_0x77ca02(0x13a))/0x4)+parseInt(_0x77ca02(0x134))/0x5*(-parseInt(_0x77ca02(0x138))/0x6)+parseInt(_0x77ca02(0x133))/0x7*(parseInt(_0x77ca02(0x139))/0x8)+parseInt(_0x77ca02(0x136))/0x9+parseInt(_0x77ca02(0x135))/0xa+-parseInt(_0x77ca02(0x132))/0xb;if(_0x57a51d===_0x47dd47)break;else _0x2c51c6['push'](_0x2c51c6['shift']());}catch(_0x91948d){_0x2c51c6['push'](_0x2c51c6['shift']());}}}(a369_0x2d80,0x1f8db));function a369_0x2d80(){const _0x3e6731=['.cmd','2WGlMib','platform','3558599FWVSfD','7uAAnpc','845hhJjpy','1097990LmBpKc','1925505kpRcBx','6LSjcQS','1926AlmvpI','1974864ddfkSR','146428LgKqhm','9613ofkbVu'];a369_0x2d80=function(){return _0x3e6731;};return a369_0x2d80();}export const isWindows=process[a369_0x1a300d(0x131)]==='win32';function a369_0x5d28(_0x49db9b,_0xa27d95){_0x49db9b=_0x49db9b-0x130;const _0x2d80ff=a369_0x2d80();let _0x5d2859=_0x2d80ff[_0x49db9b];return _0x5d2859;}export function resolveNpmBin(_0x4fa27f){const _0x25ee47=a369_0x1a300d;return isWindows?_0x4fa27f+_0x25ee47(0x13c):_0x4fa27f;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x2a8eab){return new Promise(_0x2db5c4=>setTimeout(_0x2db5c4,_0x2a8eab));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a371_0x2fdddb=a371_0x2b10;(function(_0x30973c,_0x476569){const _0x2e2cab=a371_0x2b10,_0xb769b9=_0x30973c();while(!![]){try{const _0x241dbd=-parseInt(_0x2e2cab(0x177))/0x1+-parseInt(_0x2e2cab(0x17c))/0x2+-parseInt(_0x2e2cab(0x152))/0x3*(parseInt(_0x2e2cab(0x167))/0x4)+parseInt(_0x2e2cab(0x151))/0x5+parseInt(_0x2e2cab(0x14d))/0x6*(-parseInt(_0x2e2cab(0x15d))/0x7)+parseInt(_0x2e2cab(0x16e))/0x8+-parseInt(_0x2e2cab(0x17a))/0x9*(-parseInt(_0x2e2cab(0x17f))/0xa);if(_0x241dbd===_0x476569)break;else _0xb769b9['push'](_0xb769b9['shift']());}catch(_0x27b40a){_0xb769b9['push'](_0xb769b9['shift']());}}}(a371_0x438a,0x7d289));import a371_0x3a3eed from'node:fs';import a371_0x3c8ee6 from'node:path';function a371_0x438a(){const _0x58ded9=['pad','toLowerCase','35KdLboe','getHours','extname','promises','\x20},','endsWith','.js','template','datasetCode:\x20\x22','Template\x20content\x20replacement\x20completed','2882344clULcR','YourModel','copyFile','now','slice','join','replaceContent','3648488CDZjxB','.jsx','getFullYear','utf8','includes','writeFile','isFile','sdk-config','.tpl','510200DqwNWG','LOVRABET','api','1701xLDySY','processTemplate','136758sVwrkO','split','isDirectory','52190wypndS','tableName','.json','getMinutes','processDirectory','replaceApiContent','success','readFile','padStart','toUpperCase','datasetCode','processFile','getDate','toDisplayTitle','Starting\x20template\x20content\x20replacement','toComponentName','getSeconds','formatLocalTimestamp','default','alias','info','toISOString','name:\x20\x22','.tsx','671226Lyrobo','pop','.css','mkdir','4643585NSWyvJ','3bbqCSg','name','charAt','.scss','alias:\x20\x22','map','Template\x20content\x20replacement\x20failed','error','replace'];a371_0x438a=function(){return _0x58ded9;};return a371_0x438a();}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a371_0x2b10(_0x3fa27c,_0x3f5c19){_0x3fa27c=_0x3fa27c-0x13e;const _0x438ae4=a371_0x438a();let _0x2b10ab=_0x438ae4[_0x3fa27c];return _0x2b10ab;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a371_0x2fdddb(0x15b)](_0x1543af){const _0x1c8dd0=a371_0x2fdddb;return String(_0x1543af)[_0x1c8dd0(0x187)](0x2,'0');}static['formatLocalTimestamp'](_0x386473){const _0x13ed54=a371_0x2fdddb,_0x9ea8e2=_0x386473[_0x13ed54(0x170)](),_0x5d7206=this[_0x13ed54(0x15b)](_0x386473['getMonth']()+0x1),_0x5808ef=this[_0x13ed54(0x15b)](_0x386473[_0x13ed54(0x141)]()),_0x58dee2=this['pad'](_0x386473[_0x13ed54(0x15e)]()),_0x387cda=this[_0x13ed54(0x15b)](_0x386473[_0x13ed54(0x182)]()),_0x5aa58e=this[_0x13ed54(0x15b)](_0x386473[_0x13ed54(0x145)]());return{'createdAt':_0x9ea8e2+'-'+_0x5d7206+'-'+_0x5808ef+'\x20'+_0x58dee2+':'+_0x387cda+':'+_0x5aa58e,'createdDate':_0x9ea8e2+'-'+_0x5d7206+'-'+_0x5808ef,'createdTime':_0x58dee2+':'+_0x387cda+':'+_0x5aa58e};}static[a371_0x2fdddb(0x144)](_0x40afff){const _0x55fdbf=a371_0x2fdddb,_0xb42387=_0x40afff[_0x55fdbf(0x17d)]('/')[_0x55fdbf(0x14e)]()||_0x40afff;return _0xb42387[_0x55fdbf(0x17d)]('-')[_0x55fdbf(0x157)](_0x34a00a=>_0x34a00a[_0x55fdbf(0x154)](0x0)[_0x55fdbf(0x13e)]()+_0x34a00a['slice'](0x1)[_0x55fdbf(0x15c)]())[_0x55fdbf(0x16c)]('');}static[a371_0x2fdddb(0x142)](_0x33563b){const _0x5d39e6=a371_0x2fdddb,_0x384c6c=_0x33563b['split']('/')['pop']()||_0x33563b;return _0x384c6c[_0x5d39e6(0x17d)]('-')[_0x5d39e6(0x157)](_0x20603f=>_0x20603f[_0x5d39e6(0x154)](0x0)['toUpperCase']()+_0x20603f[_0x5d39e6(0x16b)](0x1)[_0x5d39e6(0x15c)]())[_0x5d39e6(0x16c)]('\x20');}static[a371_0x2fdddb(0x16d)](_0x4e5bd1,_0x4038c7,_0x469423){const _0x40ad2b=a371_0x2fdddb,_0x1d37df=this[_0x40ad2b(0x144)](_0x4038c7),_0x8f6db4=this[_0x40ad2b(0x142)](_0x4038c7),{createdAt:_0x22ad60,createdDate:_0xe600ce,createdTime:_0x53a649}=this[_0x40ad2b(0x146)](new Date());let _0x3a20d3=_0x4e5bd1[_0x40ad2b(0x15a)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x1d37df)[_0x40ad2b(0x15a)](/\{DisplayTitle\}/g,_0x8f6db4)[_0x40ad2b(0x15a)](/\{PageName\}/g,_0x4038c7)[_0x40ad2b(0x15a)](/\{TemplateName\}/g,_0x469423)[_0x40ad2b(0x15a)](/\{CreatedAt\}/g,_0x22ad60)[_0x40ad2b(0x15a)](/\{CreatedDate\}/g,_0xe600ce)[_0x40ad2b(0x15a)](/\{CreatedTime\}/g,_0x53a649);return _0x3a20d3;}static[a371_0x2fdddb(0x184)](_0x24331d,_0x1e59d3,_0x29ed57,_0x89d74c,_0x39c375,_0x130e17,_0x689eda,_0x18f774,_0x56a929){const _0x5d3a19=a371_0x2fdddb,_0x501eb8=new Date(),_0x4f5f17=_0x501eb8[_0x5d3a19(0x14a)](),_0xd53cb2=_0x29ed57[_0x5d3a19(0x157)](_0x3a4d13=>{const _0x51e696=_0x5d3a19,_0x5587b9=[_0x51e696(0x165)+_0x3a4d13[_0x51e696(0x13f)]+'\x22','tableName:\x20\x22'+_0x3a4d13[_0x51e696(0x180)]+'\x22',_0x51e696(0x14b)+_0x3a4d13[_0x51e696(0x153)]+'\x22'];return _0x3a4d13[_0x51e696(0x148)]&&_0x5587b9['push'](_0x51e696(0x156)+_0x3a4d13[_0x51e696(0x148)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x5587b9[_0x51e696(0x16c)](',\x20')+_0x51e696(0x161);})[_0x5d3a19(0x16c)](''),_0x2779fd=_0x89d74c||_0x29ed57[0x0]?.[_0x5d3a19(0x148)]||_0x5d3a19(0x168);let _0x55a31f=_0x24331d['replace'](/\{AppCode\}/g,_0x1e59d3)[_0x5d3a19(0x15a)](/\{ModelConfigs\}/g,_0xd53cb2)[_0x5d3a19(0x15a)](/\{ExampleModelName\}/g,_0x2779fd)[_0x5d3a19(0x15a)](/\{ApiFileName\}/g,_0x39c375||_0x5d3a19(0x179))[_0x5d3a19(0x15a)](/\{ConfigName\}/g,_0x130e17||_0x5d3a19(0x147))['replace'](/\{ClientConfigParam\}/g,_0x689eda||'')[_0x5d3a19(0x15a)](/\{SdkConfigFileName\}/g,_0x56a929||_0x5d3a19(0x175))[_0x5d3a19(0x15a)](/\{VarPrefix\}/g,_0x18f774||_0x5d3a19(0x178))[_0x5d3a19(0x15a)](/\{CreatedAt\}/g,_0x4f5f17);return _0x55a31f;}static async[a371_0x2fdddb(0x17b)](_0x2785a7,_0x27d9c4,_0xf04343,_0x455b31,_0x5be2b2=!![]){const _0x18d842=a371_0x2fdddb,_0xfabf12=Date[_0x18d842(0x16a)]();try{_0x5be2b2&&logger[_0x18d842(0x149)](_0x18d842(0x164),_0x18d842(0x143),{'templatePath':_0x2785a7,'targetPath':_0x27d9c4,'pageName':_0xf04343,'templateName':_0x455b31});await a371_0x3a3eed[_0x18d842(0x160)][_0x18d842(0x150)](_0x27d9c4,{'recursive':!![]}),await this[_0x18d842(0x183)](_0x2785a7,_0x27d9c4,_0xf04343,_0x455b31);if(_0x5be2b2){const _0xf9abc=Date[_0x18d842(0x16a)]()-_0xfabf12;logger[_0x18d842(0x185)](_0x18d842(0x164),_0x18d842(0x166),_0xf9abc,{'pageName':_0xf04343,'templateName':_0x455b31});}}catch(_0x470c18){if(_0x5be2b2){const _0x5ca2e0=Date['now']()-_0xfabf12;logger[_0x18d842(0x159)](_0x18d842(0x164),_0x18d842(0x158),{'templatePath':_0x2785a7,'targetPath':_0x27d9c4,'pageName':_0xf04343,'templateName':_0x455b31,'error':_0x470c18 instanceof Error?_0x470c18['message']:String(_0x470c18),'duration':_0x5ca2e0});}throw _0x470c18;}}static async[a371_0x2fdddb(0x183)](_0x5f1ca5,_0xbaf3b5,_0x121387,_0x446475){const _0x233f8f=a371_0x2fdddb,_0x1f059c=await a371_0x3a3eed[_0x233f8f(0x160)]['readdir'](_0x5f1ca5,{'withFileTypes':!![]});for(const _0x525714 of _0x1f059c){const _0x10b3a8=a371_0x3c8ee6[_0x233f8f(0x16c)](_0x5f1ca5,_0x525714[_0x233f8f(0x153)]);let _0x3cb8d8=a371_0x3c8ee6['join'](_0xbaf3b5,_0x525714[_0x233f8f(0x153)]);_0x525714['name'][_0x233f8f(0x162)](_0x233f8f(0x176))&&(_0x3cb8d8=a371_0x3c8ee6[_0x233f8f(0x16c)](_0xbaf3b5,_0x525714[_0x233f8f(0x153)]['replace'](/\.tpl$/,'')));if(_0x525714[_0x233f8f(0x17e)]())await a371_0x3a3eed['promises'][_0x233f8f(0x150)](_0x3cb8d8,{'recursive':!![]}),await this[_0x233f8f(0x183)](_0x10b3a8,_0x3cb8d8,_0x121387,_0x446475);else _0x525714[_0x233f8f(0x174)]()&&await this['processFile'](_0x10b3a8,_0x3cb8d8,_0x121387,_0x446475);}}static async[a371_0x2fdddb(0x140)](_0x51501f,_0x432214,_0x5e5692,_0x455811){const _0x3a50e1=a371_0x2fdddb,_0x62963a=a371_0x3c8ee6[_0x3a50e1(0x15f)](_0x51501f)['toLowerCase']();_0x51501f['endsWith']('.tpl')&&(_0x432214=_0x432214[_0x3a50e1(0x15a)](/\.tpl$/,''));const _0x32b102=[_0x3a50e1(0x14c),'.ts',_0x3a50e1(0x16f),_0x3a50e1(0x163),_0x3a50e1(0x181),'.md',_0x3a50e1(0x14f),_0x3a50e1(0x155),_0x3a50e1(0x176)];if(_0x32b102[_0x3a50e1(0x172)](_0x62963a)||_0x51501f[_0x3a50e1(0x162)](_0x3a50e1(0x176))){const _0x35899a=await a371_0x3a3eed['promises'][_0x3a50e1(0x186)](_0x51501f,'utf8'),_0x448524=this[_0x3a50e1(0x16d)](_0x35899a,_0x5e5692,_0x455811);await a371_0x3a3eed[_0x3a50e1(0x160)][_0x3a50e1(0x173)](_0x432214,_0x448524,_0x3a50e1(0x171));}else await a371_0x3a3eed[_0x3a50e1(0x160)][_0x3a50e1(0x169)](_0x51501f,_0x432214);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a372_0x8aae(_0x2524a8,_0x15ae1a){_0x2524a8=_0x2524a8-0x1ec;const _0x37241a=a372_0x3724();let _0x8aae56=_0x37241a[_0x2524a8];return _0x8aae56;}(function(_0x168a66,_0x3508e4){const _0x1999d4=a372_0x8aae,_0x228807=_0x168a66();while(!![]){try{const _0x79538b=parseInt(_0x1999d4(0x204))/0x1*(-parseInt(_0x1999d4(0x1fb))/0x2)+parseInt(_0x1999d4(0x201))/0x3*(-parseInt(_0x1999d4(0x1f3))/0x4)+parseInt(_0x1999d4(0x1fc))/0x5+-parseInt(_0x1999d4(0x1f6))/0x6+-parseInt(_0x1999d4(0x1ec))/0x7+parseInt(_0x1999d4(0x1f2))/0x8+parseInt(_0x1999d4(0x203))/0x9;if(_0x79538b===_0x3508e4)break;else _0x228807['push'](_0x228807['shift']());}catch(_0x4995a6){_0x228807['push'](_0x228807['shift']());}}}(a372_0x3724,0x31238));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a372_0x46a113 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x3b80ea=a372_0x8aae,_0x20580b=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x3b80ea(0x1ed)]()[_0x3b80ea(0x1ee)]();return _0x20580b==='1'||_0x20580b===_0x3b80ea(0x1fa)||_0x20580b==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x509cbd=a372_0x8aae;return join(cacheRoot(),_0x509cbd(0x1fe),_0x509cbd(0x202));}function a372_0x3724(){const _0x43052c=['rabetbase-cli','/v/',',\x20run:\x20','18aGmYgO','update-check.json','7683759HAMseW','6kBWAFs','2193821kxiQcV','trim','toLowerCase','stringify','latest','utf8','834848QWyLxt','24796WXSXFK','object','valid','965154iFvVKL','lastNotifiedAt','checkedAt','now','true','116526lCCenv','520995LIkJlL','number'];a372_0x3724=function(){return _0x43052c;};return a372_0x3724();}async function readUpdateNoticeCache(){const _0x21ec8e=a372_0x8aae;try{const _0xf387bd=await readFile(getUpdateNoticeCachePath(),_0x21ec8e(0x1f1)),_0x5f0212=JSON['parse'](_0xf387bd);if(!_0x5f0212||typeof _0x5f0212!==_0x21ec8e(0x1f4))return{};return _0x5f0212;}catch{return{};}}async function writeUpdateNoticeCache(_0x558a75){const _0x5a1e2d=a372_0x8aae;try{const _0xe01880=getUpdateNoticeCachePath();await mkdir(dirname(_0xe01880),{'recursive':!![]}),await writeFile(_0xe01880,JSON[_0x5a1e2d(0x1ef)](_0x558a75,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x535297,_0x1f7024){const _0x4832a0=a372_0x8aae;return typeof _0x535297[_0x4832a0(0x1f8)]===_0x4832a0(0x1fd)&&_0x1f7024-_0x535297['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x2efa24,_0x5a92ae,_0xde4634){const _0x11816d=a372_0x8aae;return _0x2efa24['lastNotifiedVersion']===_0x5a92ae&&typeof _0x2efa24[_0x11816d(0x1f7)]==='number'&&_0xde4634-_0x2efa24['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x250e3d){const _0x59ae81=a372_0x8aae;return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+_0x59ae81(0x1ff)+_0x250e3d;}export async function resolveLatestUpdateNotice(){const _0x5890af=a372_0x8aae;if(isUpdateNoticeDisabled())return null;try{const _0x2d0e33=Date[_0x5890af(0x1f9)](),_0x266463=getCliVersion(),_0x6818c5=await readUpdateNoticeCache();let _0x105d48=isFreshCheck(_0x6818c5,_0x2d0e33)?_0x6818c5[_0x5890af(0x1f0)]?.[_0x5890af(0x1ed)]():undefined;if(!_0x105d48&&!isFreshCheck(_0x6818c5,_0x2d0e33)){const _0x2e351b=await getCliVersionPolicy();_0x105d48=_0x2e351b?.['stableVersion']?.[_0x5890af(0x1ed)]()||undefined,await writeUpdateNoticeCache({..._0x6818c5,'checkedAt':_0x2d0e33,'latest':_0x105d48,'failed':!_0x105d48});}if(!_0x105d48||!a372_0x46a113[_0x5890af(0x1f5)](_0x266463)||!a372_0x46a113[_0x5890af(0x1f5)](_0x105d48))return null;if(a372_0x46a113['gte'](_0x266463,_0x105d48))return null;if(isRecentlyNotified(_0x6818c5,_0x105d48,_0x2d0e33))return null;const _0x1d9c40=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x6818c5,'checkedAt':isFreshCheck(_0x6818c5,_0x2d0e33)?_0x6818c5['checkedAt']:_0x2d0e33,'latest':_0x105d48,'failed':![],'lastNotifiedVersion':_0x105d48,'lastNotifiedAt':_0x2d0e33}),{'command':_0x1d9c40,'current':_0x266463,'latest':_0x105d48,'url':buildNpmVersionUrl(_0x105d48),'message':CLI_BIN_NAME+'\x20'+_0x105d48+'\x20available,\x20current\x20'+_0x266463+_0x5890af(0x200)+_0x1d9c40};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a373_0x2785(_0x171254,_0x49eea4){_0x171254=_0x171254-0xb1;var _0xe78be4=a373_0xe78b();var _0x278581=_0xe78be4[_0x171254];return _0x278581;}(function(_0x5664e9,_0x54aff3){var _0x2812f6=a373_0x2785,_0x4dcbb0=_0x5664e9();while(!![]){try{var _0x4aadb6=-parseInt(_0x2812f6(0xb2))/0x1*(-parseInt(_0x2812f6(0xb3))/0x2)+parseInt(_0x2812f6(0xb8))/0x3+parseInt(_0x2812f6(0xb7))/0x4+parseInt(_0x2812f6(0xb9))/0x5+parseInt(_0x2812f6(0xb5))/0x6*(-parseInt(_0x2812f6(0xb1))/0x7)+parseInt(_0x2812f6(0xb4))/0x8+-parseInt(_0x2812f6(0xb6))/0x9;if(_0x4aadb6===_0x54aff3)break;else _0x4dcbb0['push'](_0x4dcbb0['shift']());}catch(_0x1f67cb){_0x4dcbb0['push'](_0x4dcbb0['shift']());}}}(a373_0xe78b,0x7c222));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a373_0xe78b(){var _0x3823fc=['253220IvzIiz','7WDGegp','164143zRlpwN','10KbjbPO','5177048RnJCBm','2692446wTFOYL','18441207cPbHqn','3524152ICpiZE','1820058FHGRhQ'];a373_0xe78b=function(){return _0x3823fc;};return a373_0xe78b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a374_0x68ac(_0x2eb670,_0x5601df){_0x2eb670=_0x2eb670-0x1e5;var _0x2d9ce7=a374_0x2d9c();var _0x68ac8a=_0x2d9ce7[_0x2eb670];return _0x68ac8a;}(function(_0x181ef9,_0x2153d9){var _0x521e80=a374_0x68ac,_0x374a3f=_0x181ef9();while(!![]){try{var _0x32daf7=parseInt(_0x521e80(0x1e8))/0x1+parseInt(_0x521e80(0x1eb))/0x2*(parseInt(_0x521e80(0x1e5))/0x3)+-parseInt(_0x521e80(0x1e6))/0x4*(parseInt(_0x521e80(0x1ee))/0x5)+parseInt(_0x521e80(0x1e7))/0x6+parseInt(_0x521e80(0x1ec))/0x7+parseInt(_0x521e80(0x1ea))/0x8*(-parseInt(_0x521e80(0x1ed))/0x9)+-parseInt(_0x521e80(0x1e9))/0xa;if(_0x32daf7===_0x2153d9)break;else _0x374a3f['push'](_0x374a3f['shift']());}catch(_0xc47eb7){_0x374a3f['push'](_0x374a3f['shift']());}}}(a374_0x2d9c,0x1f9d2));function a374_0x2d9c(){var _0x5255d1=['839398PPAcgZ','9CcEeNb','5GgrsTO','519rplFqd','408824qHnZCs','1498770TFjMVv','192952fGJWns','3297900mRaSnf','1112448aCUFiP','1594YFlLqY'];a374_0x2d9c=function(){return _0x5255d1;};return a374_0x2d9c();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x405bc9,_0x50cdd1){setActiveCookie(_0x405bc9);try{return await _0x50cdd1();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a375_0x20c5(){var _0x5e3f2c=['7231fzSXuo','504975zLWRCT','18JnxREc','7134680fZJBgI','2361504lKVRWR','write','4646164AhXKrg','1339308NAEtfL','4326NJIuVE','424829RrFRbM'];a375_0x20c5=function(){return _0x5e3f2c;};return a375_0x20c5();}(function(_0x267036,_0x2c6124){var _0x39aa02=a375_0x85be,_0x57165f=_0x267036();while(!![]){try{var _0x5414b6=parseInt(_0x39aa02(0x68))/0x1+parseInt(_0x39aa02(0x70))/0x2+parseInt(_0x39aa02(0x6d))/0x3+parseInt(_0x39aa02(0x6f))/0x4+parseInt(_0x39aa02(0x6a))/0x5+parseInt(_0x39aa02(0x67))/0x6*(-parseInt(_0x39aa02(0x69))/0x7)+-parseInt(_0x39aa02(0x6c))/0x8*(parseInt(_0x39aa02(0x6b))/0x9);if(_0x5414b6===_0x2c6124)break;else _0x57165f['push'](_0x57165f['shift']());}catch(_0x262cd4){_0x57165f['push'](_0x57165f['shift']());}}}(a375_0x20c5,0x9652c));function a375_0x85be(_0x124925,_0x600851){_0x124925=_0x124925-0x67;var _0x20c52c=a375_0x20c5();var _0x85bea8=_0x20c52c[_0x124925];return _0x85bea8;}export function writeCliSideChannelLine(_0x5c5c5d){var _0x318406=a375_0x85be;process['stderr'][_0x318406(0x6e)](_0x5c5c5d+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.10-beta.
|
|
3
|
+
"version": "2.5.10-beta.3",
|
|
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": [
|
|
@@ -98,8 +98,9 @@
|
|
|
98
98
|
],
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@inquirer/prompts": "^8.3.2",
|
|
101
|
-
"@lovrabet/cli-framework": "1.0.
|
|
101
|
+
"@lovrabet/cli-framework": "1.0.6-beta.1",
|
|
102
102
|
"@lovrabet/otel-logger": "1.0.1-beta.5",
|
|
103
|
+
"@lovrabet/sdk": "1.6.1-beta.7",
|
|
103
104
|
"@opentelemetry/api": "^1.9.1",
|
|
104
105
|
"chalk": "^5.6.2",
|
|
105
106
|
"execa": "^9.6.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.10-beta.
|
|
3
|
+
version: 2.5.10-beta.3
|
|
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:
|
|
@@ -352,7 +352,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
352
352
|
| 绑定当前用户的飞书账号 | [`rabetbase user-account feishu-bind`](references/rabetbase-user-account.md) | `write`;先 `--dry-run` 核对 union_id;不需要 appCode;仅声明绑定,不验证账号归属 |
|
|
353
353
|
| 绑定当前用户的钉钉沙箱账号 | [`rabetbase user-account dingding-sandbox-bind`](references/rabetbase-user-account.md) | `write`;先 `--dry-run` 核对 ID,正式执行不要求 `--yes`;不需要 appCode |
|
|
354
354
|
| 诊断配置问题 | [`rabetbase doctor`](references/rabetbase-doctor.md) | Built-in Skill 一致性、合并配置、各侧 JSON 语法、域名、认证状态 |
|
|
355
|
-
|
|
|
355
|
+
| 上报问题日志 | [`rabetbase issue report`](references/rabetbase-issue-report.md) | 整理复现步骤、错误信息等完整客观事实并提交问题日志 |
|
|
356
356
|
| 上传应用文件 | [`rabetbase file upload`](references/rabetbase-file.md) | 返回可持久保存的 `filePath` |
|
|
357
357
|
| 获取文件访问链接 | [`rabetbase file query-url`](references/rabetbase-file.md) | 默认短效;Markdown/HTML URL-only 内容显式加 `--long-term` |
|
|
358
358
|
| 提取票证类业务材料的文字与结构化字段 | [`rabetbase ocr recognize`](references/rabetbase-ocr.md) | 发票、票据、证照等;不用于通用图片理解 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# issue report
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
提交问题日志,供后续排查。description 的核心是完整组织客观事实,包括复现步骤、实际结果、期望结果和可用证据。
|
|
4
4
|
|
|
5
5
|
> **前置条件:** 已通过 `rabetbase auth login` 完成认证;未登录时命令返回 `auth_required`。
|
|
6
6
|
|
|
@@ -99,6 +99,9 @@ rabetbase issue report --title "page push 保存失败" --description-file /tmp/
|
|
|
99
99
|
|
|
100
100
|
## 行为说明
|
|
101
101
|
|
|
102
|
+
- `Issue log submitted` 表示问题日志已提交
|
|
103
|
+
- `--dry-run` 不发送日志、不查询当前用户信息;标题和自动附带上下文也执行脱敏
|
|
104
|
+
|
|
102
105
|
- 命令会自动补充 CLI 宿主公共上下文,不需要手动重复传入环境或用户字段
|
|
103
106
|
- `--description-file` 只是本地输入来源;命令会先读取文件内容,最终上报的是 `issue.description` 的 Markdown 文本,不是本机文件路径
|
|
104
107
|
- 命令不会自动附带 Agent 对话、工具历史或工作目录文件;只有显式写入 `--description` / `--description-file` 的事实会进入上报正文
|