@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.4
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.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.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.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/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(_0x14bb09,_0x4ef1d3){const _0x33abd9=a358_0xd6f9,_0x5edcb9=_0x14bb09();while(!![]){try{const _0x22c214=parseInt(_0x33abd9(0x194))/0x1*(parseInt(_0x33abd9(0x190))/0x2)+-parseInt(_0x33abd9(0x179))/0x3+-parseInt(_0x33abd9(0x184))/0x4+parseInt(_0x33abd9(0x18b))/0x5+-parseInt(_0x33abd9(0x178))/0x6+-parseInt(_0x33abd9(0x175))/0x7+parseInt(_0x33abd9(0x18e))/0x8*(parseInt(_0x33abd9(0x17a))/0x9);if(_0x22c214===_0x4ef1d3)break;else _0x5edcb9['push'](_0x5edcb9['shift']());}catch(_0x1c57ad){_0x5edcb9['push'](_0x5edcb9['shift']());}}}(a358_0x82d3,0x964bd));import a358_0x3ba077 from'node:fs';function a358_0xd6f9(_0x726df4,_0x47d223){_0x726df4=_0x726df4-0x173;const _0x82d3d5=a358_0x82d3();let _0xd6f901=_0x82d3d5[_0x726df4];return _0xd6f901;}import a358_0x492ebe from'node:path';function a358_0x82d3(){const _0x305037=['utf-8','node','2401931jBUFUg','@lovrabet/sdk','readFileSync','6916896TbuErQ','543705vRJCDu','187299hZXIkW','\x1b[33m','test','all','parse','utf8','existsSync','↪\x20SDK\x20update\x20available','devDependencies','log','2913968SwCYYz','\x20\x20\x20Current\x20version:\x20','package.json','\x1b[1m','minVersion','\x20\x20\x20Stable\x20version:\x20','stableVersion','2805595nXWvmp','\x20\x20\x20Upgrade\x20command:\x20','needsUpgrade','568aMeDGH','join','1965178xQEsPR','\x1b[0m','coerce','dependencies','1KMJxDx','sdk','version','latest','node_modules','packageName','some'];a358_0x82d3=function(){return _0x305037;};return a358_0x82d3();}import a358_0x552b7c from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x1af2a2){const _0x3819f8=a358_0xd6f9,_0x5e92d9=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5e92d9[_0x3819f8(0x19a)](_0x2ca1ed=>_0x2ca1ed[_0x3819f8(0x17c)](_0x1af2a2));}function getInstalledVersion(_0xa25f14,_0x16604c){const _0x586a30=a358_0xd6f9;try{const _0x65a976=a358_0x492ebe[_0x586a30(0x18f)](_0xa25f14,_0x586a30(0x198),_0x16604c,'package.json');if(a358_0x3ba077[_0x586a30(0x180)](_0x65a976)){const _0xfe1590=JSON[_0x586a30(0x17e)](a358_0x3ba077[_0x586a30(0x177)](_0x65a976,_0x586a30(0x173)));return _0xfe1590[_0x586a30(0x196)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x2c9ea0=a358_0xd6f9;try{const _0x203563=await getCdnConfig();return _0x203563?.[_0x2c9ea0(0x195)]?.[_0x2c9ea0(0x174)]?.[_0x2c9ea0(0x18a)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x4865d2=a358_0xd6f9;try{const _0x3f4e59=await getCdnConfig();return _0x3f4e59?.[_0x4865d2(0x195)]?.['node']?.['packageName']||'@lovrabet/sdk';}catch{return _0x4865d2(0x176);}}export async function checkSdkVersion(_0x58e856){const _0x3ad463=a358_0xd6f9,_0x4a87ff=a358_0x492ebe['join'](_0x58e856,_0x3ad463(0x186)),[_0x226013,_0x49628f]=await Promise[_0x3ad463(0x17d)]([getSdkStableVersion(),getSdkPackageName()]),_0xd42dc8=_0x226013||FALLBACK_MIN_SDK_VERSION;if(!a358_0x3ba077['existsSync'](_0x4a87ff))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xd42dc8,'packageName':_0x49628f,'stableVersion':_0x226013};try{const _0x3f19ac=JSON[_0x3ad463(0x17e)](a358_0x3ba077['readFileSync'](_0x4a87ff,_0x3ad463(0x17f))),_0x541534=_0x3f19ac[_0x3ad463(0x193)]||{},_0x4ad38d=_0x3f19ac['devDependencies']||{},_0x222535=_0x541534[_0x49628f]||_0x4ad38d[_0x49628f];if(!_0x222535)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xd42dc8,'packageName':_0x49628f,'stableVersion':_0x226013};let _0x376497=getInstalledVersion(_0x58e856,_0x49628f);!_0x376497&&(_0x376497=_0x222535);if(isNonNumericVersion(_0x222535))return{'installed':!![],'version':_0x376497,'needsUpgrade':![],'minVersion':_0xd42dc8,'packageName':_0x49628f,'stableVersion':_0x226013};const _0x5d9fe0=a358_0x552b7c[_0x3ad463(0x192)](_0x376497),_0x525b68=a358_0x552b7c['coerce'](_0xd42dc8),_0x48a882=_0x5d9fe0&&_0x525b68?a358_0x552b7c['lt'](_0x5d9fe0,_0x525b68):![];return{'installed':!![],'version':_0x376497,'needsUpgrade':_0x48a882,'minVersion':_0xd42dc8,'packageName':_0x49628f,'stableVersion':_0x226013};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xd42dc8,'packageName':_0x49628f,'stableVersion':_0x226013};}}export function checkSdkVersionSync(_0x6b9e12){const _0x48c8a1=a358_0xd6f9,_0x44d11f=a358_0x492ebe[_0x48c8a1(0x18f)](_0x6b9e12,_0x48c8a1(0x186)),_0x3ae5e3=_0x48c8a1(0x176);if(!a358_0x3ba077[_0x48c8a1(0x180)](_0x44d11f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3ae5e3,'stableVersion':null};try{const _0x3df7dd=JSON[_0x48c8a1(0x17e)](a358_0x3ba077[_0x48c8a1(0x177)](_0x44d11f,'utf8')),_0x11921b=_0x3df7dd[_0x48c8a1(0x193)]||{},_0x601c84=_0x3df7dd[_0x48c8a1(0x182)]||{},_0x94e950=_0x11921b[_0x3ae5e3]||_0x601c84[_0x3ae5e3];if(!_0x94e950)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3ae5e3,'stableVersion':null};let _0xf2da52=getInstalledVersion(_0x6b9e12,_0x3ae5e3);!_0xf2da52&&(_0xf2da52=_0x94e950);if(isNonNumericVersion(_0x94e950))return{'installed':!![],'version':_0xf2da52,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3ae5e3,'stableVersion':null};const _0x422ea7=a358_0x552b7c[_0x48c8a1(0x192)](_0xf2da52),_0x23f18b=_0x422ea7?a358_0x552b7c['lt'](_0x422ea7,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xf2da52,'needsUpgrade':_0x23f18b,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3ae5e3,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3ae5e3,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x17d637){const _0x76a93a=a358_0xd6f9;if(!_0x17d637[_0x76a93a(0x18d)])return;const _0x129c8c=_0x76a93a(0x17b),_0x3c1aa0=_0x76a93a(0x191),_0x472d58=_0x76a93a(0x187),_0x5b0846=_0x17d637[_0x76a93a(0x199)]||'@lovrabet/sdk',_0x5bcc72=_0x17d637[_0x76a93a(0x18a)]||_0x17d637[_0x76a93a(0x188)],_0x59e80f='npm\x20install\x20'+_0x5b0846+'@'+(_0x5bcc72||_0x76a93a(0x197));console[_0x76a93a(0x183)](),console['log'](''+_0x129c8c+_0x472d58+_0x76a93a(0x181)+_0x3c1aa0),console[_0x76a93a(0x183)](_0x129c8c+_0x76a93a(0x185)+_0x5b0846+'@'+_0x17d637['version']+_0x3c1aa0),console['log'](_0x129c8c+_0x76a93a(0x189)+_0x5bcc72+_0x3c1aa0),console[_0x76a93a(0x183)](_0x129c8c+_0x76a93a(0x18c)+_0x59e80f+_0x3c1aa0),console[_0x76a93a(0x183)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1858a5,_0x1c7efe){const _0x24a802=a359_0x271c,_0x41688a=_0x1858a5();while(!![]){try{const _0x169471=parseInt(_0x24a802(0x1e2))/0x1*(-parseInt(_0x24a802(0x1f6))/0x2)+parseInt(_0x24a802(0x1f9))/0x3+parseInt(_0x24a802(0x1e7))/0x4+parseInt(_0x24a802(0x1e0))/0x5*(parseInt(_0x24a802(0x1d8))/0x6)+-parseInt(_0x24a802(0x1f0))/0x7*(parseInt(_0x24a802(0x1fb))/0x8)+parseInt(_0x24a802(0x1e6))/0x9*(-parseInt(_0x24a802(0x1fa))/0xa)+-parseInt(_0x24a802(0x1db))/0xb;if(_0x169471===_0x1c7efe)break;else _0x41688a['push'](_0x41688a['shift']());}catch(_0x30e69e){_0x41688a['push'](_0x41688a['shift']());}}}(a359_0x30c8,0x44fdb));function a359_0x30c8(){const _0x4f6203=['1860Nfhmim','validation','stableVersion','2269377llKJee','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','utf-8','filter','Current\x20version:\x20','8830DEYQZs','join','8mRWwRE','\x20\x20\x20Recommended\x20stable:\x20','belowMinimum','\x1b[1m','90270KNjXBg','1192040xSQGQL','\x20\x20\x20Stable\x20version:\x20','coerce','parse','1.0.0','log','\x1b[33m','Upgrade\x20command:\x20','needsUpgrade','98581WJQLvq','\x20\x20\x20Upgrade\x20command:\x20','latest','upgradeMessage','\x20\x20\x20Minimum\x20supported:\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','7042GVMmtA','currentVersion','npm\x20install\x20-g\x20','962157eYLnzO','240AMNZXa','232mItERF','\x1b[31m','minimumVersion','minimumVersionMessage','\x20\x20\x20Current\x20CLI\x20version:\x20','../..','\x20\x20\x20'];a359_0x30c8=function(){return _0x4f6203;};return a359_0x30c8();}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a359_0x180512 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x1a4651){const _0x4b9034=a359_0x271c,_0x109377=_0x1a4651['stableVersion']||_0x4b9034(0x1f2);return _0x4b9034(0x1f8)+NPM_PACKAGE_NAME+'@'+_0x109377;}function getCurrentCliVersion(){const _0xd30589=a359_0x271c;try{const _0x3541e7=fileURLToPath(import.meta.url),_0x4a0faa=resolve(dirname(_0x3541e7),_0xd30589(0x1d6)),_0x4b8d86=resolve(_0x4a0faa,'package.json'),_0x4780c6=JSON[_0xd30589(0x1ea)](readFileSync(_0x4b8d86,_0xd30589(0x1dd)));return _0x4780c6['version']||_0xd30589(0x1eb);}catch{return _0xd30589(0x1eb);}}export async function checkCliVersion(){const _0x51206b=a359_0x271c,_0x23c5db=getCurrentCliVersion(),_0x1fd908=await getCliVersionPolicy(),_0x1764b3=_0x1fd908?.[_0x51206b(0x1da)]||null,_0x4f4db6=_0x1fd908?.[_0x51206b(0x1d3)]||null;let _0x484bb8=![],_0x20b9f0=![];const _0x4d8485=a359_0x180512[_0x51206b(0x1e9)](_0x23c5db);if(_0x4d8485&&_0x1764b3)try{const _0x5e49a7=a359_0x180512[_0x51206b(0x1e9)](_0x1764b3);if(_0x5e49a7)_0x484bb8=a359_0x180512['lt'](_0x4d8485,_0x5e49a7);}catch{}if(_0x4d8485&&_0x4f4db6)try{const _0x1ee154=a359_0x180512['coerce'](_0x4f4db6);if(_0x1ee154)_0x20b9f0=a359_0x180512['lt'](_0x4d8485,_0x1ee154);}catch{}return _0x20b9f0&&(_0x484bb8=!![]),{'currentVersion':_0x23c5db,'stableVersion':_0x1764b3,'minimumVersion':_0x4f4db6,'needsUpgrade':_0x484bb8,'belowMinimum':_0x20b9f0,'isPreRelease':![],'upgradeMessage':_0x1fd908?.[_0x51206b(0x1f3)],'minimumVersionMessage':_0x1fd908?.['minimumVersionMessage']};}function a359_0x271c(_0x20d7cc,_0x2180fe){_0x20d7cc=_0x20d7cc-0x1d2;const _0x30c83e=a359_0x30c8();let _0x271c99=_0x30c83e[_0x20d7cc];return _0x271c99;}export function printCliUpgradeWarning(_0x43f6d5){const _0x28ea69=a359_0x271c;if(!_0x43f6d5[_0x28ea69(0x1ef)]&&!_0x43f6d5[_0x28ea69(0x1e4)])return;const _0x19e36e=_0x28ea69(0x1d2),_0x292371=_0x28ea69(0x1ed),_0x16f8e8='\x1b[0m',_0x2f1823=_0x28ea69(0x1e5),_0x1f41b7=getCliUpgradeCommand(_0x43f6d5);console['log'](),_0x43f6d5[_0x28ea69(0x1e4)]?(console['log'](''+_0x19e36e+_0x2f1823+_0x28ea69(0x1f5)+_0x16f8e8),console[_0x28ea69(0x1ec)](_0x19e36e+_0x28ea69(0x1d5)+_0x43f6d5['currentVersion']+_0x16f8e8),_0x43f6d5['minimumVersion']&&console[_0x28ea69(0x1ec)](_0x19e36e+_0x28ea69(0x1f4)+_0x43f6d5['minimumVersion']+_0x16f8e8),_0x43f6d5[_0x28ea69(0x1da)]&&_0x43f6d5['stableVersion']!==_0x43f6d5['minimumVersion']&&console['log'](_0x19e36e+_0x28ea69(0x1e3)+_0x43f6d5['stableVersion']+_0x16f8e8),_0x43f6d5['minimumVersionMessage']&&console[_0x28ea69(0x1ec)](_0x19e36e+_0x28ea69(0x1d7)+_0x43f6d5['minimumVersionMessage']+_0x16f8e8),console[_0x28ea69(0x1ec)](_0x19e36e+_0x28ea69(0x1f1)+_0x1f41b7+_0x16f8e8)):(console['log'](''+_0x292371+_0x2f1823+'↪\x20New\x20version\x20available'+_0x16f8e8),console[_0x28ea69(0x1ec)](_0x292371+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x43f6d5[_0x28ea69(0x1f7)]+_0x16f8e8),console[_0x28ea69(0x1ec)](_0x292371+_0x28ea69(0x1e8)+_0x43f6d5[_0x28ea69(0x1da)]+_0x16f8e8),_0x43f6d5[_0x28ea69(0x1f3)]&&console[_0x28ea69(0x1ec)](_0x292371+_0x28ea69(0x1d7)+_0x43f6d5[_0x28ea69(0x1f3)]+_0x16f8e8),console[_0x28ea69(0x1ec)](_0x292371+_0x28ea69(0x1f1)+_0x1f41b7+_0x16f8e8)),console[_0x28ea69(0x1ec)]();}export function assertCliVersionSupported(_0x1f683f){const _0xf4da5=a359_0x271c;if(!_0x1f683f[_0xf4da5(0x1e4)])return;const _0x3b7a4a=[_0x1f683f[_0xf4da5(0x1d4)],_0xf4da5(0x1df)+_0x1f683f['currentVersion'],_0x1f683f['minimumVersion']?'Minimum\x20supported:\x20'+_0x1f683f[_0xf4da5(0x1d3)]:null,_0xf4da5(0x1ee)+getCliUpgradeCommand(_0x1f683f)][_0xf4da5(0x1de)](Boolean)[_0xf4da5(0x1e1)]('\x0a');throw CliErrors[_0xf4da5(0x1d9)](_0xf4da5(0x1dc),_0x3b7a4a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a360_0x67f7(){const _0x5b4784=['object','length','minimumVersion','abort','28399nScwmV','projectTemplate','391364GSRWgK','77623DctuPe','stableVersion','46PNNasq','prerelease','cli','4492008vuwLTj','string','now','55cUnCzi','json','upgradeMessage','signal','558FJsJKs','recommendedVersion','trim','5461280OkHIwP','2141976gXHGEC','minVersion','18476590uatINn','beta','valid','minimumVersionMessage'];a360_0x67f7=function(){return _0x5b4784;};return a360_0x67f7();}(function(_0x485132,_0x45223d){const _0x413185=a360_0x29b8,_0x586c18=_0x485132();while(!![]){try{const _0x559eab=-parseInt(_0x413185(0x106))/0x1*(-parseInt(_0x413185(0x10b))/0x2)+-parseInt(_0x413185(0x119))/0x3+-parseInt(_0x413185(0x108))/0x4*(parseInt(_0x413185(0x111))/0x5)+-parseInt(_0x413185(0x115))/0x6*(-parseInt(_0x413185(0x109))/0x7)+-parseInt(_0x413185(0x118))/0x8+-parseInt(_0x413185(0x10e))/0x9+parseInt(_0x413185(0x11b))/0xa;if(_0x559eab===_0x45223d)break;else _0x586c18['push'](_0x586c18['shift']());}catch(_0x4b81a7){_0x586c18['push'](_0x586c18['shift']());}}}(a360_0x67f7,0x88be2));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a360_0x167baa from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x65bda0){const _0x5a34a2=a360_0x29b8,_0xb26813=a360_0x167baa[_0x5a34a2(0x100)](_0x65bda0);return _0xb26813?a360_0x167baa[_0x5a34a2(0x10c)](_0xb26813)?.[0x0]==='beta':![];}export function resolveProjectTemplateDescriptor(_0x36eb2a,_0xf213e){const _0x4df01c=a360_0x29b8;if(isBetaCliVersion(_0xf213e))return _0x36eb2a[_0x4df01c(0x11c)]?.[_0x4df01c(0x107)]??_0x36eb2a[_0x4df01c(0x107)];return _0x36eb2a['projectTemplate'];}function pickString(_0x33274f){const _0x348164=a360_0x29b8;return typeof _0x33274f===_0x348164(0x10f)&&_0x33274f['trim']()[_0x348164(0x103)]>0x0?_0x33274f[_0x348164(0x117)]():null;}function normalizeCliVersionPolicy(_0x8a4e60){const _0x42c58b=a360_0x29b8;if(!_0x8a4e60||typeof _0x8a4e60!=='object')return null;const _0x4a8c50=_0x8a4e60,_0x403835=_0x4a8c50['cli']&&typeof _0x4a8c50[_0x42c58b(0x10d)]===_0x42c58b(0x102)?_0x4a8c50['cli']:_0x4a8c50,_0x10ebe1=pickString(_0x403835[_0x42c58b(0x10a)])||pickString(_0x403835['latestVersion'])||pickString(_0x403835[_0x42c58b(0x116)]),_0x2d4035=pickString(_0x403835[_0x42c58b(0x104)])||pickString(_0x403835[_0x42c58b(0x11a)]);if(!_0x10ebe1&&!_0x2d4035)return null;return{'stableVersion':_0x10ebe1,'minimumVersion':_0x2d4035,'upgradeMessage':pickString(_0x403835[_0x42c58b(0x113)])||undefined,'minimumVersionMessage':pickString(_0x403835[_0x42c58b(0x101)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x266149){const _0x26f387=a360_0x29b8,_0x5e43f3=new AbortController(),_0x486089=setTimeout(()=>_0x5e43f3[_0x26f387(0x105)](),FETCH_TIMEOUT_MS);try{const _0x5ed5ac=await fetch(_0x266149,{'headers':{'Accept':'application/json'},'signal':_0x5e43f3[_0x26f387(0x114)]});if(!_0x5ed5ac['ok'])return null;const _0x555abe=await _0x5ed5ac[_0x26f387(0x112)]();return _0x555abe&&typeof _0x555abe==='object'?_0x555abe:null;}catch{return null;}finally{clearTimeout(_0x486089);}}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}function a360_0x29b8(_0x22b01d,_0x4bfba6){_0x22b01d=_0x22b01d-0x100;const _0x67f7a=a360_0x67f7();let _0x29b82b=_0x67f7a[_0x22b01d];return _0x29b82b;}export async function fetchProjectTemplateCdnConfig(){const _0x456260=await getRabetbaseCdnConfig();return _0x456260?{'config':_0x456260,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x417d8a=a360_0x29b8,_0x153e13=Date[_0x417d8a(0x110)]();if(hasCachedConfig){const _0x341be9=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x153e13-cacheTime<_0x341be9)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x153e13,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_0x4fb366=a361_0x40cf;(function(_0x109918,_0x18ef40){const _0x37940a=a361_0x40cf,_0x2db0a8=_0x109918();while(!![]){try{const _0x5da085=-parseInt(_0x37940a(0x7d))/0x1*(parseInt(_0x37940a(0x85))/0x2)+parseInt(_0x37940a(0x7b))/0x3+parseInt(_0x37940a(0x7e))/0x4*(-parseInt(_0x37940a(0x82))/0x5)+parseInt(_0x37940a(0x81))/0x6*(-parseInt(_0x37940a(0x84))/0x7)+-parseInt(_0x37940a(0x7f))/0x8+-parseInt(_0x37940a(0x80))/0x9*(parseInt(_0x37940a(0x7c))/0xa)+-parseInt(_0x37940a(0x7a))/0xb*(-parseInt(_0x37940a(0x86))/0xc);if(_0x5da085===_0x18ef40)break;else _0x2db0a8['push'](_0x2db0a8['shift']());}catch(_0x18e8bb){_0x2db0a8['push'](_0x2db0a8['shift']());}}}(a361_0x55d9,0x22198));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a361_0x143060,getMultiAppConfigs as a361_0x3b9d75,getTemplateBaseUrl as a361_0x4983af}from'../context.js';function a361_0x55d9(){const _0x1fa7c3=['34704BmtyFE','4300fLtKpe','string','14WSxSSm','746gEgxai','4536Nrsfvk','project','env','13673qVqIWD','357696AGFfDj','1415110NlOLbV','299PHWTxG','484vNVrhS','645984DIqOux','9EJzbDz'];a361_0x55d9=function(){return _0x1fa7c3;};return a361_0x55d9();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x45b477){const _0x1b284d=a361_0x40cf,_0x25196b=readRawConfig(_0x45b477);return _0x25196b[_0x1b284d(0x79)]&&typeof _0x25196b[_0x1b284d(0x79)]===_0x1b284d(0x83)&&initEnv(_0x25196b['env']),_0x25196b;}export function getConfigAppCode(){return a361_0x143060();}export function getMultiAppConfigs(_0xcc181e=a361_0x4fb366(0x87)){return a361_0x3b9d75(_0xcc181e);}function a361_0x40cf(_0x43a026,_0x1cb1cd){_0x43a026=_0x43a026-0x79;const _0x55d9b9=a361_0x55d9();let _0x40cf9d=_0x55d9b9[_0x43a026];return _0x40cf9d;}export function getTemplateBaseUrl(){return a361_0x4983af();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16feb3,_0xb0c9e7){const _0x394e12=a362_0x2388,_0x17407a=_0x16feb3();while(!![]){try{const _0x194886=parseInt(_0x394e12(0x1d0))/0x1+-parseInt(_0x394e12(0x1c8))/0x2*(-parseInt(_0x394e12(0x1c6))/0x3)+-parseInt(_0x394e12(0x1ca))/0x4*(-parseInt(_0x394e12(0x1c2))/0x5)+parseInt(_0x394e12(0x1c3))/0x6+parseInt(_0x394e12(0x1cf))/0x7*(-parseInt(_0x394e12(0x1c5))/0x8)+-parseInt(_0x394e12(0x1c4))/0x9*(parseInt(_0x394e12(0x1c7))/0xa)+parseInt(_0x394e12(0x1c9))/0xb*(-parseInt(_0x394e12(0x1cd))/0xc);if(_0x194886===_0xb0c9e7)break;else _0x17407a['push'](_0x17407a['shift']());}catch(_0x2f4bf6){_0x17407a['push'](_0x17407a['shift']());}}}(a362_0x35aa,0x5a636));function a362_0x35aa(){const _0x1e6b67=['53244vPbQsP','number','21777ahBWUg','611103lpBxVu','object','126110ZMBAVb','649872mUkdlY','418635imrgTU','264yuGvYI','1384233TcDhhZ','30LZYAXR','2XwRIPC','2222MielSn','52EijXAM','isFinite','trim'];a362_0x35aa=function(){return _0x1e6b67;};return a362_0x35aa();}function toFiniteNumber(_0xad6df0){const _0x3924ab=a362_0x2388;if(typeof _0xad6df0===_0x3924ab(0x1ce)&&Number[_0x3924ab(0x1cb)](_0xad6df0))return _0xad6df0;if(typeof _0xad6df0==='string'){const _0x217537=_0xad6df0[_0x3924ab(0x1cc)]();if(!_0x217537)return undefined;const _0x1e02ea=Number(_0x217537);if(Number[_0x3924ab(0x1cb)](_0x1e02ea))return _0x1e02ea;}return undefined;}function a362_0x2388(_0x49df3d,_0xc3e60){_0x49df3d=_0x49df3d-0x1c1;const _0x35aa8=a362_0x35aa();let _0x23888d=_0x35aa8[_0x49df3d];return _0x23888d;}export function normalizeEntityWithIdResponse(_0x2361eb){const _0x37a473=a362_0x2388,_0x25ed30=toFiniteNumber(_0x2361eb);if(_0x25ed30!==undefined)return{'id':_0x25ed30,'entity':{'id':_0x25ed30}};if(!_0x2361eb||typeof _0x2361eb!==_0x37a473(0x1c1))return{'id':undefined,'entity':{}};const _0x1aa750={..._0x2361eb},_0x2683cc=toFiniteNumber(_0x1aa750['id']);return _0x2683cc!==undefined&&(_0x1aa750['id']=_0x2683cc),{'id':_0x2683cc,'entity':_0x1aa750};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x165c85,_0x2fcf3c){const _0x595a18=a363_0x3c9e,_0x162962=_0x165c85();while(!![]){try{const _0x3254f0=parseInt(_0x595a18(0xd8))/0x1*(parseInt(_0x595a18(0xd7))/0x2)+-parseInt(_0x595a18(0xd6))/0x3*(-parseInt(_0x595a18(0xd9))/0x4)+-parseInt(_0x595a18(0xda))/0x5+parseInt(_0x595a18(0xd4))/0x6*(parseInt(_0x595a18(0xd1))/0x7)+parseInt(_0x595a18(0xd5))/0x8+parseInt(_0x595a18(0xd2))/0x9*(-parseInt(_0x595a18(0xd3))/0xa)+-parseInt(_0x595a18(0xd0))/0xb;if(_0x3254f0===_0x2fcf3c)break;else _0x162962['push'](_0x162962['shift']());}catch(_0x3f1543){_0x162962['push'](_0x162962['shift']());}}}(a363_0xffab,0x22220));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x1ff59d,_0x2b5107){const _0x155575=a363_0x3c9e,_0x2e7e57=statSync(_0x1ff59d);if(_0x2e7e57[_0x155575(0xcf)]()){!existsSync(_0x2b5107)&&mkdirSync(_0x2b5107,{'recursive':!![]});const _0x1fd71e=readdirSync(_0x1ff59d);for(const _0x123f77 of _0x1fd71e){await copyDir(join(_0x1ff59d,_0x123f77),join(_0x2b5107,_0x123f77));}}else copyFileSync(_0x1ff59d,_0x2b5107);}export function ensureDir(_0x59431f){!existsSync(_0x59431f)&&mkdirSync(_0x59431f,{'recursive':!![]});}function a363_0xffab(){const _0xfa32c1=['244153mOxzqf','1791NHAwCv','4260QFUzsn','42rgTIsS','1680536VXNEBo','54729asqaBg','52yrgljT','8130mRDwDM','56wzvEyp','170230JAIpWB','isDirectory','7286114pEbDht'];a363_0xffab=function(){return _0xfa32c1;};return a363_0xffab();}function a363_0x3c9e(_0x36e2ca,_0x52a8d4){_0x36e2ca=_0x36e2ca-0xcf;const _0xffab82=a363_0xffab();let _0x3c9eb3=_0xffab82[_0x36e2ca];return _0x3c9eb3;}export function pathExists(_0x5e3e78){return existsSync(_0x5e3e78);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a364_0x595dd6=a364_0x3c33;(function(_0x16a6e0,_0x1e5fd4){const _0x19da40=a364_0x3c33,_0x518543=_0x16a6e0();while(!![]){try{const _0x243d10=parseInt(_0x19da40(0x1b6))/0x1*(parseInt(_0x19da40(0x1be))/0x2)+-parseInt(_0x19da40(0x1c0))/0x3+-parseInt(_0x19da40(0x1bf))/0x4*(parseInt(_0x19da40(0x1bc))/0x5)+parseInt(_0x19da40(0x1b2))/0x6*(parseInt(_0x19da40(0x1b9))/0x7)+parseInt(_0x19da40(0x1a6))/0x8*(parseInt(_0x19da40(0x1b0))/0x9)+parseInt(_0x19da40(0x1ba))/0xa*(-parseInt(_0x19da40(0x1c9))/0xb)+-parseInt(_0x19da40(0x1af))/0xc*(parseInt(_0x19da40(0x1b7))/0xd);if(_0x243d10===_0x1e5fd4)break;else _0x518543['push'](_0x518543['shift']());}catch(_0x20433e){_0x518543['push'](_0x518543['shift']());}}}(a364_0x18ed,0x46d51));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';function a364_0x18ed(){const _0x571e39=['74391yNJdyQ','statusText','status','.md','\x0a\x0a>更新时间:','trimEnd','.lovrabet/skill/guides','keys','join','22oywZnh','/skills/guides.json','push','lastUpdated','guides','2072zRtEwC','application/json','length','skillTemplate','title','CDN\x20data\x20is\x20missing\x20skillTemplate','replace','json','cache','830652JwXPRC','17658wSKOXw','content','471054SGUHXQ','map','CDN\x20returned\x20invalid\x20data','utf-8','63727mJulil','39TmJtMs','object','49NjTlKZ','2601380HGfUzu','extendContent','5EftiVD','entries','2xuDrLy','314332OHnSaZ'];a364_0x18ed=function(){return _0x571e39;};return a364_0x18ed();}import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x1b1502=a364_0x3c33,_0x461469=getTemplateBaseUrl();return _0x461469+_0x1b1502(0x1ca);}const CACHE_DIR=join(homedir(),'.lovrabet',a364_0x595dd6(0x1ae));export async function fetchGuidesFromCDN(){const _0x2cb2d9=a364_0x595dd6,_0x1cbf94=getGuidesCdnUrl(),_0x5c9237=await fetch(_0x1cbf94,{'headers':{'Accept':_0x2cb2d9(0x1a7)}});if(!_0x5c9237['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x5c9237[_0x2cb2d9(0x1c2)]+'\x20'+_0x5c9237[_0x2cb2d9(0x1c1)]);const _0x555837=await _0x5c9237[_0x2cb2d9(0x1ad)]();if(!_0x555837[_0x2cb2d9(0x1a5)]||typeof _0x555837[_0x2cb2d9(0x1a5)]!==_0x2cb2d9(0x1b8))throw new Error(_0x2cb2d9(0x1b4));return _0x555837;}export function writeGuidesToProject(_0x315754,_0x164e90,_0x32fda0=a364_0x595dd6(0x1c6),_0x4782a2){const _0x4950f9=a364_0x595dd6,_0x474616=join(_0x164e90,_0x32fda0);mkdirSync(_0x474616,{'recursive':!![]});for(const [_0x258dd7,_0x4d25c4]of Object[_0x4950f9(0x1bd)](_0x315754[_0x4950f9(0x1a5)])){let _0x374dd5=_0x4d25c4[_0x4950f9(0x1b1)];_0x4d25c4[_0x4950f9(0x1a4)]&&(_0x374dd5=appendUpdateTime(_0x374dd5,_0x4d25c4[_0x4950f9(0x1a4)])),writeFileSync(join(_0x474616,_0x258dd7+_0x4950f9(0x1c3)),_0x374dd5,_0x4950f9(0x1b5));}}export function appendUpdateTime(_0x3140f7,_0x19e502){const _0x1a4417=a364_0x595dd6;return _0x3140f7=_0x3140f7[_0x1a4417(0x1ac)](/\n*>更新时间:.*$/m,''),_0x3140f7[_0x1a4417(0x1c5)]()+(_0x1a4417(0x1c4)+_0x19e502);}export function getSkillTemplate(_0x5cd745){const _0x19558f=a364_0x595dd6;return _0x5cd745[_0x19558f(0x1a9)]?.[_0x19558f(0x1b1)]||'';}export function appendExtendContents(_0x2f2a7e,_0x17d5f5,_0x1dfa70){const _0x3f6c05=a364_0x595dd6,_0x29afa7=[];for(const [,_0xaab981]of Object['entries'](_0x17d5f5[_0x3f6c05(0x1a5)])){_0xaab981[_0x3f6c05(0x1bb)]&&_0x29afa7[_0x3f6c05(0x1a3)](_0xaab981[_0x3f6c05(0x1bb)][_0x3f6c05(0x1c5)]());}if(_0x29afa7[_0x3f6c05(0x1a8)]===0x0)return _0x2f2a7e;return _0x2f2a7e[_0x3f6c05(0x1c5)]()+'\x0a\x0a'+_0x29afa7[_0x3f6c05(0x1c8)]('\x0a\x0a')+'\x0a';}function a364_0x3c33(_0x18bd58,_0x4d07df){_0x18bd58=_0x18bd58-0x1a3;const _0x18eda3=a364_0x18ed();let _0x3c334f=_0x18eda3[_0x18bd58];return _0x3c334f;}export function writeSkillFile(_0x12b98d,_0x4f7cf8,_0x55420d){const _0x55cadb=a364_0x595dd6,_0x2be42f=getSkillTemplate(_0x12b98d);if(!_0x2be42f)throw new Error(_0x55cadb(0x1ab));const _0x46e654=dirname(_0x4f7cf8);mkdirSync(_0x46e654,{'recursive':!![]});let _0x432726=_0x2be42f[_0x55cadb(0x1ac)](/\{\{IDE_NAME\}\}/g,_0x55420d);_0x432726=appendExtendContents(_0x432726,_0x12b98d),_0x12b98d[_0x55cadb(0x1a9)][_0x55cadb(0x1a4)]&&(_0x432726=appendUpdateTime(_0x432726,_0x12b98d[_0x55cadb(0x1a9)][_0x55cadb(0x1a4)])),writeFileSync(_0x4f7cf8,_0x432726,_0x55cadb(0x1b5));}export async function installGuides(_0x2bb4ed){const _0x2ffeb4=a364_0x595dd6,_0x5c33ea=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5c33ea,_0x2bb4ed),Object[_0x2ffeb4(0x1c7)](_0x5c33ea[_0x2ffeb4(0x1a5)])[_0x2ffeb4(0x1a8)];}export function getGuidesSummary(_0x2a32d9){const _0x2641d6=a364_0x595dd6;return Object['entries'](_0x2a32d9['guides'])[_0x2641d6(0x1b3)](([_0x57864b,_0x40e7d9])=>({'key':_0x57864b,'title':_0x40e7d9[_0x2641d6(0x1aa)],'path':_0x40e7d9['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17be75,_0x3b0b2e){const _0x41979f=a365_0x2293,_0xdb3186=_0x17be75();while(!![]){try{const _0x57c653=parseInt(_0x41979f(0x78))/0x1+parseInt(_0x41979f(0x86))/0x2+-parseInt(_0x41979f(0x8f))/0x3+-parseInt(_0x41979f(0x7d))/0x4+parseInt(_0x41979f(0x79))/0x5*(-parseInt(_0x41979f(0x80))/0x6)+-parseInt(_0x41979f(0x7f))/0x7+parseInt(_0x41979f(0x88))/0x8*(parseInt(_0x41979f(0x82))/0x9);if(_0x57c653===_0x3b0b2e)break;else _0xdb3186['push'](_0xdb3186['shift']());}catch(_0x22a687){_0xdb3186['push'](_0xdb3186['shift']());}}}(a365_0x3e31,0x9441b));function a365_0x2293(_0x12c27c,_0x4fbb50){_0x12c27c=_0x12c27c-0x77;const _0x3e3186=a365_0x3e31();let _0x2293c2=_0x3e3186[_0x12c27c];return _0x2293c2;}export async function httpRequest(_0x5f4b75,_0x2194a5={}){const _0xe904cc=a365_0x2293,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x2194a5;let _0x1f0ef4=null;for(let _0x1122f4=0x0;_0x1122f4<=retries;_0x1122f4++){try{const _0x344112=new AbortController(),_0x24d176=setTimeout(()=>_0x344112[_0xe904cc(0x8a)](),timeout),_0x2d9ecc=await fetch(_0x5f4b75,{'headers':headers,'signal':_0x344112[_0xe904cc(0x81)]});clearTimeout(_0x24d176);let _0x3df179;const _0x37344b=_0x2d9ecc[_0xe904cc(0x84)][_0xe904cc(0x8b)]('content-type');return _0x37344b?.[_0xe904cc(0x87)](_0xe904cc(0x77))?_0x3df179=await _0x2d9ecc['json']():_0x3df179=await _0x2d9ecc[_0xe904cc(0x85)](),{'ok':_0x2d9ecc['ok'],'status':_0x2d9ecc[_0xe904cc(0x7b)],'statusText':_0x2d9ecc[_0xe904cc(0x7c)],'data':_0x3df179,'headers':_0x2d9ecc[_0xe904cc(0x84)],'url':_0x2d9ecc[_0xe904cc(0x8e)],'text':()=>_0x2d9ecc[_0xe904cc(0x85)]()};}catch(_0x346745){_0x1f0ef4=_0x346745 instanceof Error?_0x346745:new Error(String(_0x346745));if(_0x1122f4===retries)break;if(shouldRetry(_0x346745)){console[_0xe904cc(0x89)](_0xe904cc(0x83)+(_0x1122f4+0x1)+'\x20in\x20'+retryDelay+'ms...'),await sleep(retryDelay);continue;}else break;}}throw _0x1f0ef4||new Error('Request\x20failed');}function shouldRetry(_0x125e0b){const _0x3a77c0=a365_0x2293;if(_0x125e0b instanceof Error){if(_0x125e0b[_0x3a77c0(0x7a)]==='AbortError')return![];if(_0x125e0b['name']===_0x3a77c0(0x8d)&&_0x125e0b[_0x3a77c0(0x7e)][_0x3a77c0(0x87)]('fetch'))return!![];if(_0x125e0b[_0x3a77c0(0x7e)][_0x3a77c0(0x87)]('ECONNRESET'))return!![];if(_0x125e0b[_0x3a77c0(0x7e)]['includes'](_0x3a77c0(0x8c)))return![];}return![];}function sleep(_0x521122){return new Promise(_0x4326a1=>setTimeout(_0x4326a1,_0x521122));}export function validateUrl(_0xfc1b54){try{return new URL(_0xfc1b54),!![];}catch{return![];}}function a365_0x3e31(){const _0x5f3b27=['5vayNvb','name','status','statusText','4837624jtjXan','message','7014329vvQUzQ','2892426LtDvsn','signal','9PsFNnM','*\x20Request\x20failed;\x20retry\x20','headers','text','114608krkJmD','includes','23692664gNcCWW','log','abort','get','ENOTFOUND','TypeError','url','39831nChpfc','application/json','295173IHAach'];a365_0x3e31=function(){return _0x5f3b27;};return a365_0x3e31();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f5b24,_0x5606fc){const _0x3798de=a366_0x5528,_0x35f825=_0x1f5b24();while(!![]){try{const _0x221d0d=-parseInt(_0x3798de(0x140))/0x1+parseInt(_0x3798de(0x13a))/0x2+-parseInt(_0x3798de(0x13f))/0x3+-parseInt(_0x3798de(0x144))/0x4*(-parseInt(_0x3798de(0x142))/0x5)+-parseInt(_0x3798de(0x138))/0x6*(-parseInt(_0x3798de(0x136))/0x7)+-parseInt(_0x3798de(0x143))/0x8*(parseInt(_0x3798de(0x13b))/0x9)+-parseInt(_0x3798de(0x135))/0xa*(-parseInt(_0x3798de(0x13d))/0xb);if(_0x221d0d===_0x5606fc)break;else _0x35f825['push'](_0x35f825['shift']());}catch(_0x55d050){_0x35f825['push'](_0x35f825['shift']());}}}(a366_0x3992,0x402fe));function env(_0x3ae4c9){return process.env[`RABETBASE_${_0x3ae4c9}`]||process.env[`LOVRABET_${_0x3ae4c9}`]||undefined;}export function isNonInteractive(_0xc00b2e){const _0x47c62f=a366_0x5528;return!!(_0xc00b2e['nonInteractive']||_0xc00b2e['ci']||env('CI')===_0x47c62f(0x141)||process.env.CI==='true'||!process[_0x47c62f(0x137)][_0x47c62f(0x139)]||!isStdinRawModeSupported());}function a366_0x5528(_0x62966,_0x3b0aa7){_0x62966=_0x62966-0x134;const _0x3992ad=a366_0x3992();let _0x5528fe=_0x3992ad[_0x62966];return _0x5528fe;}function a366_0x3992(){const _0x16fcb0=['2459010HMUBbA','133Gidwia','stdout','64686zSEEmK','isTTY','176310CwcPiq','1126026XTFFJG','isRaw','22lPElbx','stdin','333462kzxhNx','179910SJgBMD','true','90325Mmracb','24eXFTQJ','32cwbbBD','setRawMode'];a366_0x3992=function(){return _0x16fcb0;};return a366_0x3992();}function isStdinRawModeSupported(){const _0x106a79=a366_0x5528;if(!process[_0x106a79(0x13e)][_0x106a79(0x139)])return![];try{const _0x58ef1d=process['stdin'][_0x106a79(0x13c)];return process[_0x106a79(0x13e)][_0x106a79(0x134)](!![]),process['stdin'][_0x106a79(0x134)](_0x58ef1d??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a367_0x596950=a367_0x5b3f;(function(_0x48479a,_0x1bd9b0){const _0x5a93fb=a367_0x5b3f,_0xff3e8e=_0x48479a();while(!![]){try{const _0x1f4d5c=parseInt(_0x5a93fb(0xaa))/0x1+parseInt(_0x5a93fb(0xb2))/0x2+parseInt(_0x5a93fb(0xa4))/0x3+-parseInt(_0x5a93fb(0x84))/0x4+parseInt(_0x5a93fb(0xa1))/0x5*(-parseInt(_0x5a93fb(0x93))/0x6)+-parseInt(_0x5a93fb(0xae))/0x7*(-parseInt(_0x5a93fb(0xaf))/0x8)+-parseInt(_0x5a93fb(0x99))/0x9;if(_0x1f4d5c===_0x1bd9b0)break;else _0xff3e8e['push'](_0xff3e8e['shift']());}catch(_0x220e15){_0xff3e8e['push'](_0xff3e8e['shift']());}}}(a367_0x2be0,0x375e8));import a367_0x8ac373 from'winston';import a367_0x430a30 from'node:fs';function a367_0x5b3f(_0x4100e2,_0x4ef6f6){_0x4100e2=_0x4100e2-0x7b;const _0x2be0ca=a367_0x2be0();let _0x5b3f2a=_0x2be0ca[_0x4100e2];return _0x5b3f2a;}import a367_0x5bc25e from'node:path';class Logger{['winstonLogger'];['logFilePath'];[a367_0x596950(0xa0)]='';constructor(){const _0x4809b1=a367_0x596950;this[_0x4809b1(0xa6)]='';}[a367_0x596950(0x9b)](_0x2e4a30){const _0x2b6202=a367_0x596950;this[_0x2b6202(0xa0)]=_0x2e4a30;}[a367_0x596950(0xad)](){const _0x4a54a6=a367_0x596950,_0x36c7b7=a367_0x5bc25e['dirname'](this[_0x4a54a6(0xa6)]);!a367_0x430a30[_0x4a54a6(0x80)](_0x36c7b7)&&a367_0x430a30[_0x4a54a6(0xa8)](_0x36c7b7,{'recursive':!![]});const _0x52591c=a367_0x8ac373[_0x4a54a6(0x82)][_0x4a54a6(0x83)](a367_0x8ac373[_0x4a54a6(0x82)][_0x4a54a6(0x8b)](),a367_0x8ac373[_0x4a54a6(0x82)][_0x4a54a6(0xa3)]({'stack':!![]}),a367_0x8ac373[_0x4a54a6(0x82)][_0x4a54a6(0xb1)](_0x36078e=>{const _0x498699=_0x4a54a6,_0x36a580={'timestamp':_0x36078e[_0x498699(0x8b)]||new Date()[_0x498699(0x87)](),'level':_0x36078e[_0x498699(0x86)]||_0x498699(0x8e),'command':_0x36078e[_0x498699(0x9d)]||_0x498699(0x81),'rawCommand':_0x36078e['rawCommand']||this[_0x498699(0xa0)]||undefined,'message':_0x36078e[_0x498699(0x7b)]||'','duration':_0x36078e[_0x498699(0x94)]||undefined,'details':_0x36078e[_0x498699(0x7c)]||undefined};return JSON['stringify'](_0x36a580);}));this[_0x4a54a6(0x8c)]=a367_0x8ac373[_0x4a54a6(0x7f)]({'level':_0x4a54a6(0x8e),'format':_0x52591c,'transports':[new a367_0x8ac373[(_0x4a54a6(0x7d))]['File']({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a367_0x8ac373[_0x4a54a6(0x89)]({'success':_0x4a54a6(0x8f),'error':_0x4a54a6(0x98),'warn':_0x4a54a6(0xab),'info':_0x4a54a6(0xb3)});}[a367_0x596950(0x7e)](_0x1e2963){const _0x433476=a367_0x596950;this[_0x433476(0xa6)]=a367_0x5bc25e['join'](_0x1e2963,'.lovrabet.log'),this[_0x433476(0x8c)]&&this[_0x433476(0x8c)][_0x433476(0x92)](),this[_0x433476(0xad)]();}[a367_0x596950(0x8e)](_0x3f4039,_0x5f5737,_0x5604af){const _0x3bd18e=a367_0x596950;if(!this[_0x3bd18e(0xa6)]||!this['winstonLogger'])return;this[_0x3bd18e(0x8c)][_0x3bd18e(0x8e)](_0x5f5737,{'command':_0x3f4039,'details':_0x5604af});}[a367_0x596950(0xb0)](_0x3ce952,_0x15201f,_0x38e3e8,_0x5a325c){const _0x5d1bb2=a367_0x596950;if(!this['logFilePath']||!this[_0x5d1bb2(0x8c)])return;this[_0x5d1bb2(0x8c)][_0x5d1bb2(0x85)](_0x5d1bb2(0x8e),_0x15201f,{'level':'success','command':_0x3ce952,'duration':_0x38e3e8,'details':_0x5a325c});}[a367_0x596950(0xa7)](_0x3ab550,_0x129319,_0x3b813f){const _0x1636b2=a367_0x596950;if(!this[_0x1636b2(0xa6)]||!this[_0x1636b2(0x8c)])return;this[_0x1636b2(0x8c)][_0x1636b2(0xa7)](_0x129319,{'command':_0x3ab550,'details':_0x3b813f});}[a367_0x596950(0x96)](_0x56e093,_0x1ef310,_0x2dc449){const _0x4b2bdc=a367_0x596950;if(!this[_0x4b2bdc(0xa6)]||!this['winstonLogger'])return;this[_0x4b2bdc(0x8c)][_0x4b2bdc(0x96)](_0x1ef310,{'command':_0x56e093,'details':_0x2dc449});}async[a367_0x596950(0x8d)](_0x581642,_0x2f3704,_0x59f7be){const _0x2f7237=a367_0x596950,_0x33834e=Date[_0x2f7237(0x91)]();this[_0x2f7237(0x8e)](_0x581642,_0x2f7237(0x95)+_0x2f3704);try{const _0x5dd3f7=await _0x59f7be(),_0xcea6e6=Date[_0x2f7237(0x91)]()-_0x33834e;return this[_0x2f7237(0xb0)](_0x581642,_0x2f7237(0x9f)+_0x2f3704,_0xcea6e6),_0x5dd3f7;}catch(_0x3f1927){const _0x45782b=Date[_0x2f7237(0x91)]()-_0x33834e;this[_0x2f7237(0xa7)](_0x581642,_0x2f7237(0xa5)+_0x2f3704,{'error':_0x3f1927 instanceof Error?_0x3f1927[_0x2f7237(0x7b)]:String(_0x3f1927),'duration':_0x45782b});throw _0x3f1927;}}[a367_0x596950(0x8a)](){const _0x491d6a=a367_0x596950;try{if(!a367_0x430a30[_0x491d6a(0x80)](this[_0x491d6a(0xa6)]))return[];const _0x1c823c=a367_0x430a30[_0x491d6a(0x97)](this[_0x491d6a(0xa6)],_0x491d6a(0x9a));return _0x1c823c['split']('\x0a')['filter'](_0x5024a3=>_0x5024a3['trim']())[_0x491d6a(0xac)](_0x325829=>JSON[_0x491d6a(0x9e)](_0x325829));}catch(_0x56f4f7){return console['warn'](_0x491d6a(0x88),_0x56f4f7),[];}}[a367_0x596950(0xa2)](){const _0x2c146c=a367_0x596950;try{a367_0x430a30[_0x2c146c(0x80)](this[_0x2c146c(0xa6)])&&a367_0x430a30[_0x2c146c(0xa9)](this[_0x2c146c(0xa6)],'',_0x2c146c(0x9a));}catch(_0x54a989){console['warn'](_0x2c146c(0x90),_0x54a989);}}[a367_0x596950(0x9c)](){const _0x46bd62=a367_0x596950;return this[_0x46bd62(0x8c)];}}function a367_0x2be0(){const _0x5c41a6=['writeFileSync','397085ydaagO','yellow','map','initWinstonLogger','653947UverMl','16bfHtmN','success','printf','117250juGwMH','blue','message','details','transports','setLogPath','createLogger','existsSync','unknown','format','combine','648696KlMsnr','log','level','toISOString','Failed\x20to\x20read\x20logs:','addColors','readLogs','timestamp','winstonLogger','logTask','info','green','Failed\x20to\x20clear\x20logs:','now','clear','852918uirQpk','duration','Starting:\x20','warn','readFileSync','red','1950894vqUKCq','utf8','setRawCommand','getWinstonInstance','command','parse','Completed:\x20','currentRawCommand','15tHnocz','clearLogs','errors','1168917tZstJT','Failed:\x20','logFilePath','error','mkdirSync'];a367_0x2be0=function(){return _0x5c41a6;};return a367_0x2be0();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36a3ed,_0x36c707){const _0x2bd863=a368_0xcc7c,_0x4d9a2f=_0x36a3ed();while(!![]){try{const _0x4d8dbc=-parseInt(_0x2bd863(0xd9))/0x1+parseInt(_0x2bd863(0xd7))/0x2+-parseInt(_0x2bd863(0xe2))/0x3+parseInt(_0x2bd863(0xd2))/0x4*(-parseInt(_0x2bd863(0xde))/0x5)+parseInt(_0x2bd863(0xdb))/0x6*(parseInt(_0x2bd863(0xe1))/0x7)+-parseInt(_0x2bd863(0xd3))/0x8+-parseInt(_0x2bd863(0xdf))/0x9*(-parseInt(_0x2bd863(0xd4))/0xa);if(_0x4d8dbc===_0x36c707)break;else _0x4d9a2f['push'](_0x4d9a2f['shift']());}catch(_0xb50fa1){_0x4d9a2f['push'](_0x4d9a2f['shift']());}}}(a368_0x505b,0x67672));import{CliErrors}from'../errors.js';function a368_0xcc7c(_0x2423e7,_0x2697f7){_0x2423e7=_0x2423e7-0xd2;const _0x505b85=a368_0x505b();let _0xcc7c7b=_0x505b85[_0x2423e7];return _0xcc7c7b;}export function parseJsonParams(_0x53abb3){const _0x4771d6=a368_0xcc7c;if(!_0x53abb3)return undefined;let _0x23ee2d;try{_0x23ee2d=JSON[_0x4771d6(0xda)](_0x53abb3);}catch{throw CliErrors['validation'](_0x4771d6(0xd6)+_0x53abb3);}if(!_0x23ee2d||typeof _0x23ee2d!==_0x4771d6(0xd8)||Array[_0x4771d6(0xe0)](_0x23ee2d))throw CliErrors[_0x4771d6(0xd5)](_0x4771d6(0xdc),_0x4771d6(0xdd));return _0x23ee2d;}function a368_0x505b(){const _0x5aa5a7=['--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','10NoBGXj','13885524mxXUpi','isArray','176029oQQqXn','282165MzlkGf','115408QXGxfg','5058480ZoMRUT','10BEkTMQ','validation','Invalid\x20JSON\x20for\x20--params:\x20','293054YdLpCR','object','733226micNnI','parse','60bMVmLK'];a368_0x505b=function(){return _0x5aa5a7;};return a368_0x505b();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a369_0x6c1350=a369_0x2fdb;function a369_0x2fdb(_0x9b49b0,_0x551560){_0x9b49b0=_0x9b49b0-0x1a9;const _0xc8dbe9=a369_0xc8db();let _0x2fdb57=_0xc8dbe9[_0x9b49b0];return _0x2fdb57;}(function(_0x5e1e2d,_0x7a9ff4){const _0x2e2011=a369_0x2fdb,_0x4bba49=_0x5e1e2d();while(!![]){try{const _0x4fdc82=parseInt(_0x2e2011(0x1ab))/0x1+parseInt(_0x2e2011(0x1af))/0x2+-parseInt(_0x2e2011(0x1ac))/0x3*(parseInt(_0x2e2011(0x1b0))/0x4)+parseInt(_0x2e2011(0x1b3))/0x5+parseInt(_0x2e2011(0x1b5))/0x6*(parseInt(_0x2e2011(0x1a9))/0x7)+parseInt(_0x2e2011(0x1b4))/0x8*(parseInt(_0x2e2011(0x1ae))/0x9)+parseInt(_0x2e2011(0x1b2))/0xa*(-parseInt(_0x2e2011(0x1ad))/0xb);if(_0x4fdc82===_0x7a9ff4)break;else _0x4bba49['push'](_0x4bba49['shift']());}catch(_0x569f52){_0x4bba49['push'](_0x4bba49['shift']());}}}(a369_0xc8db,0x96d03));function a369_0xc8db(){const _0x2c008b=['371097RnRPGT','1382180qSTdvv','567524uBxRNg','.cmd','10rrjdJD','504310sdEIRB','112FTqWCQ','12492jdDblD','3101fcaXNc','win32','1126793dOEXrj','24okfGyv','18321094vtrwlf'];a369_0xc8db=function(){return _0x2c008b;};return a369_0xc8db();}export const isWindows=process['platform']===a369_0x6c1350(0x1aa);export function resolveNpmBin(_0x4c7a8e){const _0x1ec998=a369_0x6c1350;return isWindows?_0x4c7a8e+_0x1ec998(0x1b1):_0x4c7a8e;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0xc42637){return new Promise(_0x36297b=>setTimeout(_0x36297b,_0xc42637));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a371_0x9fa5(){const _0x5f3e96=['processTemplate','formatLocalTimestamp','.tpl','replaceApiContent','getDate','readFile','datasetCode:\x20\x22','.js','946068SwNPvR','.scss','YourModel','pad','isDirectory','alias:\x20\x22','replaceContent','.md','template','mkdir','getHours','toLowerCase','12410704aesrOr','878634SgcNKY','extname','success','join','name','pop','Template\x20content\x20replacement\x20completed','alias','sdk-config','getMonth','processDirectory','tableName','654090fjtjQn','isFile','toUpperCase','error','split','\x0a\x20\x20\x20\x20{\x20','21MhuILx','.css','toDisplayTitle','utf8','message','endsWith','tableName:\x20\x22','toComponentName','push','padStart','.json','.tsx','now','getMinutes','slice','map','2365458wKnNuh','promises','api','copyFile','2749720ksZPjr','datasetCode','\x20},','name:\x20\x22','processFile','1593632ezkDbk','replace','getFullYear'];a371_0x9fa5=function(){return _0x5f3e96;};return a371_0x9fa5();}function a371_0x28e2(_0x50edf4,_0x123335){_0x50edf4=_0x50edf4-0x96;const _0x9fa5a0=a371_0x9fa5();let _0x28e2bc=_0x9fa5a0[_0x50edf4];return _0x28e2bc;}const a371_0xfab69c=a371_0x28e2;(function(_0x4f91e9,_0x53710e){const _0x5b2dbc=a371_0x28e2,_0xafaa19=_0x4f91e9();while(!![]){try{const _0x36885e=parseInt(_0x5b2dbc(0xcd))/0x1+parseInt(_0x5b2dbc(0xc1))/0x2+-parseInt(_0x5b2dbc(0xa0))/0x3+-parseInt(_0x5b2dbc(0xa9))/0x4+-parseInt(_0x5b2dbc(0xa4))/0x5+parseInt(_0x5b2dbc(0xb4))/0x6*(-parseInt(_0x5b2dbc(0xd3))/0x7)+parseInt(_0x5b2dbc(0xc0))/0x8;if(_0x36885e===_0x53710e)break;else _0xafaa19['push'](_0xafaa19['shift']());}catch(_0x27816a){_0xafaa19['push'](_0xafaa19['shift']());}}}(a371_0x9fa5,0x6a2b9));import a371_0x2ec498 from'node:fs';import a371_0x4ca15c from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a371_0xfab69c(0xb7)](_0x42bab3){const _0x3c0929=a371_0xfab69c;return String(_0x42bab3)[_0x3c0929(0x99)](0x2,'0');}static[a371_0xfab69c(0xad)](_0x399bf1){const _0x494ad4=a371_0xfab69c,_0x2f0af2=_0x399bf1[_0x494ad4(0xab)](),_0x131236=this[_0x494ad4(0xb7)](_0x399bf1[_0x494ad4(0xca)]()+0x1),_0x3bd480=this[_0x494ad4(0xb7)](_0x399bf1[_0x494ad4(0xb0)]()),_0x38a5f0=this[_0x494ad4(0xb7)](_0x399bf1[_0x494ad4(0xbe)]()),_0xccf300=this[_0x494ad4(0xb7)](_0x399bf1[_0x494ad4(0x9d)]()),_0x1c8f4a=this['pad'](_0x399bf1['getSeconds']());return{'createdAt':_0x2f0af2+'-'+_0x131236+'-'+_0x3bd480+'\x20'+_0x38a5f0+':'+_0xccf300+':'+_0x1c8f4a,'createdDate':_0x2f0af2+'-'+_0x131236+'-'+_0x3bd480,'createdTime':_0x38a5f0+':'+_0xccf300+':'+_0x1c8f4a};}static['toComponentName'](_0x5e8f62){const _0x52f975=a371_0xfab69c,_0x459341=_0x5e8f62[_0x52f975(0xd1)]('/')[_0x52f975(0xc6)]()||_0x5e8f62;return _0x459341['split']('-')[_0x52f975(0x9f)](_0x45b272=>_0x45b272['charAt'](0x0)[_0x52f975(0xcf)]()+_0x45b272[_0x52f975(0x9e)](0x1)[_0x52f975(0xbf)]())[_0x52f975(0xc4)]('');}static[a371_0xfab69c(0xd5)](_0x575780){const _0x4574e9=a371_0xfab69c,_0x31ad28=_0x575780[_0x4574e9(0xd1)]('/')[_0x4574e9(0xc6)]()||_0x575780;return _0x31ad28[_0x4574e9(0xd1)]('-')[_0x4574e9(0x9f)](_0x1052f6=>_0x1052f6['charAt'](0x0)[_0x4574e9(0xcf)]()+_0x1052f6[_0x4574e9(0x9e)](0x1)['toLowerCase']())[_0x4574e9(0xc4)]('\x20');}static[a371_0xfab69c(0xba)](_0x1c07e6,_0x5afd4e,_0x11ef51){const _0xaf6da8=a371_0xfab69c,_0x54541c=this[_0xaf6da8(0x97)](_0x5afd4e),_0xc13c02=this['toDisplayTitle'](_0x5afd4e),{createdAt:_0x592699,createdDate:_0x4f8bca,createdTime:_0x5f50bd}=this[_0xaf6da8(0xad)](new Date());let _0x5dc5da=_0x1c07e6[_0xaf6da8(0xaa)](/\{CliVersion\}/g,CLI_VERSION)[_0xaf6da8(0xaa)](/\{ComponentName\}/g,_0x54541c)[_0xaf6da8(0xaa)](/\{DisplayTitle\}/g,_0xc13c02)[_0xaf6da8(0xaa)](/\{PageName\}/g,_0x5afd4e)[_0xaf6da8(0xaa)](/\{TemplateName\}/g,_0x11ef51)[_0xaf6da8(0xaa)](/\{CreatedAt\}/g,_0x592699)[_0xaf6da8(0xaa)](/\{CreatedDate\}/g,_0x4f8bca)[_0xaf6da8(0xaa)](/\{CreatedTime\}/g,_0x5f50bd);return _0x5dc5da;}static[a371_0xfab69c(0xaf)](_0x3351f6,_0x5f3a88,_0x8c849f,_0x20d15c,_0x3a0b04,_0x7f87a8,_0xddd83e,_0x10e245,_0x494d29){const _0x4b3320=a371_0xfab69c,_0x213f3f=new Date(),_0x3a7849=_0x213f3f['toISOString'](),_0x1fcb69=_0x8c849f[_0x4b3320(0x9f)](_0x367845=>{const _0x5b1d83=_0x4b3320,_0x52158c=[_0x5b1d83(0xb2)+_0x367845[_0x5b1d83(0xa5)]+'\x22',_0x5b1d83(0x96)+_0x367845[_0x5b1d83(0xcc)]+'\x22',_0x5b1d83(0xa7)+_0x367845[_0x5b1d83(0xc5)]+'\x22'];return _0x367845[_0x5b1d83(0xc8)]&&_0x52158c[_0x5b1d83(0x98)](_0x5b1d83(0xb9)+_0x367845['alias']+'\x22'),_0x5b1d83(0xd2)+_0x52158c['join'](',\x20')+_0x5b1d83(0xa6);})['join'](''),_0x45d202=_0x20d15c||_0x8c849f[0x0]?.[_0x4b3320(0xc8)]||_0x4b3320(0xb6);let _0x53fbdf=_0x3351f6[_0x4b3320(0xaa)](/\{AppCode\}/g,_0x5f3a88)[_0x4b3320(0xaa)](/\{ModelConfigs\}/g,_0x1fcb69)[_0x4b3320(0xaa)](/\{ExampleModelName\}/g,_0x45d202)[_0x4b3320(0xaa)](/\{ApiFileName\}/g,_0x3a0b04||_0x4b3320(0xa2))[_0x4b3320(0xaa)](/\{ConfigName\}/g,_0x7f87a8||'default')[_0x4b3320(0xaa)](/\{ClientConfigParam\}/g,_0xddd83e||'')[_0x4b3320(0xaa)](/\{SdkConfigFileName\}/g,_0x494d29||_0x4b3320(0xc9))['replace'](/\{VarPrefix\}/g,_0x10e245||'LOVRABET')[_0x4b3320(0xaa)](/\{CreatedAt\}/g,_0x3a7849);return _0x53fbdf;}static async[a371_0xfab69c(0xac)](_0x51d2f0,_0x5357d9,_0x5a06f0,_0x3d2326,_0x461e61=!![]){const _0x1b755a=a371_0xfab69c,_0x592747=Date[_0x1b755a(0x9c)]();try{_0x461e61&&logger['info'](_0x1b755a(0xbc),'Starting\x20template\x20content\x20replacement',{'templatePath':_0x51d2f0,'targetPath':_0x5357d9,'pageName':_0x5a06f0,'templateName':_0x3d2326});await a371_0x2ec498[_0x1b755a(0xa1)][_0x1b755a(0xbd)](_0x5357d9,{'recursive':!![]}),await this['processDirectory'](_0x51d2f0,_0x5357d9,_0x5a06f0,_0x3d2326);if(_0x461e61){const _0xf519a3=Date[_0x1b755a(0x9c)]()-_0x592747;logger[_0x1b755a(0xc3)](_0x1b755a(0xbc),_0x1b755a(0xc7),_0xf519a3,{'pageName':_0x5a06f0,'templateName':_0x3d2326});}}catch(_0x526dd6){if(_0x461e61){const _0x47efb8=Date[_0x1b755a(0x9c)]()-_0x592747;logger[_0x1b755a(0xd0)](_0x1b755a(0xbc),'Template\x20content\x20replacement\x20failed',{'templatePath':_0x51d2f0,'targetPath':_0x5357d9,'pageName':_0x5a06f0,'templateName':_0x3d2326,'error':_0x526dd6 instanceof Error?_0x526dd6[_0x1b755a(0xd7)]:String(_0x526dd6),'duration':_0x47efb8});}throw _0x526dd6;}}static async[a371_0xfab69c(0xcb)](_0x273863,_0x5ae83b,_0xa36cc6,_0x9affad){const _0x5f2622=a371_0xfab69c,_0x28bfda=await a371_0x2ec498[_0x5f2622(0xa1)]['readdir'](_0x273863,{'withFileTypes':!![]});for(const _0x231c0b of _0x28bfda){const _0x2fdb97=a371_0x4ca15c[_0x5f2622(0xc4)](_0x273863,_0x231c0b[_0x5f2622(0xc5)]);let _0x27a315=a371_0x4ca15c['join'](_0x5ae83b,_0x231c0b['name']);_0x231c0b['name'][_0x5f2622(0xd8)]('.tpl')&&(_0x27a315=a371_0x4ca15c[_0x5f2622(0xc4)](_0x5ae83b,_0x231c0b[_0x5f2622(0xc5)][_0x5f2622(0xaa)](/\.tpl$/,'')));if(_0x231c0b[_0x5f2622(0xb8)]())await a371_0x2ec498[_0x5f2622(0xa1)][_0x5f2622(0xbd)](_0x27a315,{'recursive':!![]}),await this[_0x5f2622(0xcb)](_0x2fdb97,_0x27a315,_0xa36cc6,_0x9affad);else _0x231c0b[_0x5f2622(0xce)]()&&await this[_0x5f2622(0xa8)](_0x2fdb97,_0x27a315,_0xa36cc6,_0x9affad);}}static async[a371_0xfab69c(0xa8)](_0x5d0291,_0x526d49,_0x1945f5,_0x53068c){const _0x4ae525=a371_0xfab69c,_0x25305f=a371_0x4ca15c[_0x4ae525(0xc2)](_0x5d0291)[_0x4ae525(0xbf)]();_0x5d0291[_0x4ae525(0xd8)](_0x4ae525(0xae))&&(_0x526d49=_0x526d49['replace'](/\.tpl$/,''));const _0x51f38c=[_0x4ae525(0x9b),'.ts','.jsx',_0x4ae525(0xb3),_0x4ae525(0x9a),_0x4ae525(0xbb),_0x4ae525(0xd4),_0x4ae525(0xb5),'.tpl'];if(_0x51f38c['includes'](_0x25305f)||_0x5d0291[_0x4ae525(0xd8)](_0x4ae525(0xae))){const _0x9515c=await a371_0x2ec498[_0x4ae525(0xa1)][_0x4ae525(0xb1)](_0x5d0291,'utf8'),_0x4d1a2d=this[_0x4ae525(0xba)](_0x9515c,_0x1945f5,_0x53068c);await a371_0x2ec498[_0x4ae525(0xa1)]['writeFile'](_0x526d49,_0x4d1a2d,_0x4ae525(0xd6));}else await a371_0x2ec498['promises'][_0x4ae525(0xa3)](_0x5d0291,_0x526d49);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ff2de,_0x344ccc){const _0x3a2a64=a372_0x52aa,_0x3dce66=_0x5ff2de();while(!![]){try{const _0x27c5b1=-parseInt(_0x3a2a64(0x1c5))/0x1*(parseInt(_0x3a2a64(0x1be))/0x2)+parseInt(_0x3a2a64(0x1cb))/0x3*(-parseInt(_0x3a2a64(0x1b3))/0x4)+parseInt(_0x3a2a64(0x1cf))/0x5*(parseInt(_0x3a2a64(0x1ce))/0x6)+parseInt(_0x3a2a64(0x1b4))/0x7+parseInt(_0x3a2a64(0x1c3))/0x8+-parseInt(_0x3a2a64(0x1bd))/0x9*(-parseInt(_0x3a2a64(0x1b7))/0xa)+parseInt(_0x3a2a64(0x1d2))/0xb*(parseInt(_0x3a2a64(0x1c9))/0xc);if(_0x27c5b1===_0x344ccc)break;else _0x3dce66['push'](_0x3dce66['shift']());}catch(_0x3caf72){_0x3dce66['push'](_0x3dce66['shift']());}}}(a372_0x2b6e,0x4608b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a372_0x16e727 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_0x52aa(_0x13dfe7,_0x6a5e01){_0x13dfe7=_0x13dfe7-0x1b2;const _0x2b6e75=a372_0x2b6e();let _0x52aa00=_0x2b6e75[_0x13dfe7];return _0x52aa00;}function isUpdateNoticeDisabled(){const _0x3bafe0=a372_0x52aa,_0x4935a9=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x3bafe0(0x1c6)]()[_0x3bafe0(0x1b6)]();return _0x4935a9==='1'||_0x4935a9===_0x3bafe0(0x1cd)||_0x4935a9==='yes';}function cacheRoot(){const _0x2f1cfe=a372_0x52aa;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2f1cfe(0x1b5));}export function getUpdateNoticeCachePath(){const _0x16a515=a372_0x52aa;return join(cacheRoot(),_0x16a515(0x1ba),'update-check.json');}function a372_0x2b6e(){const _0x55858c=['valid','true','6cvlOAB','1742095aCrCOJ','number','gte','1668491oYUbgV','now','4CKQTIZ','1810851wuYFwI','.cache','toLowerCase','590HNsSBJ','stringify',',\x20run:\x20','rabetbase-cli','parse','/v/','17676vNzLxN','182bcusvU','utf8','lastNotifiedVersion','\x20update','lastNotifiedAt','543104bFcmmT','stableVersion','3135zyTWja','trim','\x20available,\x20current\x20','checkedAt','24QeCIqB','https://www.npmjs.com/package/','1566282INxNsG'];a372_0x2b6e=function(){return _0x55858c;};return a372_0x2b6e();}async function readUpdateNoticeCache(){const _0x17b45f=a372_0x52aa;try{const _0x5d6e61=await readFile(getUpdateNoticeCachePath(),_0x17b45f(0x1bf)),_0xa95471=JSON[_0x17b45f(0x1bb)](_0x5d6e61);if(!_0xa95471||typeof _0xa95471!=='object')return{};return _0xa95471;}catch{return{};}}async function writeUpdateNoticeCache(_0x2718a1){const _0x1794d1=a372_0x52aa;try{const _0xd109d8=getUpdateNoticeCachePath();await mkdir(dirname(_0xd109d8),{'recursive':!![]}),await writeFile(_0xd109d8,JSON[_0x1794d1(0x1b8)](_0x2718a1,null,0x2)+'\x0a',_0x1794d1(0x1bf));}catch{}}function isFreshCheck(_0x1ee245,_0x1971f1){const _0x3fc012=a372_0x52aa;return typeof _0x1ee245[_0x3fc012(0x1c8)]==='number'&&_0x1971f1-_0x1ee245['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1124ab,_0x3702da,_0x71c052){const _0x1793f5=a372_0x52aa;return _0x1124ab[_0x1793f5(0x1c0)]===_0x3702da&&typeof _0x1124ab['lastNotifiedAt']===_0x1793f5(0x1d0)&&_0x71c052-_0x1124ab[_0x1793f5(0x1c2)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x284bff){const _0x47ee12=a372_0x52aa;return _0x47ee12(0x1ca)+NPM_PACKAGE_NAME+_0x47ee12(0x1bc)+_0x284bff;}export async function resolveLatestUpdateNotice(){const _0x423aab=a372_0x52aa;if(isUpdateNoticeDisabled())return null;try{const _0x300f45=Date[_0x423aab(0x1b2)](),_0x246d5b=getCliVersion(),_0x28175e=await readUpdateNoticeCache();let _0xd25532=isFreshCheck(_0x28175e,_0x300f45)?_0x28175e['latest']?.[_0x423aab(0x1c6)]():undefined;if(!_0xd25532&&!isFreshCheck(_0x28175e,_0x300f45)){const _0x949ffe=await getCliVersionPolicy();_0xd25532=_0x949ffe?.[_0x423aab(0x1c4)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x28175e,'checkedAt':_0x300f45,'latest':_0xd25532,'failed':!_0xd25532});}if(!_0xd25532||!a372_0x16e727['valid'](_0x246d5b)||!a372_0x16e727[_0x423aab(0x1cc)](_0xd25532))return null;if(a372_0x16e727[_0x423aab(0x1d1)](_0x246d5b,_0xd25532))return null;if(isRecentlyNotified(_0x28175e,_0xd25532,_0x300f45))return null;const _0x2d0b03=CLI_BIN_NAME+_0x423aab(0x1c1);return await writeUpdateNoticeCache({..._0x28175e,'checkedAt':isFreshCheck(_0x28175e,_0x300f45)?_0x28175e['checkedAt']:_0x300f45,'latest':_0xd25532,'failed':![],'lastNotifiedVersion':_0xd25532,'lastNotifiedAt':_0x300f45}),{'command':_0x2d0b03,'current':_0x246d5b,'latest':_0xd25532,'url':buildNpmVersionUrl(_0xd25532),'message':CLI_BIN_NAME+'\x20'+_0xd25532+_0x423aab(0x1c7)+_0x246d5b+_0x423aab(0x1b9)+_0x2d0b03};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e1838,_0x3fccce){var _0x2f3da5=a373_0x2c04,_0x5b41d6=_0x1e1838();while(!![]){try{var _0x217134=parseInt(_0x2f3da5(0xee))/0x1*(-parseInt(_0x2f3da5(0xed))/0x2)+parseInt(_0x2f3da5(0xf0))/0x3+parseInt(_0x2f3da5(0xec))/0x4*(-parseInt(_0x2f3da5(0xf3))/0x5)+-parseInt(_0x2f3da5(0xf4))/0x6*(parseInt(_0x2f3da5(0xf2))/0x7)+-parseInt(_0x2f3da5(0xef))/0x8+-parseInt(_0x2f3da5(0xf5))/0x9+parseInt(_0x2f3da5(0xf1))/0xa;if(_0x217134===_0x3fccce)break;else _0x5b41d6['push'](_0x5b41d6['shift']());}catch(_0x45a169){_0x5b41d6['push'](_0x5b41d6['shift']());}}}(a373_0x4262,0xa4f8d));import{VERSION}from'../generated/build-info.js';function a373_0x4262(){var _0x355097=['21970mUgPdB','41208CcROdC','4921641xqAUOf','692QrrMTt','2OcqbGf','895925XOjuzP','721776vGmSZX','1259562ptaRfN','35929650bjnmGX','1064wnjZxO'];a373_0x4262=function(){return _0x355097;};return a373_0x4262();}function a373_0x2c04(_0x116ba4,_0xf8d884){_0x116ba4=_0x116ba4-0xec;var _0x426200=a373_0x4262();var _0x2c04e2=_0x426200[_0x116ba4];return _0x2c04e2;}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x490b02,_0x672d7c){var _0x39a8ea=a374_0x301b,_0x427b01=_0x490b02();while(!![]){try{var _0x1db5ed=-parseInt(_0x39a8ea(0xed))/0x1*(-parseInt(_0x39a8ea(0xec))/0x2)+-parseInt(_0x39a8ea(0xf0))/0x3*(-parseInt(_0x39a8ea(0xe6))/0x4)+parseInt(_0x39a8ea(0xe9))/0x5+-parseInt(_0x39a8ea(0xe8))/0x6*(parseInt(_0x39a8ea(0xea))/0x7)+-parseInt(_0x39a8ea(0xeb))/0x8*(parseInt(_0x39a8ea(0xe5))/0x9)+-parseInt(_0x39a8ea(0xe7))/0xa*(-parseInt(_0x39a8ea(0xef))/0xb)+-parseInt(_0x39a8ea(0xee))/0xc;if(_0x1db5ed===_0x672d7c)break;else _0x427b01['push'](_0x427b01['shift']());}catch(_0x58b83d){_0x427b01['push'](_0x427b01['shift']());}}}(a374_0x4880,0xdde73));function a374_0x301b(_0x9b6274,_0x3ef576){_0x9b6274=_0x9b6274-0xe5;var _0x48809c=a374_0x4880();var _0x301bff=_0x48809c[_0x9b6274];return _0x301bff;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a374_0x4880(){var _0x52b85b=['22IAvOYI','3LMSwZa','189JtZGgu','4288904iRJVbi','8254100IHqDiK','6jsKFhE','7754720wzDqUG','8528436vyaijf','166472UYbPCu','8eNjIfO','40551ZYdGEN','22463304rAPdlr'];a374_0x4880=function(){return _0x52b85b;};return a374_0x4880();}export async function withActiveCookie(_0x41c229,_0x59faf8){setActiveCookie(_0x41c229);try{return await _0x59faf8();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a375_0x46e4(){var _0x27f037=['1975554eCirrR','70GIjTtA','write','2411872jbFixt','35724sEZXZy','159896EPKWJL','12676MnNSnf','2oLAMDy','5894100epDWtA','273juhMmf','stderr','1030995XGCSzE'];a375_0x46e4=function(){return _0x27f037;};return a375_0x46e4();}(function(_0x47f136,_0x137f0b){var _0x387aba=a375_0x2848,_0x5e2178=_0x47f136();while(!![]){try{var _0x388d70=parseInt(_0x387aba(0x104))/0x1*(-parseInt(_0x387aba(0x106))/0x2)+parseInt(_0x387aba(0xfc))/0x3*(-parseInt(_0x387aba(0x105))/0x4)+parseInt(_0x387aba(0x100))/0x5*(-parseInt(_0x387aba(0x103))/0x6)+parseInt(_0x387aba(0xff))/0x7+-parseInt(_0x387aba(0x102))/0x8+parseInt(_0x387aba(0xfe))/0x9+parseInt(_0x387aba(0x107))/0xa;if(_0x388d70===_0x137f0b)break;else _0x5e2178['push'](_0x5e2178['shift']());}catch(_0x34c5f7){_0x5e2178['push'](_0x5e2178['shift']());}}}(a375_0x46e4,0x255f0));function a375_0x2848(_0x177cd7,_0x13da3d){_0x177cd7=_0x177cd7-0xfc;var _0x46e450=a375_0x46e4();var _0x2848a1=_0x46e450[_0x177cd7];return _0x2848a1;}export function writeCliSideChannelLine(_0x414b70){var _0x216704=a375_0x2848;process[_0x216704(0xfd)][_0x216704(0x101)](_0x414b70+'\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.4",
|
|
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,7 +98,7 @@
|
|
|
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
103
|
"@lovrabet/sdk": "1.6.1-beta.7",
|
|
104
104
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.10-beta.
|
|
3
|
+
version: 2.5.10-beta.4
|
|
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` 的事实会进入上报正文
|