@lovrabet/rabetbase-cli 2.5.8-beta.2 → 2.5.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.d.ts +8 -5
- 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.d.ts +5 -3
- 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 +14 -11
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -6
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a358_0x26bc2a=a358_0x2cba;(function(_0x1b0a0b,_0x181b28){const _0x454338=a358_0x2cba,_0x11c165=_0x1b0a0b();while(!![]){try{const _0x590979=-parseInt(_0x454338(0x1ed))/0x1+parseInt(_0x454338(0x1ee))/0x2*(-parseInt(_0x454338(0x1fd))/0x3)+parseInt(_0x454338(0x1e1))/0x4*(-parseInt(_0x454338(0x1e2))/0x5)+-parseInt(_0x454338(0x1e0))/0x6+-parseInt(_0x454338(0x1f2))/0x7*(parseInt(_0x454338(0x1e3))/0x8)+parseInt(_0x454338(0x1e4))/0x9*(-parseInt(_0x454338(0x1f9))/0xa)+-parseInt(_0x454338(0x207))/0xb*(-parseInt(_0x454338(0x1f1))/0xc);if(_0x590979===_0x181b28)break;else _0x11c165['push'](_0x11c165['shift']());}catch(_0x300931){_0x11c165['push'](_0x11c165['shift']());}}}(a358_0x2fac,0x69c45));import a358_0xd43d22 from'node:fs';import a358_0x4c9266 from'node:path';function a358_0x2cba(_0x6cb91c,_0xdf5724){_0x6cb91c=_0x6cb91c-0x1e0;const _0x2fac62=a358_0x2fac();let _0x2cba1f=_0x2fac62[_0x6cb91c];return _0x2cba1f;}import a358_0x786e81 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a358_0x26bc2a(0x200);function isNonNumericVersion(_0x1589dd){const _0x1d87bd=a358_0x26bc2a,_0x2e91e9=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2e91e9[_0x1d87bd(0x1ea)](_0x48a387=>_0x48a387[_0x1d87bd(0x1fe)](_0x1589dd));}function getInstalledVersion(_0x1abc87,_0x5cefb2){const _0x54b12d=a358_0x26bc2a;try{const _0x4568d6=a358_0x4c9266[_0x54b12d(0x203)](_0x1abc87,_0x54b12d(0x1e8),_0x5cefb2,'package.json');if(a358_0xd43d22[_0x54b12d(0x1f0)](_0x4568d6)){const _0x4a7648=JSON[_0x54b12d(0x1f6)](a358_0xd43d22[_0x54b12d(0x1ec)](_0x4568d6,'utf-8'));return _0x4a7648[_0x54b12d(0x1e7)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x3fa7e1=a358_0x26bc2a;try{const _0x6b54ac=await getCdnConfig();return _0x6b54ac?.['sdk']?.[_0x3fa7e1(0x206)]?.[_0x3fa7e1(0x1f5)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x1a1ad9=a358_0x26bc2a;try{const _0x169b2a=await getCdnConfig();return _0x169b2a?.[_0x1a1ad9(0x1e5)]?.['node']?.['packageName']||_0x1a1ad9(0x1fc);}catch{return _0x1a1ad9(0x1fc);}}export async function checkSdkVersion(_0x3c5d36){const _0x34a073=a358_0x26bc2a,_0x514482=a358_0x4c9266[_0x34a073(0x203)](_0x3c5d36,_0x34a073(0x202)),[_0x4c635d,_0x388e62]=await Promise[_0x34a073(0x1f4)]([getSdkStableVersion(),getSdkPackageName()]),_0x25d93f=_0x4c635d||FALLBACK_MIN_SDK_VERSION;if(!a358_0xd43d22[_0x34a073(0x1f0)](_0x514482))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x25d93f,'packageName':_0x388e62,'stableVersion':_0x4c635d};try{const _0x39d8df=JSON[_0x34a073(0x1f6)](a358_0xd43d22[_0x34a073(0x1ec)](_0x514482,_0x34a073(0x1ff))),_0x5ac1e3=_0x39d8df[_0x34a073(0x1f7)]||{},_0x40bcb8=_0x39d8df[_0x34a073(0x1fa)]||{},_0x2d633d=_0x5ac1e3[_0x388e62]||_0x40bcb8[_0x388e62];if(!_0x2d633d)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x25d93f,'packageName':_0x388e62,'stableVersion':_0x4c635d};let _0x45c6e8=getInstalledVersion(_0x3c5d36,_0x388e62);!_0x45c6e8&&(_0x45c6e8=_0x2d633d);if(isNonNumericVersion(_0x2d633d))return{'installed':!![],'version':_0x45c6e8,'needsUpgrade':![],'minVersion':_0x25d93f,'packageName':_0x388e62,'stableVersion':_0x4c635d};const _0x1373dc=a358_0x786e81[_0x34a073(0x1e9)](_0x45c6e8),_0x412403=a358_0x786e81[_0x34a073(0x1e9)](_0x25d93f),_0x8d26c7=_0x1373dc&&_0x412403?a358_0x786e81['lt'](_0x1373dc,_0x412403):![];return{'installed':!![],'version':_0x45c6e8,'needsUpgrade':_0x8d26c7,'minVersion':_0x25d93f,'packageName':_0x388e62,'stableVersion':_0x4c635d};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x25d93f,'packageName':_0x388e62,'stableVersion':_0x4c635d};}}function a358_0x2fac(){const _0x1413cb=['\x20\x20\x20Upgrade\x20command:\x20','all','stableVersion','parse','dependencies','packageName','235380zljfCW','devDependencies','npm\x20install\x20','@lovrabet/sdk','3EYzoBP','test','utf8','1.2.0','\x20\x20\x20Stable\x20version:\x20','package.json','join','↪\x20SDK\x20update\x20available','\x1b[33m','node','19540378jylWIn','3034512vKmeKM','1822768ouKBBy','5MUfKyq','2368awpicW','153HRnKzw','sdk','needsUpgrade','version','node_modules','coerce','some','log','readFileSync','770474qjBGiW','585006asirUB','\x1b[0m','existsSync','24vPIMbl','16436lDWKOZ'];a358_0x2fac=function(){return _0x1413cb;};return a358_0x2fac();}export function checkSdkVersionSync(_0x158804){const _0x216826=a358_0x26bc2a,_0x4561ad=a358_0x4c9266[_0x216826(0x203)](_0x158804,_0x216826(0x202)),_0x1fcaf5=_0x216826(0x1fc);if(!a358_0xd43d22[_0x216826(0x1f0)](_0x4561ad))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fcaf5,'stableVersion':null};try{const _0x5bcee3=JSON[_0x216826(0x1f6)](a358_0xd43d22[_0x216826(0x1ec)](_0x4561ad,_0x216826(0x1ff))),_0x8f87ed=_0x5bcee3['dependencies']||{},_0x3bca2f=_0x5bcee3['devDependencies']||{},_0x4c2b2e=_0x8f87ed[_0x1fcaf5]||_0x3bca2f[_0x1fcaf5];if(!_0x4c2b2e)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fcaf5,'stableVersion':null};let _0xdf95a8=getInstalledVersion(_0x158804,_0x1fcaf5);!_0xdf95a8&&(_0xdf95a8=_0x4c2b2e);if(isNonNumericVersion(_0x4c2b2e))return{'installed':!![],'version':_0xdf95a8,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fcaf5,'stableVersion':null};const _0x301982=a358_0x786e81[_0x216826(0x1e9)](_0xdf95a8),_0x38b7ce=_0x301982?a358_0x786e81['lt'](_0x301982,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xdf95a8,'needsUpgrade':_0x38b7ce,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fcaf5,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fcaf5,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x357dfd){const _0x86b911=a358_0x26bc2a;if(!_0x357dfd[_0x86b911(0x1e6)])return;const _0x18ef05=_0x86b911(0x205),_0x2a9008=_0x86b911(0x1ef),_0x4bc210='\x1b[1m',_0x476185=_0x357dfd[_0x86b911(0x1f8)]||'@lovrabet/sdk',_0x3ef9ec=_0x357dfd[_0x86b911(0x1f5)]||_0x357dfd['minVersion'],_0x334500=_0x86b911(0x1fb)+_0x476185+'@'+(_0x3ef9ec||'latest');console[_0x86b911(0x1eb)](),console[_0x86b911(0x1eb)](''+_0x18ef05+_0x4bc210+_0x86b911(0x204)+_0x2a9008),console[_0x86b911(0x1eb)](_0x18ef05+'\x20\x20\x20Current\x20version:\x20'+_0x476185+'@'+_0x357dfd[_0x86b911(0x1e7)]+_0x2a9008),console[_0x86b911(0x1eb)](_0x18ef05+_0x86b911(0x201)+_0x3ef9ec+_0x2a9008),console['log'](_0x18ef05+_0x86b911(0x1f3)+_0x334500+_0x2a9008),console[_0x86b911(0x1eb)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bd609,_0x370842){const _0x36a3f5=a359_0x59e6,_0x489df1=_0x2bd609();while(!![]){try{const _0x496394=-parseInt(_0x36a3f5(0x96))/0x1*(parseInt(_0x36a3f5(0xb4))/0x2)+parseInt(_0x36a3f5(0x99))/0x3*(-parseInt(_0x36a3f5(0xb6))/0x4)+parseInt(_0x36a3f5(0x94))/0x5*(parseInt(_0x36a3f5(0xa0))/0x6)+parseInt(_0x36a3f5(0xb5))/0x7*(parseInt(_0x36a3f5(0x90))/0x8)+-parseInt(_0x36a3f5(0x93))/0x9+parseInt(_0x36a3f5(0xaf))/0xa+parseInt(_0x36a3f5(0xb3))/0xb*(parseInt(_0x36a3f5(0x8f))/0xc);if(_0x496394===_0x370842)break;else _0x489df1['push'](_0x489df1['shift']());}catch(_0xdf7ecb){_0x489df1['push'](_0x489df1['shift']());}}}(a359_0x6618,0xeb1e6));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a359_0x884643 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a359_0x59e6(_0x417c36,_0x9c4c9e){_0x417c36=_0x417c36-0x8e;const _0x6618bd=a359_0x6618();let _0x59e610=_0x6618bd[_0x417c36];return _0x59e610;}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x426e0b){const _0x36a89b=a359_0x59e6,_0x4baddf=_0x426e0b[_0x36a89b(0xa6)]||_0x36a89b(0xae);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4baddf;}function getCurrentCliVersion(){const _0x1e0831=a359_0x59e6;try{const _0x52d813=fileURLToPath(import.meta.url),_0x2e103d=resolve(dirname(_0x52d813),_0x1e0831(0xad)),_0x5a6772=resolve(_0x2e103d,_0x1e0831(0xa8)),_0x4d394d=JSON[_0x1e0831(0x9f)](readFileSync(_0x5a6772,_0x1e0831(0x9b)));return _0x4d394d[_0x1e0831(0xb1)]||_0x1e0831(0x92);}catch{return'1.0.0';}}function a359_0x6618(){const _0x5e6597=['301DfqQYj','308224zXZwlA','\x20\x20\x20Stable\x20version:\x20','180xnTeZE','135416khemGp','↪\x20New\x20version\x20available','1.0.0','10315125KqzpuP','265ZftymP','\x1b[33m','575963msYhpx','coerce','\x1b[1m','54tboaUu','\x1b[31m','utf-8','needsUpgrade','minimumVersionMessage','filter','parse','147102vvAYlX','\x1b[0m','minimumVersion','upgradeMessage','\x20\x20\x20Minimum\x20supported:\x20','\x20\x20\x20Upgrade\x20command:\x20','stableVersion','join','package.json','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','belowMinimum','log','\x20\x20\x20Current\x20CLI\x20version:\x20','../..','latest','10355910WGfYxx','validation','version','currentVersion','1584891lLfzpI','6YBmsQg'];a359_0x6618=function(){return _0x5e6597;};return a359_0x6618();}export async function checkCliVersion(){const _0x1531f9=a359_0x59e6,_0x549669=getCurrentCliVersion(),_0x33f3c6=await getCliVersionPolicy(),_0x2b00c1=_0x33f3c6?.[_0x1531f9(0xa6)]||null,_0x2fc7cd=_0x33f3c6?.[_0x1531f9(0xa2)]||null;let _0x118c46=![],_0x4f74df=![];const _0x95eadd=a359_0x884643['coerce'](_0x549669);if(_0x95eadd&&_0x2b00c1)try{const _0x1eacaa=a359_0x884643[_0x1531f9(0x97)](_0x2b00c1);if(_0x1eacaa)_0x118c46=a359_0x884643['lt'](_0x95eadd,_0x1eacaa);}catch{}if(_0x95eadd&&_0x2fc7cd)try{const _0x15cc89=a359_0x884643['coerce'](_0x2fc7cd);if(_0x15cc89)_0x4f74df=a359_0x884643['lt'](_0x95eadd,_0x15cc89);}catch{}return _0x4f74df&&(_0x118c46=!![]),{'currentVersion':_0x549669,'stableVersion':_0x2b00c1,'minimumVersion':_0x2fc7cd,'needsUpgrade':_0x118c46,'belowMinimum':_0x4f74df,'isPreRelease':![],'upgradeMessage':_0x33f3c6?.[_0x1531f9(0xa3)],'minimumVersionMessage':_0x33f3c6?.[_0x1531f9(0x9d)]};}export function printCliUpgradeWarning(_0x39e844){const _0x305309=a359_0x59e6;if(!_0x39e844[_0x305309(0x9c)]&&!_0x39e844[_0x305309(0xaa)])return;const _0x2e7a50=_0x305309(0x9a),_0x390ddd=_0x305309(0x95),_0x26698a=_0x305309(0xa1),_0x12a4c7=_0x305309(0x98),_0x423081=getCliUpgradeCommand(_0x39e844);console[_0x305309(0xab)](),_0x39e844[_0x305309(0xaa)]?(console[_0x305309(0xab)](''+_0x2e7a50+_0x12a4c7+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x26698a),console[_0x305309(0xab)](_0x2e7a50+_0x305309(0xac)+_0x39e844[_0x305309(0xb2)]+_0x26698a),_0x39e844['minimumVersion']&&console['log'](_0x2e7a50+_0x305309(0xa4)+_0x39e844[_0x305309(0xa2)]+_0x26698a),_0x39e844[_0x305309(0xa6)]&&_0x39e844[_0x305309(0xa6)]!==_0x39e844[_0x305309(0xa2)]&&console[_0x305309(0xab)](_0x2e7a50+'\x20\x20\x20Recommended\x20stable:\x20'+_0x39e844['stableVersion']+_0x26698a),_0x39e844['minimumVersionMessage']&&console['log'](_0x2e7a50+'\x20\x20\x20'+_0x39e844[_0x305309(0x9d)]+_0x26698a),console[_0x305309(0xab)](_0x2e7a50+_0x305309(0xa5)+_0x423081+_0x26698a)):(console[_0x305309(0xab)](''+_0x390ddd+_0x12a4c7+_0x305309(0x91)+_0x26698a),console[_0x305309(0xab)](_0x390ddd+_0x305309(0xac)+_0x39e844['currentVersion']+_0x26698a),console[_0x305309(0xab)](_0x390ddd+_0x305309(0x8e)+_0x39e844['stableVersion']+_0x26698a),_0x39e844[_0x305309(0xa3)]&&console['log'](_0x390ddd+'\x20\x20\x20'+_0x39e844['upgradeMessage']+_0x26698a),console[_0x305309(0xab)](_0x390ddd+_0x305309(0xa5)+_0x423081+_0x26698a)),console[_0x305309(0xab)]();}export function assertCliVersionSupported(_0x9a051c){const _0x245981=a359_0x59e6;if(!_0x9a051c[_0x245981(0xaa)])return;const _0x110a18=[_0x9a051c[_0x245981(0x9d)],'Current\x20version:\x20'+_0x9a051c[_0x245981(0xb2)],_0x9a051c[_0x245981(0xa2)]?'Minimum\x20supported:\x20'+_0x9a051c[_0x245981(0xa2)]:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x9a051c)][_0x245981(0x9e)](Boolean)[_0x245981(0xa7)]('\x0a');throw CliErrors[_0x245981(0xb0)](_0x245981(0xa9),_0x110a18);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x295999,_0x5f32b3){const _0x2781b4=a360_0x3379,_0x22fc41=_0x295999();while(!![]){try{const _0x1b73f0=parseInt(_0x2781b4(0x1a4))/0x1*(-parseInt(_0x2781b4(0x1a3))/0x2)+parseInt(_0x2781b4(0x19c))/0x3+-parseInt(_0x2781b4(0x19d))/0x4+-parseInt(_0x2781b4(0x196))/0x5+parseInt(_0x2781b4(0x19a))/0x6+parseInt(_0x2781b4(0x199))/0x7*(parseInt(_0x2781b4(0x1a1))/0x8)+-parseInt(_0x2781b4(0x192))/0x9;if(_0x1b73f0===_0x5f32b3)break;else _0x22fc41['push'](_0x22fc41['shift']());}catch(_0x5a8ed1){_0x22fc41['push'](_0x22fc41['shift']());}}}(a360_0x24d6,0xc6c44));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a360_0x3ec43d from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x3d2c24){const _0x210024=a360_0x3379,_0x431e1d=a360_0x3ec43d[_0x210024(0x193)](_0x3d2c24);return _0x431e1d?a360_0x3ec43d[_0x210024(0x19f)](_0x431e1d)?.[0x0]===_0x210024(0x1a7):![];}export function resolveProjectTemplateDescriptor(_0x1e340a,_0x905053){const _0xb6999=a360_0x3379;if(isBetaCliVersion(_0x905053))return _0x1e340a[_0xb6999(0x1a7)]?.['projectTemplate']??_0x1e340a[_0xb6999(0x19b)];return _0x1e340a['projectTemplate'];}function pickString(_0x558dce){const _0x14c608=a360_0x3379;return typeof _0x558dce===_0x14c608(0x195)&&_0x558dce['trim']()[_0x14c608(0x198)]>0x0?_0x558dce[_0x14c608(0x18f)]():null;}function normalizeCliVersionPolicy(_0x2ae244){const _0x3e7ee7=a360_0x3379;if(!_0x2ae244||typeof _0x2ae244!==_0x3e7ee7(0x1a0))return null;const _0x5cff2d=_0x2ae244,_0x45876c=_0x5cff2d[_0x3e7ee7(0x1a2)]&&typeof _0x5cff2d[_0x3e7ee7(0x1a2)]===_0x3e7ee7(0x1a0)?_0x5cff2d[_0x3e7ee7(0x1a2)]:_0x5cff2d,_0x3106e3=pickString(_0x45876c[_0x3e7ee7(0x1a8)])||pickString(_0x45876c[_0x3e7ee7(0x190)])||pickString(_0x45876c[_0x3e7ee7(0x1a5)]),_0x1efcb7=pickString(_0x45876c[_0x3e7ee7(0x19e)])||pickString(_0x45876c['minVersion']);if(!_0x3106e3&&!_0x1efcb7)return null;return{'stableVersion':_0x3106e3,'minimumVersion':_0x1efcb7,'upgradeMessage':pickString(_0x45876c['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x45876c['minimumVersionMessage'])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x29ad58){const _0x582308=a360_0x3379,_0x59dc39=new AbortController(),_0x13c1e8=setTimeout(()=>_0x59dc39['abort'](),FETCH_TIMEOUT_MS);try{const _0x365646=await fetch(_0x29ad58,{'headers':{'Accept':_0x582308(0x197)},'signal':_0x59dc39[_0x582308(0x194)]});if(!_0x365646['ok'])return null;const _0x232851=await _0x365646[_0x582308(0x1a6)]();return _0x232851&&typeof _0x232851===_0x582308(0x1a0)?_0x232851:null;}catch{return null;}finally{clearTimeout(_0x13c1e8);}}function a360_0x24d6(){const _0x23c9ee=['13188204plNUUn','valid','signal','string','1075615IyXmpk','application/json','length','14HZoBho','6925260vBIUJj','projectTemplate','3127356lmFSLQ','2692100LKnqIj','minimumVersion','prerelease','object','4400888gurXVH','cli','16AEfVjv','16154HICyHf','recommendedVersion','json','beta','stableVersion','trim','latestVersion','now'];a360_0x24d6=function(){return _0x23c9ee;};return a360_0x24d6();}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}export async function fetchProjectTemplateCdnConfig(){const _0x30f581=await getRabetbaseCdnConfig();return _0x30f581?{'config':_0x30f581,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x1b8a9b=a360_0x3379,_0x4f139b=Date[_0x1b8a9b(0x191)]();if(hasCachedConfig){const _0x591223=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x4f139b-cacheTime<_0x591223)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x4f139b,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}function a360_0x3379(_0x75825c,_0x4955fd){_0x75825c=_0x75825c-0x18f;const _0x24d648=a360_0x24d6();let _0x33795e=_0x24d648[_0x75825c];return _0x33795e;}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x128b1f,_0x5af5fc){const _0x3eed22=a361_0x520c,_0x433798=_0x128b1f();while(!![]){try{const _0x16c443=parseInt(_0x3eed22(0x1d9))/0x1*(-parseInt(_0x3eed22(0x1e4))/0x2)+parseInt(_0x3eed22(0x1e5))/0x3*(-parseInt(_0x3eed22(0x1dc))/0x4)+-parseInt(_0x3eed22(0x1db))/0x5+parseInt(_0x3eed22(0x1da))/0x6*(-parseInt(_0x3eed22(0x1e3))/0x7)+parseInt(_0x3eed22(0x1de))/0x8+parseInt(_0x3eed22(0x1e2))/0x9+-parseInt(_0x3eed22(0x1dd))/0xa*(-parseInt(_0x3eed22(0x1df))/0xb);if(_0x16c443===_0x5af5fc)break;else _0x433798['push'](_0x433798['shift']());}catch(_0xb2eb93){_0x433798['push'](_0x433798['shift']());}}}(a361_0x12f4,0xb4ad5));function a361_0x520c(_0x4bf528,_0x4cb6a5){_0x4bf528=_0x4bf528-0x1d9;const _0x12f49a=a361_0x12f4();let _0x520cb4=_0x12f49a[_0x4bf528];return _0x520cb4;}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a361_0x3a0eca,getMultiAppConfigs as a361_0x374981,getTemplateBaseUrl as a361_0x26bd3a}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a361_0x12f4(){const _0x1dd7dc=['2583155TnusLJ','560KAkYPJ','2410feLQXe','3841536zVwnIx','31834drpzxG','string','env','12106260YImZUp','7cASfsO','6lNGACU','9951YJyyHA','238937JEUSso','509466MkUNlk'];a361_0x12f4=function(){return _0x1dd7dc;};return a361_0x12f4();}export function readConfig(_0x5ead95){const _0x4a0553=a361_0x520c,_0x58794f=readRawConfig(_0x5ead95);return _0x58794f[_0x4a0553(0x1e1)]&&typeof _0x58794f[_0x4a0553(0x1e1)]===_0x4a0553(0x1e0)&&initEnv(_0x58794f[_0x4a0553(0x1e1)]),_0x58794f;}export function getConfigAppCode(){return a361_0x3a0eca();}export function getMultiAppConfigs(_0x5c8575='project'){return a361_0x374981(_0x5c8575);}export function getTemplateBaseUrl(){return a361_0x26bd3a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5981d0,_0x304298){const _0x8e51fd=a362_0x22ea,_0x2da28e=_0x5981d0();while(!![]){try{const _0x480e3b=-parseInt(_0x8e51fd(0x124))/0x1+-parseInt(_0x8e51fd(0x11b))/0x2*(parseInt(_0x8e51fd(0x11d))/0x3)+-parseInt(_0x8e51fd(0x117))/0x4*(parseInt(_0x8e51fd(0x11e))/0x5)+-parseInt(_0x8e51fd(0x11a))/0x6+-parseInt(_0x8e51fd(0x121))/0x7+-parseInt(_0x8e51fd(0x11f))/0x8*(parseInt(_0x8e51fd(0x123))/0x9)+parseInt(_0x8e51fd(0x118))/0xa*(parseInt(_0x8e51fd(0x122))/0xb);if(_0x480e3b===_0x304298)break;else _0x2da28e['push'](_0x2da28e['shift']());}catch(_0x398407){_0x2da28e['push'](_0x2da28e['shift']());}}}(a362_0x2cfa,0xd5099));function toFiniteNumber(_0x49fb7c){const _0x20f4a3=a362_0x22ea;if(typeof _0x49fb7c===_0x20f4a3(0x120)&&Number['isFinite'](_0x49fb7c))return _0x49fb7c;if(typeof _0x49fb7c==='string'){const _0x17c167=_0x49fb7c['trim']();if(!_0x17c167)return undefined;const _0x2cb8ca=Number(_0x17c167);if(Number[_0x20f4a3(0x119)](_0x2cb8ca))return _0x2cb8ca;}return undefined;}function a362_0x2cfa(){const _0x2adf81=['number','11742353aRIYoJ','11hAAKlo','189441DmlfTR','1075012PwMQPs','748316XxCJpv','70357270BMbzOI','isFinite','7887954zLmefd','18GybNdt','object','356433IdkabY','10uybCCl','248GZReHp'];a362_0x2cfa=function(){return _0x2adf81;};return a362_0x2cfa();}function a362_0x22ea(_0x2e9302,_0x18598b){_0x2e9302=_0x2e9302-0x117;const _0x2cfa82=a362_0x2cfa();let _0x22eaa2=_0x2cfa82[_0x2e9302];return _0x22eaa2;}export function normalizeEntityWithIdResponse(_0x2849e6){const _0x4658ee=a362_0x22ea,_0x5642ba=toFiniteNumber(_0x2849e6);if(_0x5642ba!==undefined)return{'id':_0x5642ba,'entity':{'id':_0x5642ba}};if(!_0x2849e6||typeof _0x2849e6!==_0x4658ee(0x11c))return{'id':undefined,'entity':{}};const _0x4d9f9c={..._0x2849e6},_0x49c040=toFiniteNumber(_0x4d9f9c['id']);return _0x49c040!==undefined&&(_0x4d9f9c['id']=_0x49c040),{'id':_0x49c040,'entity':_0x4d9f9c};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x146c42,_0x5175a2){const _0x4251db=a363_0x2c06,_0x5d2234=_0x146c42();while(!![]){try{const _0x329c81=-parseInt(_0x4251db(0x156))/0x1+parseInt(_0x4251db(0x158))/0x2+parseInt(_0x4251db(0x159))/0x3*(parseInt(_0x4251db(0x154))/0x4)+-parseInt(_0x4251db(0x15a))/0x5+-parseInt(_0x4251db(0x155))/0x6+parseInt(_0x4251db(0x15b))/0x7+parseInt(_0x4251db(0x15c))/0x8*(parseInt(_0x4251db(0x157))/0x9);if(_0x329c81===_0x5175a2)break;else _0x5d2234['push'](_0x5d2234['shift']());}catch(_0x41c8a0){_0x5d2234['push'](_0x5d2234['shift']());}}}(a363_0x5c38,0x4da18));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a363_0x5c38(){const _0x2a0192=['2767480GcCkgY','569128ZFsPTl','120Ghyurt','145716EgjJnN','3503124rGhLzf','10836jTKLxh','288945CxqWRI','1077986NmKykZ','30hJrEqX'];a363_0x5c38=function(){return _0x2a0192;};return a363_0x5c38();}import{join}from'node:path';function a363_0x2c06(_0xd30966,_0x5a1be7){_0xd30966=_0xd30966-0x154;const _0x5c38cd=a363_0x5c38();let _0x2c061b=_0x5c38cd[_0xd30966];return _0x2c061b;}export async function copyDir(_0xee8e90,_0x60fa2){const _0x372472=statSync(_0xee8e90);if(_0x372472['isDirectory']()){!existsSync(_0x60fa2)&&mkdirSync(_0x60fa2,{'recursive':!![]});const _0x52473f=readdirSync(_0xee8e90);for(const _0x256384 of _0x52473f){await copyDir(join(_0xee8e90,_0x256384),join(_0x60fa2,_0x256384));}}else copyFileSync(_0xee8e90,_0x60fa2);}export function ensureDir(_0x86e240){!existsSync(_0x86e240)&&mkdirSync(_0x86e240,{'recursive':!![]});}export function pathExists(_0x14b1d3){return existsSync(_0x14b1d3);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a364_0x3c0181=a364_0xd300;(function(_0xd88e0a,_0x372fb0){const _0x29c407=a364_0xd300,_0x25c513=_0xd88e0a();while(!![]){try{const _0x5c755a=-parseInt(_0x29c407(0xc1))/0x1*(parseInt(_0x29c407(0xdf))/0x2)+-parseInt(_0x29c407(0xc0))/0x3*(parseInt(_0x29c407(0xe2))/0x4)+parseInt(_0x29c407(0xcd))/0x5+-parseInt(_0x29c407(0xd7))/0x6*(-parseInt(_0x29c407(0xc6))/0x7)+parseInt(_0x29c407(0xc8))/0x8*(parseInt(_0x29c407(0xe4))/0x9)+-parseInt(_0x29c407(0xbe))/0xa+parseInt(_0x29c407(0xce))/0xb;if(_0x5c755a===_0x372fb0)break;else _0x25c513['push'](_0x25c513['shift']());}catch(_0x17e47e){_0x25c513['push'](_0x25c513['shift']());}}}(a364_0xba59,0xb3b4b));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 _0x58488b=a364_0xd300,_0x3f3933=getTemplateBaseUrl();return _0x3f3933+_0x58488b(0xde);}function a364_0xba59(){const _0x369248=['4062375lOUeVZ','16433769cpVFLo','map','application/json','extendContent','cache','join','content','entries','push','11592cVFOFO','title','.md','\x0a\x0a>更新时间:','object','skillTemplate','CDN\x20request\x20failed:\x20','/skills/guides.json','2qmBjxD','CDN\x20returned\x20invalid\x20data','guides','3850784ggRgVx','.lovrabet','6602481RtjLOB','8071860myeIpL','CDN\x20data\x20is\x20missing\x20skillTemplate','3RtRCPh','1314083UhIXXy','trimEnd','keys','status','path','168sGufLR','length','16FzuBKu','utf-8','replace','statusText','lastUpdated'];a364_0xba59=function(){return _0x369248;};return a364_0xba59();}const CACHE_DIR=join(homedir(),a364_0x3c0181(0xe3),a364_0x3c0181(0xd2));export async function fetchGuidesFromCDN(){const _0x2d7583=a364_0x3c0181,_0x41892b=getGuidesCdnUrl(),_0xa022dd=await fetch(_0x41892b,{'headers':{'Accept':_0x2d7583(0xd0)}});if(!_0xa022dd['ok'])throw new Error(_0x2d7583(0xdd)+_0xa022dd[_0x2d7583(0xc4)]+'\x20'+_0xa022dd[_0x2d7583(0xcb)]);const _0x17acf3=await _0xa022dd['json']();if(!_0x17acf3[_0x2d7583(0xe1)]||typeof _0x17acf3['guides']!==_0x2d7583(0xdb))throw new Error(_0x2d7583(0xe0));return _0x17acf3;}export function writeGuidesToProject(_0x56e740,_0x535fb8,_0x1d1df3='.lovrabet/skill/guides',_0x552977){const _0x143360=a364_0x3c0181,_0x387924=join(_0x535fb8,_0x1d1df3);mkdirSync(_0x387924,{'recursive':!![]});for(const [_0x1d6fbf,_0x531ce3]of Object[_0x143360(0xd5)](_0x56e740[_0x143360(0xe1)])){let _0x5208f1=_0x531ce3['content'];_0x531ce3['lastUpdated']&&(_0x5208f1=appendUpdateTime(_0x5208f1,_0x531ce3[_0x143360(0xcc)])),writeFileSync(join(_0x387924,_0x1d6fbf+_0x143360(0xd9)),_0x5208f1,_0x143360(0xc9));}}export function appendUpdateTime(_0x4fc44b,_0x33e356){const _0x5cd8e9=a364_0x3c0181;return _0x4fc44b=_0x4fc44b[_0x5cd8e9(0xca)](/\n*>更新时间:.*$/m,''),_0x4fc44b[_0x5cd8e9(0xc2)]()+(_0x5cd8e9(0xda)+_0x33e356);}export function getSkillTemplate(_0x5b9285){const _0x2ac918=a364_0x3c0181;return _0x5b9285[_0x2ac918(0xdc)]?.[_0x2ac918(0xd4)]||'';}export function appendExtendContents(_0x6078a6,_0x7f09d9,_0x578125){const _0x42e7f0=a364_0x3c0181,_0x2eea26=[];for(const [,_0x327689]of Object[_0x42e7f0(0xd5)](_0x7f09d9[_0x42e7f0(0xe1)])){_0x327689[_0x42e7f0(0xd1)]&&_0x2eea26[_0x42e7f0(0xd6)](_0x327689[_0x42e7f0(0xd1)][_0x42e7f0(0xc2)]());}if(_0x2eea26[_0x42e7f0(0xc7)]===0x0)return _0x6078a6;return _0x6078a6['trimEnd']()+'\x0a\x0a'+_0x2eea26[_0x42e7f0(0xd3)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x272975,_0x4620f5,_0x55ddf1){const _0x40ade1=a364_0x3c0181,_0x32e0f1=getSkillTemplate(_0x272975);if(!_0x32e0f1)throw new Error(_0x40ade1(0xbf));const _0x2d66da=dirname(_0x4620f5);mkdirSync(_0x2d66da,{'recursive':!![]});let _0x2ffdbf=_0x32e0f1[_0x40ade1(0xca)](/\{\{IDE_NAME\}\}/g,_0x55ddf1);_0x2ffdbf=appendExtendContents(_0x2ffdbf,_0x272975),_0x272975[_0x40ade1(0xdc)][_0x40ade1(0xcc)]&&(_0x2ffdbf=appendUpdateTime(_0x2ffdbf,_0x272975[_0x40ade1(0xdc)][_0x40ade1(0xcc)])),writeFileSync(_0x4620f5,_0x2ffdbf,'utf-8');}function a364_0xd300(_0x44cd25,_0x36fe19){_0x44cd25=_0x44cd25-0xbe;const _0xba592b=a364_0xba59();let _0xd3006=_0xba592b[_0x44cd25];return _0xd3006;}export async function installGuides(_0x311cf4){const _0xf1ae56=a364_0x3c0181,_0x2222e7=await fetchGuidesFromCDN();return writeGuidesToProject(_0x2222e7,_0x311cf4),Object[_0xf1ae56(0xc3)](_0x2222e7[_0xf1ae56(0xe1)])[_0xf1ae56(0xc7)];}export function getGuidesSummary(_0xa52041){const _0x433102=a364_0x3c0181;return Object[_0x433102(0xd5)](_0xa52041[_0x433102(0xe1)])[_0x433102(0xcf)](([_0x44bde1,_0x56e617])=>({'key':_0x44bde1,'title':_0x56e617[_0x433102(0xd8)],'path':_0x56e617[_0x433102(0xc5)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a365_0x2c2b(){const _0x1ba41e=['log','includes','29074356kvCQJc','36YNAIqr','application/json','7pwlOQa','AbortError','statusText','text','message','1519966HddDdb','105tgNpwF','abort','9334480zxCnjF','fetch','6130XEktBp','url','json','7824TrscZs','ECONNRESET','ENOTFOUND','4959063zBZgRM','headers','ms...','name','*\x20Request\x20failed;\x20retry\x20','Request\x20failed','content-type','3471226WclfHv','20gGxMJd','2HJKPOt'];a365_0x2c2b=function(){return _0x1ba41e;};return a365_0x2c2b();}(function(_0x12a4a3,_0x6f899a){const _0x3b3d82=a365_0x1463,_0x3264c0=_0x12a4a3();while(!![]){try{const _0x323e2e=-parseInt(_0x3b3d82(0x1b2))/0x1*(-parseInt(_0x3b3d82(0x1c6))/0x2)+parseInt(_0x3b3d82(0x1b3))/0x3*(-parseInt(_0x3b3d82(0x1ba))/0x4)+parseInt(_0x3b3d82(0x1b7))/0x5*(parseInt(_0x3b3d82(0x1ca))/0x6)+parseInt(_0x3b3d82(0x1cc))/0x7*(parseInt(_0x3b3d82(0x1b5))/0x8)+parseInt(_0x3b3d82(0x1bd))/0x9*(parseInt(_0x3b3d82(0x1c5))/0xa)+-parseInt(_0x3b3d82(0x1c4))/0xb+-parseInt(_0x3b3d82(0x1c9))/0xc;if(_0x323e2e===_0x6f899a)break;else _0x3264c0['push'](_0x3264c0['shift']());}catch(_0x3d9099){_0x3264c0['push'](_0x3264c0['shift']());}}}(a365_0x2c2b,0xf1849));export async function httpRequest(_0x36db44,_0x30d4cd={}){const _0x204fcf=a365_0x1463,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x30d4cd;let _0x5a7d03=null;for(let _0x3f798f=0x0;_0x3f798f<=retries;_0x3f798f++){try{const _0x3e855e=new AbortController(),_0xfba28=setTimeout(()=>_0x3e855e[_0x204fcf(0x1b4)](),timeout),_0x49f77c=await fetch(_0x36db44,{'headers':headers,'signal':_0x3e855e['signal']});clearTimeout(_0xfba28);let _0x26e6fc;const _0x151785=_0x49f77c[_0x204fcf(0x1be)]['get'](_0x204fcf(0x1c3));return _0x151785?.[_0x204fcf(0x1c8)](_0x204fcf(0x1cb))?_0x26e6fc=await _0x49f77c[_0x204fcf(0x1b9)]():_0x26e6fc=await _0x49f77c['text'](),{'ok':_0x49f77c['ok'],'status':_0x49f77c['status'],'statusText':_0x49f77c[_0x204fcf(0x1ce)],'data':_0x26e6fc,'headers':_0x49f77c['headers'],'url':_0x49f77c[_0x204fcf(0x1b8)],'text':()=>_0x49f77c[_0x204fcf(0x1b0)]()};}catch(_0xb75d79){_0x5a7d03=_0xb75d79 instanceof Error?_0xb75d79:new Error(String(_0xb75d79));if(_0x3f798f===retries)break;if(shouldRetry(_0xb75d79)){console[_0x204fcf(0x1c7)](_0x204fcf(0x1c1)+(_0x3f798f+0x1)+'\x20in\x20'+retryDelay+_0x204fcf(0x1bf)),await sleep(retryDelay);continue;}else break;}}throw _0x5a7d03||new Error(_0x204fcf(0x1c2));}function a365_0x1463(_0x26e4ef,_0x1c4365){_0x26e4ef=_0x26e4ef-0x1b0;const _0x2c2bdf=a365_0x2c2b();let _0x14631d=_0x2c2bdf[_0x26e4ef];return _0x14631d;}function shouldRetry(_0x271915){const _0x20c3c6=a365_0x1463;if(_0x271915 instanceof Error){if(_0x271915['name']===_0x20c3c6(0x1cd))return![];if(_0x271915[_0x20c3c6(0x1c0)]==='TypeError'&&_0x271915[_0x20c3c6(0x1b1)]['includes'](_0x20c3c6(0x1b6)))return!![];if(_0x271915[_0x20c3c6(0x1b1)][_0x20c3c6(0x1c8)](_0x20c3c6(0x1bb)))return!![];if(_0x271915['message'][_0x20c3c6(0x1c8)](_0x20c3c6(0x1bc)))return![];}return![];}function sleep(_0x5c4d9a){return new Promise(_0x5bf9d2=>setTimeout(_0x5bf9d2,_0x5c4d9a));}export function validateUrl(_0x17812d){try{return new URL(_0x17812d),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a366_0x36a7(){const _0x4a3674=['true','5399616jObxRv','isTTY','9105698bRoCGA','isRaw','1009314MkNIHT','stdout','8520696QaTXwX','stdin','5908660KzVJMt','4887944myrSeJ','6GQGEBQ','1090311WXVtGG','setRawMode'];a366_0x36a7=function(){return _0x4a3674;};return a366_0x36a7();}function a366_0x478c(_0x5b2df4,_0x5e123c){_0x5b2df4=_0x5b2df4-0x1e4;const _0x36a734=a366_0x36a7();let _0x478cec=_0x36a734[_0x5b2df4];return _0x478cec;}(function(_0x5783c9,_0x32b6c8){const _0x1f1961=a366_0x478c,_0x2efdd2=_0x5783c9();while(!![]){try{const _0x4dff91=parseInt(_0x1f1961(0x1e9))/0x1+-parseInt(_0x1f1961(0x1ef))/0x2*(parseInt(_0x1f1961(0x1f0))/0x3)+parseInt(_0x1f1961(0x1e5))/0x4+-parseInt(_0x1f1961(0x1ed))/0x5+parseInt(_0x1f1961(0x1eb))/0x6+-parseInt(_0x1f1961(0x1e7))/0x7+parseInt(_0x1f1961(0x1ee))/0x8;if(_0x4dff91===_0x32b6c8)break;else _0x2efdd2['push'](_0x2efdd2['shift']());}catch(_0x4381a2){_0x2efdd2['push'](_0x2efdd2['shift']());}}}(a366_0x36a7,0xc793e));function env(_0x433d32){return process.env[`RABETBASE_${_0x433d32}`]||process.env[`LOVRABET_${_0x433d32}`]||undefined;}export function isNonInteractive(_0x13e13c){const _0x40a5ba=a366_0x478c;return!!(_0x13e13c['nonInteractive']||_0x13e13c['ci']||env('CI')===_0x40a5ba(0x1e4)||process.env.CI===_0x40a5ba(0x1e4)||!process[_0x40a5ba(0x1ea)][_0x40a5ba(0x1e6)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1916c5=a366_0x478c;if(!process[_0x1916c5(0x1ec)][_0x1916c5(0x1e6)])return![];try{const _0x2a5154=process[_0x1916c5(0x1ec)][_0x1916c5(0x1e8)];return process[_0x1916c5(0x1ec)][_0x1916c5(0x1f1)](!![]),process['stdin'][_0x1916c5(0x1f1)](_0x2a5154??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a367_0x51ea03=a367_0x44c7;(function(_0x20aa5d,_0x44d7a5){const _0x543c57=a367_0x44c7,_0x49cdca=_0x20aa5d();while(!![]){try{const _0x448585=parseInt(_0x543c57(0x15e))/0x1*(parseInt(_0x543c57(0x132))/0x2)+-parseInt(_0x543c57(0x162))/0x3*(parseInt(_0x543c57(0x143))/0x4)+parseInt(_0x543c57(0x150))/0x5+-parseInt(_0x543c57(0x142))/0x6*(parseInt(_0x543c57(0x129))/0x7)+parseInt(_0x543c57(0x14b))/0x8*(parseInt(_0x543c57(0x15c))/0x9)+parseInt(_0x543c57(0x14d))/0xa+-parseInt(_0x543c57(0x158))/0xb;if(_0x448585===_0x44d7a5)break;else _0x49cdca['push'](_0x49cdca['shift']());}catch(_0xf8ced0){_0x49cdca['push'](_0x49cdca['shift']());}}}(a367_0x4359,0xaf339));function a367_0x4359(){const _0x2e4e63=['setRawCommand','18wKZmUa','transports','10oLPkBp','yellow','join','File','1887603uVQugU','map','Completed:\x20','7XSWNCZ','timestamp','readLogs','trim','setLogPath','unknown','now','printf','success','130006NprrgG','blue','existsSync','addColors','level','error','log','errors','red','format','message','info','parse','winstonLogger','split','logFilePath','4849338twOuaC','4RsVTLe','Failed\x20to\x20read\x20logs:','rawCommand','getWinstonInstance','currentRawCommand','duration','createLogger','.lovrabet.log','369272PAtFHC','Failed\x20to\x20clear\x20logs:','8225650EpPpTA','combine','initWinstonLogger','6496405waEWDn','details','command','dirname','mkdirSync','utf8','logTask','warn','7800595kpghVw','stringify','toISOString'];a367_0x4359=function(){return _0x2e4e63;};return a367_0x4359();}function a367_0x44c7(_0x36734a,_0xe43738){_0x36734a=_0x36734a-0x128;const _0x43592d=a367_0x4359();let _0x44c720=_0x43592d[_0x36734a];return _0x44c720;}import a367_0x347ebc from'winston';import a367_0x3a5f2e from'node:fs';import a367_0x4325c4 from'node:path';class Logger{['winstonLogger'];['logFilePath'];[a367_0x51ea03(0x147)]='';constructor(){const _0x376fa3=a367_0x51ea03;this[_0x376fa3(0x141)]='';}[a367_0x51ea03(0x15b)](_0x4a5abd){this['currentRawCommand']=_0x4a5abd;}[a367_0x51ea03(0x14f)](){const _0x1a4212=a367_0x51ea03,_0x374137=a367_0x4325c4[_0x1a4212(0x153)](this['logFilePath']);!a367_0x3a5f2e['existsSync'](_0x374137)&&a367_0x3a5f2e[_0x1a4212(0x154)](_0x374137,{'recursive':!![]});const _0x11102a=a367_0x347ebc[_0x1a4212(0x13b)][_0x1a4212(0x14e)](a367_0x347ebc[_0x1a4212(0x13b)]['timestamp'](),a367_0x347ebc['format'][_0x1a4212(0x139)]({'stack':!![]}),a367_0x347ebc[_0x1a4212(0x13b)][_0x1a4212(0x130)](_0xc9d1fb=>{const _0x2f8c63=_0x1a4212,_0x5edd0c={'timestamp':_0xc9d1fb[_0x2f8c63(0x12a)]||new Date()[_0x2f8c63(0x15a)](),'level':_0xc9d1fb[_0x2f8c63(0x136)]||_0x2f8c63(0x13d),'command':_0xc9d1fb[_0x2f8c63(0x152)]||_0x2f8c63(0x12e),'rawCommand':_0xc9d1fb[_0x2f8c63(0x145)]||this['currentRawCommand']||undefined,'message':_0xc9d1fb[_0x2f8c63(0x13c)]||'','duration':_0xc9d1fb[_0x2f8c63(0x148)]||undefined,'details':_0xc9d1fb[_0x2f8c63(0x151)]||undefined};return JSON[_0x2f8c63(0x159)](_0x5edd0c);}));this[_0x1a4212(0x13f)]=a367_0x347ebc[_0x1a4212(0x149)]({'level':_0x1a4212(0x13d),'format':_0x11102a,'transports':[new a367_0x347ebc[(_0x1a4212(0x15d))][(_0x1a4212(0x161))]({'filename':this[_0x1a4212(0x141)],'level':_0x1a4212(0x13d)})],'silent':![]}),a367_0x347ebc[_0x1a4212(0x135)]({'success':'green','error':_0x1a4212(0x13a),'warn':_0x1a4212(0x15f),'info':_0x1a4212(0x133)});}[a367_0x51ea03(0x12d)](_0x589cbc){const _0x57c3d8=a367_0x51ea03;this[_0x57c3d8(0x141)]=a367_0x4325c4[_0x57c3d8(0x160)](_0x589cbc,_0x57c3d8(0x14a)),this[_0x57c3d8(0x13f)]&&this[_0x57c3d8(0x13f)]['clear'](),this[_0x57c3d8(0x14f)]();}[a367_0x51ea03(0x13d)](_0x4c13a3,_0x3c0567,_0x4be2cb){const _0x5d8b74=a367_0x51ea03;if(!this[_0x5d8b74(0x141)]||!this[_0x5d8b74(0x13f)])return;this['winstonLogger'][_0x5d8b74(0x13d)](_0x3c0567,{'command':_0x4c13a3,'details':_0x4be2cb});}['success'](_0xd1edd4,_0x41ca1d,_0x3084d5,_0x4d9a0a){const _0x354001=a367_0x51ea03;if(!this[_0x354001(0x141)]||!this[_0x354001(0x13f)])return;this[_0x354001(0x13f)][_0x354001(0x138)](_0x354001(0x13d),_0x41ca1d,{'level':_0x354001(0x131),'command':_0xd1edd4,'duration':_0x3084d5,'details':_0x4d9a0a});}[a367_0x51ea03(0x137)](_0x3c2294,_0x4c47d4,_0x32f513){const _0x2399a0=a367_0x51ea03;if(!this[_0x2399a0(0x141)]||!this['winstonLogger'])return;this[_0x2399a0(0x13f)][_0x2399a0(0x137)](_0x4c47d4,{'command':_0x3c2294,'details':_0x32f513});}[a367_0x51ea03(0x157)](_0x2a9863,_0x35eab3,_0x42f5be){const _0x368220=a367_0x51ea03;if(!this['logFilePath']||!this[_0x368220(0x13f)])return;this['winstonLogger'][_0x368220(0x157)](_0x35eab3,{'command':_0x2a9863,'details':_0x42f5be});}async[a367_0x51ea03(0x156)](_0x1b6ca7,_0x2ec7d7,_0x3749fb){const _0xa56dc=a367_0x51ea03,_0xefe22c=Date[_0xa56dc(0x12f)]();this['info'](_0x1b6ca7,'Starting:\x20'+_0x2ec7d7);try{const _0x3c126a=await _0x3749fb(),_0x2973d4=Date['now']()-_0xefe22c;return this['success'](_0x1b6ca7,_0xa56dc(0x128)+_0x2ec7d7,_0x2973d4),_0x3c126a;}catch(_0x442b8e){const _0x59bfa3=Date[_0xa56dc(0x12f)]()-_0xefe22c;this[_0xa56dc(0x137)](_0x1b6ca7,'Failed:\x20'+_0x2ec7d7,{'error':_0x442b8e instanceof Error?_0x442b8e[_0xa56dc(0x13c)]:String(_0x442b8e),'duration':_0x59bfa3});throw _0x442b8e;}}[a367_0x51ea03(0x12b)](){const _0xc753d9=a367_0x51ea03;try{if(!a367_0x3a5f2e[_0xc753d9(0x134)](this['logFilePath']))return[];const _0x4ea8d8=a367_0x3a5f2e['readFileSync'](this[_0xc753d9(0x141)],'utf8');return _0x4ea8d8[_0xc753d9(0x140)]('\x0a')['filter'](_0x3ae0e6=>_0x3ae0e6[_0xc753d9(0x12c)]())[_0xc753d9(0x163)](_0x25115e=>JSON[_0xc753d9(0x13e)](_0x25115e));}catch(_0x6a5b76){return console['warn'](_0xc753d9(0x144),_0x6a5b76),[];}}['clearLogs'](){const _0x28b8e8=a367_0x51ea03;try{a367_0x3a5f2e[_0x28b8e8(0x134)](this[_0x28b8e8(0x141)])&&a367_0x3a5f2e['writeFileSync'](this[_0x28b8e8(0x141)],'',_0x28b8e8(0x155));}catch(_0x86766e){console[_0x28b8e8(0x157)](_0x28b8e8(0x14c),_0x86766e);}}[a367_0x51ea03(0x146)](){const _0x4e57f3=a367_0x51ea03;return this[_0x4e57f3(0x13f)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a368_0x1643(_0x395418,_0x544b5b){_0x395418=_0x395418-0xd0;const _0x3f78ff=a368_0x3f78();let _0x164368=_0x3f78ff[_0x395418];return _0x164368;}function a368_0x3f78(){const _0x1900f1=['validation','12501720jLrani','119355jQjnYP','22748NynDhe','parse','object','1483804YSlpXY','390933cqjvTF','2707140BwLCfg','Invalid\x20JSON\x20for\x20--params:\x20','isArray','1122582xhVQMJ','Example:\x20--params\x20\x27{\x22id\x22:123}\x27'];a368_0x3f78=function(){return _0x1900f1;};return a368_0x3f78();}(function(_0x4332d3,_0x388edd){const _0x5a2522=a368_0x1643,_0x45a170=_0x4332d3();while(!![]){try{const _0x55448c=-parseInt(_0x5a2522(0xdc))/0x1+parseInt(_0x5a2522(0xd8))/0x2+-parseInt(_0x5a2522(0xd3))/0x3+-parseInt(_0x5a2522(0xdb))/0x4+parseInt(_0x5a2522(0xd7))/0x5+-parseInt(_0x5a2522(0xd0))/0x6+parseInt(_0x5a2522(0xd6))/0x7;if(_0x55448c===_0x388edd)break;else _0x45a170['push'](_0x45a170['shift']());}catch(_0x5d603e){_0x45a170['push'](_0x45a170['shift']());}}}(a368_0x3f78,0x391d1));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x5214d2){const _0x589426=a368_0x1643;if(!_0x5214d2)return undefined;let _0x12f1c1;try{_0x12f1c1=JSON[_0x589426(0xd9)](_0x5214d2);}catch{throw CliErrors['validation'](_0x589426(0xd1)+_0x5214d2);}if(!_0x12f1c1||typeof _0x12f1c1!==_0x589426(0xda)||Array[_0x589426(0xd2)](_0x12f1c1))throw CliErrors[_0x589426(0xd5)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x589426(0xd4));return _0x12f1c1;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a369_0xb2ee16=a369_0x15a0;function a369_0x15a0(_0x596966,_0x159f3a){_0x596966=_0x596966-0x181;const _0x1984e5=a369_0x1984();let _0x15a0ad=_0x1984e5[_0x596966];return _0x15a0ad;}function a369_0x1984(){const _0x1421cc=['658715CxpWTj','9026YoJTpP','8zLkOWN','110Wgmdcq','6LheHYA','1868704gvDyvp','16371ThBLXK','11hooksC','5060PNBxYb','8963969sFAfNm','10818756eAoIBx','win32','platform','1096236gWuFgu','.cmd'];a369_0x1984=function(){return _0x1421cc;};return a369_0x1984();}(function(_0x508511,_0x560c5d){const _0x453495=a369_0x15a0,_0x5cf442=_0x508511();while(!![]){try{const _0x37f61d=-parseInt(_0x453495(0x18e))/0x1*(parseInt(_0x453495(0x18c))/0x2)+parseInt(_0x453495(0x189))/0x3+parseInt(_0x453495(0x181))/0x4+parseInt(_0x453495(0x18b))/0x5*(-parseInt(_0x453495(0x18f))/0x6)+parseInt(_0x453495(0x185))/0x7*(-parseInt(_0x453495(0x18d))/0x8)+parseInt(_0x453495(0x182))/0x9*(parseInt(_0x453495(0x184))/0xa)+parseInt(_0x453495(0x183))/0xb*(parseInt(_0x453495(0x186))/0xc);if(_0x37f61d===_0x560c5d)break;else _0x5cf442['push'](_0x5cf442['shift']());}catch(_0x3cdf50){_0x5cf442['push'](_0x5cf442['shift']());}}}(a369_0x1984,0xb6161));export const isWindows=process[a369_0xb2ee16(0x188)]===a369_0xb2ee16(0x187);export function resolveNpmBin(_0x3ae0a7){const _0x44efe2=a369_0xb2ee16;return isWindows?_0x3ae0a7+_0x44efe2(0x18a):_0x3ae0a7;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x2f9fb5){return new Promise(_0xc2e7a2=>setTimeout(_0xc2e7a2,_0x2f9fb5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a371_0x5edd(){const _0x471bed=['alias:\x20\x22','toUpperCase','getMinutes','.tpl','message','\x0a\x20\x20\x20\x20{\x20','datasetCode:\x20\x22','success','toDisplayTitle','mkdir','promises','processFile','Template\x20content\x20replacement\x20completed','46409CYkprc','map','charAt','replace','push','includes','error','Starting\x20template\x20content\x20replacement','.md','.js','tableName','3eVVMaH','isDirectory','LOVRABET','readFile','Template\x20content\x20replacement\x20failed','default','endsWith','split','writeFile','378962sByeQc','toComponentName','pop','sdk-config','.json','replaceApiContent','alias','slice','10CwhKWS','\x20},','replaceContent','utf8','6972rLHLps','424336wmzlmo','57535bZvURH','4562199oEUfwv','processDirectory','.scss','toLowerCase','join','template','.ts','.css','.tsx','1065582OQbgbO','getDate','now','pad','getFullYear','name','toISOString','.jsx','formatLocalTimestamp','YourModel','padStart','datasetCode','952NmSIRc'];a371_0x5edd=function(){return _0x471bed;};return a371_0x5edd();}const a371_0x5372da=a371_0x397d;(function(_0x4d4169,_0x5079a2){const _0x4e2e50=a371_0x397d,_0x2a20a2=_0x4d4169();while(!![]){try{const _0x50b55c=parseInt(_0x4e2e50(0x135))/0x1+parseInt(_0x4e2e50(0x149))/0x2*(parseInt(_0x4e2e50(0x140))/0x3)+parseInt(_0x4e2e50(0x156))/0x4+-parseInt(_0x4e2e50(0x157))/0x5+parseInt(_0x4e2e50(0x161))/0x6+parseInt(_0x4e2e50(0x155))/0x7*(parseInt(_0x4e2e50(0x16d))/0x8)+parseInt(_0x4e2e50(0x158))/0x9*(-parseInt(_0x4e2e50(0x151))/0xa);if(_0x50b55c===_0x5079a2)break;else _0x2a20a2['push'](_0x2a20a2['shift']());}catch(_0x410030){_0x2a20a2['push'](_0x2a20a2['shift']());}}}(a371_0x5edd,0x1d37d));import a371_0x42d4a4 from'node:fs';import a371_0x5f3c26 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a371_0x397d(_0x587ea9,_0x246a63){_0x587ea9=_0x587ea9-0x12d;const _0x5edd49=a371_0x5edd();let _0x397d15=_0x5edd49[_0x587ea9];return _0x397d15;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a371_0x5372da(0x164)](_0x6c0bce){const _0x372dca=a371_0x5372da;return String(_0x6c0bce)[_0x372dca(0x16b)](0x2,'0');}static['formatLocalTimestamp'](_0x3228b7){const _0x27d835=a371_0x5372da,_0x23b251=_0x3228b7[_0x27d835(0x165)](),_0x446b99=this[_0x27d835(0x164)](_0x3228b7['getMonth']()+0x1),_0x6707c7=this[_0x27d835(0x164)](_0x3228b7[_0x27d835(0x162)]()),_0x44abca=this[_0x27d835(0x164)](_0x3228b7['getHours']()),_0x5d881c=this[_0x27d835(0x164)](_0x3228b7[_0x27d835(0x170)]()),_0x391ebc=this[_0x27d835(0x164)](_0x3228b7['getSeconds']());return{'createdAt':_0x23b251+'-'+_0x446b99+'-'+_0x6707c7+'\x20'+_0x44abca+':'+_0x5d881c+':'+_0x391ebc,'createdDate':_0x23b251+'-'+_0x446b99+'-'+_0x6707c7,'createdTime':_0x44abca+':'+_0x5d881c+':'+_0x391ebc};}static[a371_0x5372da(0x14a)](_0x4e97d3){const _0x4834ee=a371_0x5372da,_0x5cd055=_0x4e97d3[_0x4834ee(0x147)]('/')[_0x4834ee(0x14b)]()||_0x4e97d3;return _0x5cd055[_0x4834ee(0x147)]('-')[_0x4834ee(0x136)](_0x31f6c7=>_0x31f6c7['charAt'](0x0)[_0x4834ee(0x16f)]()+_0x31f6c7['slice'](0x1)[_0x4834ee(0x15b)]())[_0x4834ee(0x15c)]('');}static[a371_0x5372da(0x130)](_0x1f0747){const _0x25c02f=a371_0x5372da,_0x2bdb95=_0x1f0747[_0x25c02f(0x147)]('/')[_0x25c02f(0x14b)]()||_0x1f0747;return _0x2bdb95['split']('-')[_0x25c02f(0x136)](_0x3be72d=>_0x3be72d[_0x25c02f(0x137)](0x0)[_0x25c02f(0x16f)]()+_0x3be72d[_0x25c02f(0x150)](0x1)['toLowerCase']())['join']('\x20');}static[a371_0x5372da(0x153)](_0x41d9f0,_0x43fa76,_0x243df1){const _0x57a027=a371_0x5372da,_0xb3fc7a=this[_0x57a027(0x14a)](_0x43fa76),_0x1ce064=this['toDisplayTitle'](_0x43fa76),{createdAt:_0x492256,createdDate:_0x5c0c7e,createdTime:_0x5bc81e}=this[_0x57a027(0x169)](new Date());let _0x450b81=_0x41d9f0[_0x57a027(0x138)](/\{CliVersion\}/g,CLI_VERSION)[_0x57a027(0x138)](/\{ComponentName\}/g,_0xb3fc7a)[_0x57a027(0x138)](/\{DisplayTitle\}/g,_0x1ce064)['replace'](/\{PageName\}/g,_0x43fa76)[_0x57a027(0x138)](/\{TemplateName\}/g,_0x243df1)[_0x57a027(0x138)](/\{CreatedAt\}/g,_0x492256)[_0x57a027(0x138)](/\{CreatedDate\}/g,_0x5c0c7e)[_0x57a027(0x138)](/\{CreatedTime\}/g,_0x5bc81e);return _0x450b81;}static[a371_0x5372da(0x14e)](_0x420bac,_0x4a39bf,_0x59b2e2,_0x123ef9,_0x3cadf4,_0x4d6e96,_0x545fbd,_0x2c3ef,_0x16de40){const _0x5e5886=a371_0x5372da,_0x3be021=new Date(),_0xe170e3=_0x3be021[_0x5e5886(0x167)](),_0x1cab70=_0x59b2e2[_0x5e5886(0x136)](_0x3dc879=>{const _0x164f6c=_0x5e5886,_0x448b78=[_0x164f6c(0x12e)+_0x3dc879[_0x164f6c(0x16c)]+'\x22','tableName:\x20\x22'+_0x3dc879[_0x164f6c(0x13f)]+'\x22','name:\x20\x22'+_0x3dc879['name']+'\x22'];return _0x3dc879[_0x164f6c(0x14f)]&&_0x448b78[_0x164f6c(0x139)](_0x164f6c(0x16e)+_0x3dc879[_0x164f6c(0x14f)]+'\x22'),_0x164f6c(0x12d)+_0x448b78[_0x164f6c(0x15c)](',\x20')+_0x164f6c(0x152);})[_0x5e5886(0x15c)](''),_0x5825a2=_0x123ef9||_0x59b2e2[0x0]?.[_0x5e5886(0x14f)]||_0x5e5886(0x16a);let _0x3c923e=_0x420bac[_0x5e5886(0x138)](/\{AppCode\}/g,_0x4a39bf)[_0x5e5886(0x138)](/\{ModelConfigs\}/g,_0x1cab70)[_0x5e5886(0x138)](/\{ExampleModelName\}/g,_0x5825a2)[_0x5e5886(0x138)](/\{ApiFileName\}/g,_0x3cadf4||'api')[_0x5e5886(0x138)](/\{ConfigName\}/g,_0x4d6e96||_0x5e5886(0x145))[_0x5e5886(0x138)](/\{ClientConfigParam\}/g,_0x545fbd||'')['replace'](/\{SdkConfigFileName\}/g,_0x16de40||_0x5e5886(0x14c))[_0x5e5886(0x138)](/\{VarPrefix\}/g,_0x2c3ef||_0x5e5886(0x142))[_0x5e5886(0x138)](/\{CreatedAt\}/g,_0xe170e3);return _0x3c923e;}static async['processTemplate'](_0x58e12f,_0x136107,_0x8450ff,_0x484b92,_0x1edfe9=!![]){const _0x45b0d9=a371_0x5372da,_0x2dd9f1=Date[_0x45b0d9(0x163)]();try{_0x1edfe9&&logger['info']('template',_0x45b0d9(0x13c),{'templatePath':_0x58e12f,'targetPath':_0x136107,'pageName':_0x8450ff,'templateName':_0x484b92});await a371_0x42d4a4[_0x45b0d9(0x132)]['mkdir'](_0x136107,{'recursive':!![]}),await this[_0x45b0d9(0x159)](_0x58e12f,_0x136107,_0x8450ff,_0x484b92);if(_0x1edfe9){const _0x623275=Date[_0x45b0d9(0x163)]()-_0x2dd9f1;logger[_0x45b0d9(0x12f)](_0x45b0d9(0x15d),_0x45b0d9(0x134),_0x623275,{'pageName':_0x8450ff,'templateName':_0x484b92});}}catch(_0x56794c){if(_0x1edfe9){const _0x524db1=Date[_0x45b0d9(0x163)]()-_0x2dd9f1;logger[_0x45b0d9(0x13b)](_0x45b0d9(0x15d),_0x45b0d9(0x144),{'templatePath':_0x58e12f,'targetPath':_0x136107,'pageName':_0x8450ff,'templateName':_0x484b92,'error':_0x56794c instanceof Error?_0x56794c[_0x45b0d9(0x172)]:String(_0x56794c),'duration':_0x524db1});}throw _0x56794c;}}static async[a371_0x5372da(0x159)](_0x36d6f7,_0x571c09,_0x340e17,_0x2fac72){const _0x2b11b6=a371_0x5372da,_0x2101ae=await a371_0x42d4a4['promises']['readdir'](_0x36d6f7,{'withFileTypes':!![]});for(const _0x2182a3 of _0x2101ae){const _0x160f56=a371_0x5f3c26[_0x2b11b6(0x15c)](_0x36d6f7,_0x2182a3[_0x2b11b6(0x166)]);let _0x4a893c=a371_0x5f3c26[_0x2b11b6(0x15c)](_0x571c09,_0x2182a3['name']);_0x2182a3['name'][_0x2b11b6(0x146)]('.tpl')&&(_0x4a893c=a371_0x5f3c26[_0x2b11b6(0x15c)](_0x571c09,_0x2182a3[_0x2b11b6(0x166)][_0x2b11b6(0x138)](/\.tpl$/,'')));if(_0x2182a3[_0x2b11b6(0x141)]())await a371_0x42d4a4[_0x2b11b6(0x132)][_0x2b11b6(0x131)](_0x4a893c,{'recursive':!![]}),await this[_0x2b11b6(0x159)](_0x160f56,_0x4a893c,_0x340e17,_0x2fac72);else _0x2182a3['isFile']()&&await this[_0x2b11b6(0x133)](_0x160f56,_0x4a893c,_0x340e17,_0x2fac72);}}static async['processFile'](_0x5dac71,_0x202e48,_0x21e34e,_0x137de2){const _0x2ecea4=a371_0x5372da,_0x56e4bd=a371_0x5f3c26['extname'](_0x5dac71)[_0x2ecea4(0x15b)]();_0x5dac71[_0x2ecea4(0x146)]('.tpl')&&(_0x202e48=_0x202e48['replace'](/\.tpl$/,''));const _0x3b27f6=[_0x2ecea4(0x160),_0x2ecea4(0x15e),_0x2ecea4(0x168),_0x2ecea4(0x13e),_0x2ecea4(0x14d),_0x2ecea4(0x13d),_0x2ecea4(0x15f),_0x2ecea4(0x15a),_0x2ecea4(0x171)];if(_0x3b27f6[_0x2ecea4(0x13a)](_0x56e4bd)||_0x5dac71['endsWith']('.tpl')){const _0x5c212c=await a371_0x42d4a4['promises'][_0x2ecea4(0x143)](_0x5dac71,_0x2ecea4(0x154)),_0x2868da=this[_0x2ecea4(0x153)](_0x5c212c,_0x21e34e,_0x137de2);await a371_0x42d4a4['promises'][_0x2ecea4(0x148)](_0x202e48,_0x2868da,_0x2ecea4(0x154));}else await a371_0x42d4a4[_0x2ecea4(0x132)]['copyFile'](_0x5dac71,_0x202e48);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a829f,_0x73a011){const _0x286ad7=a372_0x4743,_0x9a85bd=_0x1a829f();while(!![]){try{const _0x2c26a2=-parseInt(_0x286ad7(0x7c))/0x1*(parseInt(_0x286ad7(0x89))/0x2)+parseInt(_0x286ad7(0x88))/0x3*(parseInt(_0x286ad7(0x80))/0x4)+-parseInt(_0x286ad7(0x76))/0x5*(parseInt(_0x286ad7(0x75))/0x6)+parseInt(_0x286ad7(0x6e))/0x7+-parseInt(_0x286ad7(0x6d))/0x8+parseInt(_0x286ad7(0x6f))/0x9+-parseInt(_0x286ad7(0x8b))/0xa;if(_0x2c26a2===_0x73a011)break;else _0x9a85bd['push'](_0x9a85bd['shift']());}catch(_0x5611b3){_0x9a85bd['push'](_0x9a85bd['shift']());}}}(a372_0x3ab7,0x3099b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a372_0x25f8fc 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 a372_0x3ab7(){const _0x360cd6=['11IbQRUj','parse','/v/','https://www.npmjs.com/package/','6436QlorAH','toLowerCase','number','lastNotifiedAt','checkedAt','now','\x20update','stringify','660IwaolP','2422VXMNQi','.cache','2376280GEdZtz','true','1501192zLtUiD','2636746espLMh','1368162tuuodl','latest','stableVersion','\x20available,\x20current\x20','trim','gte','113082DfVYbN','65ZPjMia','valid','object','update-check.json','utf8','lastNotifiedVersion'];a372_0x3ab7=function(){return _0x360cd6;};return a372_0x3ab7();}function isUpdateNoticeDisabled(){const _0x4dbbd9=a372_0x4743,_0x376f07=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x4dbbd9(0x73)]()[_0x4dbbd9(0x81)]();return _0x376f07==='1'||_0x376f07===_0x4dbbd9(0x6c)||_0x376f07==='yes';}function cacheRoot(){const _0x315d34=a372_0x4743;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x315d34(0x8a));}export function getUpdateNoticeCachePath(){const _0x5a1cb1=a372_0x4743;return join(cacheRoot(),'rabetbase-cli',_0x5a1cb1(0x79));}async function readUpdateNoticeCache(){const _0x58cbd2=a372_0x4743;try{const _0x3f1ebd=await readFile(getUpdateNoticeCachePath(),_0x58cbd2(0x7a)),_0xbee80f=JSON[_0x58cbd2(0x7d)](_0x3f1ebd);if(!_0xbee80f||typeof _0xbee80f!==_0x58cbd2(0x78))return{};return _0xbee80f;}catch{return{};}}async function writeUpdateNoticeCache(_0x1728c3){const _0x5a121b=a372_0x4743;try{const _0x579d86=getUpdateNoticeCachePath();await mkdir(dirname(_0x579d86),{'recursive':!![]}),await writeFile(_0x579d86,JSON[_0x5a121b(0x87)](_0x1728c3,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x302c30,_0x23e83a){const _0x3296cd=a372_0x4743;return typeof _0x302c30[_0x3296cd(0x84)]===_0x3296cd(0x82)&&_0x23e83a-_0x302c30[_0x3296cd(0x84)]<UPDATE_CHECK_TTL_MS;}function a372_0x4743(_0x404838,_0x30405a){_0x404838=_0x404838-0x6c;const _0x3ab789=a372_0x3ab7();let _0x474373=_0x3ab789[_0x404838];return _0x474373;}function isRecentlyNotified(_0x1c92f7,_0x4d32de,_0x5034dc){const _0x44c200=a372_0x4743;return _0x1c92f7[_0x44c200(0x7b)]===_0x4d32de&&typeof _0x1c92f7[_0x44c200(0x83)]===_0x44c200(0x82)&&_0x5034dc-_0x1c92f7[_0x44c200(0x83)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x4f1012){const _0x2424b2=a372_0x4743;return _0x2424b2(0x7f)+NPM_PACKAGE_NAME+_0x2424b2(0x7e)+_0x4f1012;}export async function resolveLatestUpdateNotice(){const _0x52bc26=a372_0x4743;if(isUpdateNoticeDisabled())return null;try{const _0x4d8933=Date[_0x52bc26(0x85)](),_0x146641=getCliVersion(),_0x1e13fd=await readUpdateNoticeCache();let _0x203304=isFreshCheck(_0x1e13fd,_0x4d8933)?_0x1e13fd[_0x52bc26(0x70)]?.[_0x52bc26(0x73)]():undefined;if(!_0x203304&&!isFreshCheck(_0x1e13fd,_0x4d8933)){const _0xfb4d8f=await getCliVersionPolicy();_0x203304=_0xfb4d8f?.[_0x52bc26(0x71)]?.[_0x52bc26(0x73)]()||undefined,await writeUpdateNoticeCache({..._0x1e13fd,'checkedAt':_0x4d8933,'latest':_0x203304,'failed':!_0x203304});}if(!_0x203304||!a372_0x25f8fc[_0x52bc26(0x77)](_0x146641)||!a372_0x25f8fc[_0x52bc26(0x77)](_0x203304))return null;if(a372_0x25f8fc[_0x52bc26(0x74)](_0x146641,_0x203304))return null;if(isRecentlyNotified(_0x1e13fd,_0x203304,_0x4d8933))return null;const _0x50b434=CLI_BIN_NAME+_0x52bc26(0x86);return await writeUpdateNoticeCache({..._0x1e13fd,'checkedAt':isFreshCheck(_0x1e13fd,_0x4d8933)?_0x1e13fd[_0x52bc26(0x84)]:_0x4d8933,'latest':_0x203304,'failed':![],'lastNotifiedVersion':_0x203304,'lastNotifiedAt':_0x4d8933}),{'command':_0x50b434,'current':_0x146641,'latest':_0x203304,'url':buildNpmVersionUrl(_0x203304),'message':CLI_BIN_NAME+'\x20'+_0x203304+_0x52bc26(0x72)+_0x146641+',\x20run:\x20'+_0x50b434};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ab882,_0x1d1ee8){var _0x433748=a373_0x2ae7,_0x266de2=_0x5ab882();while(!![]){try{var _0x13513b=parseInt(_0x433748(0x164))/0x1*(-parseInt(_0x433748(0x15c))/0x2)+-parseInt(_0x433748(0x162))/0x3+parseInt(_0x433748(0x166))/0x4*(parseInt(_0x433748(0x15e))/0x5)+-parseInt(_0x433748(0x161))/0x6*(parseInt(_0x433748(0x165))/0x7)+-parseInt(_0x433748(0x15f))/0x8+-parseInt(_0x433748(0x163))/0x9*(-parseInt(_0x433748(0x15d))/0xa)+-parseInt(_0x433748(0x160))/0xb;if(_0x13513b===_0x1d1ee8)break;else _0x266de2['push'](_0x266de2['shift']());}catch(_0x915986){_0x266de2['push'](_0x266de2['shift']());}}}(a373_0x2770,0x2a18b));function a373_0x2ae7(_0x12d1bd,_0x11146d){_0x12d1bd=_0x12d1bd-0x15c;var _0x2770e5=a373_0x2770();var _0x2ae73f=_0x2770e5[_0x12d1bd];return _0x2ae73f;}import{VERSION}from'../generated/build-info.js';function a373_0x2770(){var _0x582e4c=['1906Stwuxk','3103580XGtGHx','10aWbiSn','832320IMWOwk','1633863nQSHWB','130764igHBpF','28425BJzrEO','9InWOPJ','91YWNjcI','14Xbigkx','508856wFozbB'];a373_0x2770=function(){return _0x582e4c;};return a373_0x2770();}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x449b9c,_0x184fee){var _0x45c86d=a374_0x2a84,_0x6ee41=_0x449b9c();while(!![]){try{var _0x315893=parseInt(_0x45c86d(0x1e3))/0x1+-parseInt(_0x45c86d(0x1e7))/0x2+-parseInt(_0x45c86d(0x1e5))/0x3*(-parseInt(_0x45c86d(0x1e2))/0x4)+-parseInt(_0x45c86d(0x1e4))/0x5+parseInt(_0x45c86d(0x1e1))/0x6+-parseInt(_0x45c86d(0x1e8))/0x7+parseInt(_0x45c86d(0x1e9))/0x8*(parseInt(_0x45c86d(0x1e6))/0x9);if(_0x315893===_0x184fee)break;else _0x6ee41['push'](_0x6ee41['shift']());}catch(_0x53ef9c){_0x6ee41['push'](_0x6ee41['shift']());}}}(a374_0x4125,0x3c7a7));function a374_0x4125(){var _0x2c6afa=['487718BJQDYV','709040BIRvyP','354444CZzeJh','353692nDrUeV','66087ABBlWh','2071895wPPbBn','3bDFXoo','63QIpqnV','204444ZXLeVw'];a374_0x4125=function(){return _0x2c6afa;};return a374_0x4125();}function a374_0x2a84(_0x36a3f7,_0xa30167){_0x36a3f7=_0x36a3f7-0x1e1;var _0x41258c=a374_0x4125();var _0x2a84f5=_0x41258c[_0x36a3f7];return _0x2a84f5;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x403b57,_0x217a4e){setActiveCookie(_0x403b57);try{return await _0x217a4e();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27d565,_0x1b68a7){var _0x473214=a375_0x4a15,_0x306c57=_0x27d565();while(!![]){try{var _0x59ade1=parseInt(_0x473214(0x17c))/0x1*(parseInt(_0x473214(0x170))/0x2)+parseInt(_0x473214(0x178))/0x3*(parseInt(_0x473214(0x173))/0x4)+parseInt(_0x473214(0x16f))/0x5+-parseInt(_0x473214(0x175))/0x6*(parseInt(_0x473214(0x17a))/0x7)+parseInt(_0x473214(0x17b))/0x8*(-parseInt(_0x473214(0x177))/0x9)+-parseInt(_0x473214(0x174))/0xa+parseInt(_0x473214(0x176))/0xb*(parseInt(_0x473214(0x172))/0xc);if(_0x59ade1===_0x1b68a7)break;else _0x306c57['push'](_0x306c57['shift']());}catch(_0x26ae8f){_0x306c57['push'](_0x306c57['shift']());}}}(a375_0x1e41,0xd4239));export function writeCliSideChannelLine(_0x2cc7ca){var _0x2ee838=a375_0x4a15;process[_0x2ee838(0x171)][_0x2ee838(0x179)](_0x2cc7ca+'\x0a');}function a375_0x4a15(_0xf4e8fa,_0x5498df){_0xf4e8fa=_0xf4e8fa-0x16f;var _0x1e4152=a375_0x1e41();var _0x4a15cd=_0x1e4152[_0xf4e8fa];return _0x4a15cd;}function a375_0x1e41(){var _0x97a696=['144HQpVQD','3335067rRuImu','write','3997OyYBBB','35848eRiZlv','293VwSkgW','139610fSqGPU','2094wAKSJv','stderr','12CWeHNR','4DnucAH','3954870cZfbDB','16410mHvcOE','15965477XyRtva'];a375_0x1e41=function(){return _0x97a696;};return a375_0x1e41();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.9-beta.1",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.
|
|
3
|
+
version: 2.5.9-beta.1
|
|
4
4
|
description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, Instant API access policies, database connections, pages, host frontend integration, frontend subapp resources, SQL, Backend Functions, approval flows and workflows, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, Instant API allow/deny/route policy, project creation, api pull/codegen, dblink, page, host frontend integration, subapp resource versions, SQL, BFF, creating or designing an approval flow, workflow, business process, or multi-step approval, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|