@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-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-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 a342_0x242f61=a342_0x35dd;(function(_0x457ae1,_0x1ac660){const _0x1e9013=a342_0x35dd,_0x4c0ae8=_0x457ae1();while(!![]){try{const _0x40d25f=parseInt(_0x1e9013(0x1ac))/0x1*(parseInt(_0x1e9013(0x17a))/0x2)+-parseInt(_0x1e9013(0x15a))/0x3*(-parseInt(_0x1e9013(0x178))/0x4)+parseInt(_0x1e9013(0x1b8))/0x5+parseInt(_0x1e9013(0x179))/0x6+-parseInt(_0x1e9013(0x1c3))/0x7+parseInt(_0x1e9013(0x161))/0x8+-parseInt(_0x1e9013(0x165))/0x9;if(_0x40d25f===_0x1ac660)break;else _0x4c0ae8['push'](_0x4c0ae8['shift']());}catch(_0x59b38c){_0x4c0ae8['push'](_0x4c0ae8['shift']());}}}(a342_0x3314,0x5dbbb));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';function a342_0x3314(){const _0x52f4f4=['autoIncrement','name','.options.label','189648KNjHtS','unresolvedRelations.reason','lookup','doVersion','defaultAggregation','unresolvedRelations','isArray','4561128YTesEZ','value','dbTypeLen','UPLOAD','8310681zBXcAp','dbType','fromEntries','label','datasets','keys','readonly','.toDatasetCode','\x20requires\x20exactly\x20one\x20target.','digest','disabled','INTEGER','ADDRESS','sha256','isFinite','fields','\x20must\x20be\x20a\x20string.','fromField','TINYINT','44MphqLN','1154838APTWdq','17642lSJfMV','required','ONE_TO_ONE','\x20must\x20be\x20an\x20object.','relationType','normalizedManifest','relations','localKey','\x20duplicates\x20a\x20source\x20field.','.confidence\x20is\x20invalid.','hex','test','cardinality','tableComment','size','includes','displayFormat','TEXT','stringify','BOOLEAN','sort','doType','LONGTEXT','string','\x20source\x20does\x20not\x20exist.','.localKey\x20is\x20invalid\x20or\x20duplicated.','SMALLINT','NUMERIC','MULTI_SELECT','semanticName','isSafeInteger','has','description','.cardinality\x20is\x20unsupported.','DATETIME','DECIMAL','INT','isSymbolicLink','options','schemaVersion','entries','relations[','\x20requires\x20options\x20or\x20an\x20explicit\x20relation.','Design\x20file\x20contains\x20invalid\x20JSON.','.toField','confidence','toDatasetCode','Unsupported\x20dataset\x20manifest\x20version.','fromDatasetKey','manifest','1RTGHcF','displayName','BIGINT','get','map','trim','visible','length','number','dataset-design','.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.','MANY_TO_ONE','2569455fnRPMN','toField','supportedAggregation','.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.','\x20must\x20be\x20a\x20non-empty\x20string.','object','dataset','VARCHAR','.relationType\x20must\x20be\x20lookup.','JSON','add','4713534mPUZWX','every','SELECT','kind','DATE','some','\x20target\x20field\x20does\x20not\x20exist.','pkField','datasetName','Manifest\x20must\x20be\x20an\x20object.','.displayName','\x20must\x20be\x20a\x20boolean.','validation','.options\x20must\x20be\x20an\x20array.','.dataset','.options\x20contains\x20an\x20invalid\x20item.','Invalid\x20unresolved\x20relation.','chartRole','toDatasetKey','.options','USER'];a342_0x3314=function(){return _0x52f4f4;};return a342_0x3314();}export const isObject=_0x2b3890=>_0x2b3890!==null&&typeof _0x2b3890===a342_0x242f61(0x1bd)&&!Array[a342_0x242f61(0x160)](_0x2b3890);const types=new Set(['TEXT','NUMBER','DATETIME',a342_0x242f61(0x18d),a342_0x242f61(0x1c5),a342_0x242f61(0x196),'DATE_RANGE',a342_0x242f61(0x1d7),a342_0x242f61(0x171),a342_0x242f61(0x164)]),dbTypes=new Set([a342_0x242f61(0x1bf),'CHAR',a342_0x242f61(0x18b),a342_0x242f61(0x190),a342_0x242f61(0x177),a342_0x242f61(0x194),a342_0x242f61(0x19e),a342_0x242f61(0x170),a342_0x242f61(0x1ae),'FLOAT','DOUBLE',a342_0x242f61(0x19d),a342_0x242f61(0x195),a342_0x242f61(0x1c7),a342_0x242f61(0x19c),'TIMESTAMP',a342_0x242f61(0x18d),a342_0x242f61(0x1c1)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0x46a071,_0x335de8){const _0x3657c7=a342_0x242f61;if(!_0x46a071)throw CliErrors[_0x3657c7(0x1cf)](_0x335de8);}function keys(_0x4f00ab,_0x3e3c8a,_0x4979fa){const _0x3ed98d=a342_0x242f61;for(const _0x1745f8 of Object['keys'](_0x4f00ab))requireValue(_0x3e3c8a[_0x3ed98d(0x189)](_0x1745f8),_0x4979fa+'.'+_0x1745f8+'\x20is\x20not\x20supported.');}function a342_0x35dd(_0x2cee97,_0x4c99e9){_0x2cee97=_0x2cee97-0x158;const _0x3314be=a342_0x3314();let _0x35ddd1=_0x3314be[_0x2cee97];return _0x35ddd1;}function text(_0x49c1b8,_0x2aa7cf){const _0x9d9f95=a342_0x242f61;requireValue(typeof _0x49c1b8===_0x9d9f95(0x191)&&_0x49c1b8[_0x9d9f95(0x1b1)]()[_0x9d9f95(0x1b3)]>0x0,_0x2aa7cf+_0x9d9f95(0x1bc));}export function validateManifest(_0x5ef318){const _0x4e0829=a342_0x242f61;requireValue(isObject(_0x5ef318),_0x4e0829(0x1cc)),keys(_0x5ef318,['kind','schemaVersion',_0x4e0829(0x15d),'datasets','relations',_0x4e0829(0x15f)],_0x4e0829(0x1ab)),requireValue(_0x5ef318[_0x4e0829(0x1c6)]===_0x4e0829(0x1b5)&&_0x5ef318[_0x4e0829(0x1a1)]===0x1&&_0x5ef318[_0x4e0829(0x15d)]==='v2',_0x4e0829(0x1a9)),requireValue(Array[_0x4e0829(0x160)](_0x5ef318[_0x4e0829(0x169)])&&_0x5ef318[_0x4e0829(0x169)][_0x4e0829(0x1b3)]>=0x1&&_0x5ef318[_0x4e0829(0x169)]['length']<=0x14,'datasets\x20must\x20contain\x201..20\x20items.');const _0x2f5a6c=new Map();for(const [_0x1f0fdf,_0x3a42f7]of _0x5ef318[_0x4e0829(0x169)]['entries']()){const _0xf5e725='datasets['+_0x1f0fdf+']';requireValue(isObject(_0x3a42f7),_0xf5e725+_0x4e0829(0x17d)),keys(_0x3a42f7,[_0x4e0829(0x181),_0x4e0829(0x1be),_0x4e0829(0x174)],_0xf5e725),requireValue(typeof _0x3a42f7[_0x4e0829(0x181)]==='string'&&/^[a-z][a-z0-9_]{0,63}$/[_0x4e0829(0x185)](_0x3a42f7[_0x4e0829(0x181)])&&!_0x2f5a6c[_0x4e0829(0x199)](_0x3a42f7['localKey']),_0xf5e725+_0x4e0829(0x193)),requireValue(isObject(_0x3a42f7[_0x4e0829(0x1be)]),_0xf5e725+'.dataset\x20is\x20required.'),keys(_0x3a42f7['dataset'],[_0x4e0829(0x1cb),'tableName',_0x4e0829(0x187),'businessGroup','labelField'],_0xf5e725+_0x4e0829(0x1d1)),text(_0x3a42f7[_0x4e0829(0x1be)][_0x4e0829(0x1cb)],_0xf5e725+'.dataset.datasetName');for(const [_0x57e64a,_0x15262b]of Object['entries'](_0x3a42f7[_0x4e0829(0x1be)]))requireValue(_0x15262b==null||typeof _0x15262b===_0x4e0829(0x191),_0xf5e725+'.dataset.'+_0x57e64a+'\x20must\x20be\x20a\x20string.');requireValue(Array['isArray'](_0x3a42f7['fields'])&&_0x3a42f7[_0x4e0829(0x174)][_0x4e0829(0x1b3)]>0x0&&(_0x5ef318[_0x4e0829(0x169)]['length']===0x1||_0x3a42f7[_0x4e0829(0x174)][_0x4e0829(0x1b3)]<=0xc8),_0xf5e725+'.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.');const _0x191662=new Set();_0x2f5a6c['set'](_0x3a42f7[_0x4e0829(0x181)],_0x191662);for(const [_0x28a333,_0x36ad1b]of _0x3a42f7[_0x4e0829(0x174)][_0x4e0829(0x1a2)]()){const _0x25e13c=_0xf5e725+'.fields['+_0x28a333+']';requireValue(isObject(_0x36ad1b),_0x25e13c+'\x20must\x20be\x20an\x20object.'),keys(_0x36ad1b,[_0x4e0829(0x158),_0x4e0829(0x1ad),'doType',_0x4e0829(0x166),_0x4e0829(0x163),_0x4e0829(0x19a),_0x4e0829(0x17b),_0x4e0829(0x1b2),_0x4e0829(0x16f),_0x4e0829(0x16b),_0x4e0829(0x1ca),_0x4e0829(0x1d8),_0x4e0829(0x1a0),_0x4e0829(0x197),_0x4e0829(0x1d4),_0x4e0829(0x15e),_0x4e0829(0x1ba),'isTimeDimension',_0x4e0829(0x18a)],_0x25e13c),requireValue(typeof _0x36ad1b[_0x4e0829(0x158)]===_0x4e0829(0x191)&&identifier[_0x4e0829(0x185)](_0x36ad1b[_0x4e0829(0x158)])&&!_0x191662[_0x4e0829(0x199)](_0x36ad1b['name']),_0x25e13c+'.name\x20is\x20invalid\x20or\x20duplicated.'),_0x191662[_0x4e0829(0x1c2)](_0x36ad1b[_0x4e0829(0x158)]),text(_0x36ad1b[_0x4e0829(0x1ad)],_0x25e13c+_0x4e0829(0x1cd)),requireValue(types[_0x4e0829(0x199)](_0x36ad1b['doType']),_0x25e13c+'.doType\x20is\x20unsupported.'),requireValue(dbTypes[_0x4e0829(0x199)](_0x36ad1b[_0x4e0829(0x166)]),_0x25e13c+_0x4e0829(0x1b6));for(const _0x47a365 of[_0x4e0829(0x166),_0x4e0829(0x19a),_0x4e0829(0x197),'chartRole',_0x4e0829(0x15e),_0x4e0829(0x18a)]){requireValue(_0x36ad1b[_0x47a365]==null||typeof _0x36ad1b[_0x47a365]==='string',_0x25e13c+'.'+_0x47a365+_0x4e0829(0x175));}for(const _0x23925b of['required',_0x4e0829(0x1b2),_0x4e0829(0x16f),_0x4e0829(0x16b),_0x4e0829(0x1ca),'autoIncrement','isTimeDimension']){requireValue(_0x36ad1b[_0x23925b]==null||typeof _0x36ad1b[_0x23925b]==='boolean',_0x25e13c+'.'+_0x23925b+_0x4e0829(0x1ce));}requireValue(_0x36ad1b[_0x4e0829(0x163)]==null||Number[_0x4e0829(0x198)](_0x36ad1b['dbTypeLen'])&&_0x36ad1b[_0x4e0829(0x163)]>0x0&&_0x36ad1b[_0x4e0829(0x163)]<=0xffff,_0x25e13c+_0x4e0829(0x1bb)),requireValue(_0x36ad1b[_0x4e0829(0x1ba)]==null||Array[_0x4e0829(0x160)](_0x36ad1b[_0x4e0829(0x1ba)])&&_0x36ad1b[_0x4e0829(0x1ba)][_0x4e0829(0x1c4)](_0x2ad6a9=>typeof _0x2ad6a9===_0x4e0829(0x191)),_0x25e13c+'.supportedAggregation\x20must\x20contain\x20strings.');if(_0x36ad1b[_0x4e0829(0x1a0)]!=null){requireValue(Array[_0x4e0829(0x160)](_0x36ad1b['options']),_0x25e13c+_0x4e0829(0x1d0));const _0x3e1068=new Set(),_0x29cc68=new Set();for(const _0x2c4c78 of _0x36ad1b[_0x4e0829(0x1a0)]){requireValue(isObject(_0x2c4c78),_0x25e13c+_0x4e0829(0x1d2)),keys(_0x2c4c78,['label','value'],_0x25e13c+_0x4e0829(0x1d6)),text(_0x2c4c78['label'],_0x25e13c+_0x4e0829(0x159)),requireValue(typeof _0x2c4c78[_0x4e0829(0x162)]===_0x4e0829(0x191)&&identifier[_0x4e0829(0x185)](_0x2c4c78[_0x4e0829(0x162)])&&!_0x29cc68[_0x4e0829(0x199)](_0x2c4c78[_0x4e0829(0x162)])&&!_0x3e1068[_0x4e0829(0x199)](_0x2c4c78[_0x4e0829(0x168)]),_0x25e13c+'.options\x20is\x20invalid\x20or\x20duplicated.'),_0x3e1068[_0x4e0829(0x1c2)](_0x2c4c78[_0x4e0829(0x168)]),_0x29cc68[_0x4e0829(0x1c2)](_0x2c4c78[_0x4e0829(0x162)]);}}if([_0x4e0829(0x1c5),_0x4e0829(0x196)][_0x4e0829(0x189)](_0x36ad1b[_0x4e0829(0x18f)])){const _0x5e8d5c=Array[_0x4e0829(0x160)](_0x5ef318['relations'])&&_0x5ef318[_0x4e0829(0x180)][_0x4e0829(0x1c8)](_0xc992c5=>_0xc992c5?.[_0x4e0829(0x1aa)]===_0x3a42f7[_0x4e0829(0x181)]&&_0xc992c5?.[_0x4e0829(0x176)]===_0x36ad1b['name']);requireValue(_0x5e8d5c||Array[_0x4e0829(0x160)](_0x36ad1b[_0x4e0829(0x1a0)])&&_0x36ad1b[_0x4e0829(0x1a0)][_0x4e0829(0x1b3)]>0x0,_0x25e13c+_0x4e0829(0x1a4));}}_0x191662[_0x4e0829(0x1c2)]('id');}for(const _0xd26b50 of[_0x4e0829(0x180),_0x4e0829(0x15f)])requireValue(_0x5ef318[_0xd26b50]==null||Array['isArray'](_0x5ef318[_0xd26b50])&&_0x5ef318[_0xd26b50][_0x4e0829(0x1b3)]<=0xc8,_0xd26b50+'\x20must\x20contain\x20at\x20most\x20200\x20items.');const _0x3d5283=new Set();for(const [_0x5140fe,_0x2484ab]of(_0x5ef318[_0x4e0829(0x180)]??[])[_0x4e0829(0x1a2)]()){const _0x59233c=_0x4e0829(0x1a3)+_0x5140fe+']';requireValue(isObject(_0x2484ab),_0x59233c+'\x20must\x20be\x20an\x20object.'),keys(_0x2484ab,[_0x4e0829(0x1aa),'fromField',_0x4e0829(0x1d5),_0x4e0829(0x1a8),'toField','toFieldLabel',_0x4e0829(0x17e),'cardinality','reason',_0x4e0829(0x1a7)],_0x59233c),requireValue(_0x2f5a6c['get'](_0x2484ab[_0x4e0829(0x1aa)])?.[_0x4e0829(0x199)](_0x2484ab[_0x4e0829(0x176)]),_0x59233c+_0x4e0829(0x192)),requireValue(Boolean(_0x2484ab[_0x4e0829(0x1d5)])!==Boolean(_0x2484ab[_0x4e0829(0x1a8)]),_0x59233c+_0x4e0829(0x16d));if(_0x2484ab['toDatasetKey'])requireValue(_0x2f5a6c[_0x4e0829(0x1af)](_0x2484ab[_0x4e0829(0x1d5)])?.[_0x4e0829(0x199)](_0x2484ab[_0x4e0829(0x1b9)]),_0x59233c+_0x4e0829(0x1c9));else text(_0x2484ab[_0x4e0829(0x1a8)],_0x59233c+_0x4e0829(0x16c)),text(_0x2484ab[_0x4e0829(0x1b9)],_0x59233c+_0x4e0829(0x1a6));requireValue(_0x2484ab[_0x4e0829(0x17e)]==null||_0x2484ab[_0x4e0829(0x17e)]===_0x4e0829(0x15c),_0x59233c+_0x4e0829(0x1c0)),requireValue(_0x2484ab[_0x4e0829(0x186)]==null||[_0x4e0829(0x1b7),_0x4e0829(0x17c)][_0x4e0829(0x189)](_0x2484ab[_0x4e0829(0x186)]),_0x59233c+_0x4e0829(0x19b)),text(_0x2484ab['reason'],_0x59233c+'.reason'),requireValue(_0x2484ab['confidence']==null||typeof _0x2484ab[_0x4e0829(0x1a7)]===_0x4e0829(0x1b4)&&Number[_0x4e0829(0x173)](_0x2484ab[_0x4e0829(0x1a7)])&&_0x2484ab[_0x4e0829(0x1a7)]>=0x0&&_0x2484ab[_0x4e0829(0x1a7)]<=0x1,_0x59233c+_0x4e0829(0x183));const _0x475b29=_0x2484ab[_0x4e0829(0x1aa)]+':'+_0x2484ab[_0x4e0829(0x176)];requireValue(!_0x3d5283['has'](_0x475b29),_0x59233c+_0x4e0829(0x182)),_0x3d5283['add'](_0x475b29);}for(const _0x56b0e5 of _0x5ef318[_0x4e0829(0x15f)]??[]){requireValue(isObject(_0x56b0e5),_0x4e0829(0x1d3)),text(_0x56b0e5['reason'],_0x4e0829(0x15b));}return _0x5ef318;}export async function readManifest(_0x3bffa7){const _0x2dc5c7=a342_0x242f61,_0x387fe4=await lstat(_0x3bffa7);requireValue(_0x387fe4['isFile']()&&!_0x387fe4[_0x2dc5c7(0x19f)]()&&_0x387fe4[_0x2dc5c7(0x188)]<=0x1e8480,'Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.');let _0x18968e;try{_0x18968e=JSON['parse'](await readFile(_0x3bffa7,'utf8'));}catch{throw CliErrors[_0x2dc5c7(0x1cf)](_0x2dc5c7(0x1a5));}return validateManifest(isObject(_0x18968e)&&isObject(_0x18968e['normalizedManifest'])?_0x18968e[_0x2dc5c7(0x17f)]:_0x18968e);}export function inputHash(_0x1fac29){const _0xe21caf=a342_0x242f61,_0x2d596b=_0x537d64=>Array[_0xe21caf(0x160)](_0x537d64)?_0x537d64[_0xe21caf(0x1b0)](_0x2d596b):isObject(_0x537d64)?Object[_0xe21caf(0x167)](Object[_0xe21caf(0x16a)](_0x537d64)[_0xe21caf(0x18e)]()[_0xe21caf(0x1b0)](_0x5ba19b=>[_0x5ba19b,_0x2d596b(_0x537d64[_0x5ba19b])])):_0x537d64;return createHash(_0xe21caf(0x172))['update'](JSON[_0xe21caf(0x18c)](_0x2d596b(_0x1fac29)))[_0xe21caf(0x16e)](_0xe21caf(0x184));}
|
|
1
|
+
function a342_0x3ea9(_0x36d5c1,_0x6e0185){_0x36d5c1=_0x36d5c1-0x175;const _0x593ed1=a342_0x593e();let _0x3ea934=_0x593ed1[_0x36d5c1];return _0x3ea934;}const a342_0x4b62bd=a342_0x3ea9;(function(_0x3259bf,_0x42a145){const _0x1444ab=a342_0x3ea9,_0x3a3807=_0x3259bf();while(!![]){try{const _0x46e951=parseInt(_0x1444ab(0x196))/0x1+-parseInt(_0x1444ab(0x19d))/0x2+parseInt(_0x1444ab(0x1bf))/0x3+parseInt(_0x1444ab(0x1a5))/0x4*(-parseInt(_0x1444ab(0x1af))/0x5)+-parseInt(_0x1444ab(0x1c9))/0x6+parseInt(_0x1444ab(0x1cf))/0x7*(parseInt(_0x1444ab(0x19b))/0x8)+parseInt(_0x1444ab(0x193))/0x9*(-parseInt(_0x1444ab(0x1a2))/0xa);if(_0x46e951===_0x42a145)break;else _0x3a3807['push'](_0x3a3807['shift']());}catch(_0x53ac67){_0x3a3807['push'](_0x3a3807['shift']());}}}(a342_0x593e,0x840be));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';function a342_0x593e(){const _0x5e7fb3=['INTEGER','40tJjvHv','set','isTimeDimension','4TikztM','object','tableComment','toDatasetCode','displayFormat','.options','.fields[','ADDRESS','Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.','name','3758865bZJZBz','\x20target\x20field\x20does\x20not\x20exist.','fields','lookup','datasetName','pkField','relationType','.displayName','isArray','manifest','fromEntries','required','.relationType\x20must\x20be\x20lookup.','DATETIME','disabled','trim','3236826gVCvsH','readonly','Invalid\x20unresolved\x20relation.','relations[','cardinality','\x20must\x20contain\x20at\x20most\x20200\x20items.','JSON','boolean','DECIMAL','\x20requires\x20exactly\x20one\x20target.','382116OHCusc','fromField','\x20must\x20be\x20a\x20string.','fromDatasetKey','add','TIMESTAMP','6565069IqJYMD','.dataset.','dataset','localKey','BIGINT','.doType\x20is\x20unsupported.','includes','UPLOAD','description','test','chartRole','digest','kind','number','INT','.supportedAggregation\x20must\x20contain\x20strings.','TINYINT','hex','DATE_RANGE','has','string','.options\x20contains\x20an\x20invalid\x20item.','displayName','isSymbolicLink','Manifest\x20must\x20be\x20an\x20object.','Unsupported\x20dataset\x20manifest\x20version.','toDatasetKey','dbType','.dataset','schemaVersion','.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.','visible','doVersion','FLOAT','datasets','length','TEXT','semanticName','unresolvedRelations.reason','validation','datasets[','normalizedManifest','.options.label','stringify','autoIncrement','.toDatasetCode','labelField','doType','confidence','NUMBER','USER','isFinite','.dataset.datasetName','NUMERIC','supportedAggregation','MANY_TO_ONE','.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.','CHAR','businessGroup','relations','\x20source\x20does\x20not\x20exist.','parse','entries','tableName','.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.','isFile','MULTI_SELECT','toField','reason','value','options','\x20must\x20be\x20a\x20boolean.','get','SELECT','.name\x20is\x20invalid\x20or\x20duplicated.','2179449tgdDcq','toFieldLabel','LONGTEXT','739377wFFsyP','ONE_TO_ONE','dbTypeLen','\x20must\x20be\x20an\x20object.','unresolvedRelations','8XTbOSo','sha256','862442UMqWpN','label','DOUBLE','\x20is\x20not\x20supported.'];a342_0x593e=function(){return _0x5e7fb3;};return a342_0x593e();}export const isObject=_0x5be721=>_0x5be721!==null&&typeof _0x5be721===a342_0x4b62bd(0x1a6)&&!Array['isArray'](_0x5be721);const types=new Set([a342_0x4b62bd(0x1f3),a342_0x4b62bd(0x179),a342_0x4b62bd(0x1bc),'BOOLEAN',a342_0x4b62bd(0x191),a342_0x4b62bd(0x18a),a342_0x4b62bd(0x1e1),a342_0x4b62bd(0x17a),a342_0x4b62bd(0x1ac),a342_0x4b62bd(0x1d6)]),dbTypes=new Set(['VARCHAR',a342_0x4b62bd(0x181),a342_0x4b62bd(0x1f3),a342_0x4b62bd(0x195),a342_0x4b62bd(0x1df),'SMALLINT',a342_0x4b62bd(0x1dd),a342_0x4b62bd(0x1a1),a342_0x4b62bd(0x1d3),a342_0x4b62bd(0x1f0),a342_0x4b62bd(0x19f),a342_0x4b62bd(0x1c7),a342_0x4b62bd(0x17d),'DATE',a342_0x4b62bd(0x1bc),a342_0x4b62bd(0x1ce),'BOOLEAN',a342_0x4b62bd(0x1c5)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0x257dc2,_0x217003){const _0x5c0792=a342_0x4b62bd;if(!_0x257dc2)throw CliErrors[_0x5c0792(0x1f6)](_0x217003);}function keys(_0x3dc4fd,_0x31b5cc,_0x85a42c){const _0x3d2632=a342_0x4b62bd;for(const _0x54d567 of Object['keys'](_0x3dc4fd))requireValue(_0x31b5cc['includes'](_0x54d567),_0x85a42c+'.'+_0x54d567+_0x3d2632(0x1a0));}function text(_0x326c02,_0x85c36e){const _0xf56d8e=a342_0x4b62bd;requireValue(typeof _0x326c02===_0xf56d8e(0x1e3)&&_0x326c02[_0xf56d8e(0x1be)]()[_0xf56d8e(0x1f2)]>0x0,_0x85c36e+'\x20must\x20be\x20a\x20non-empty\x20string.');}export function validateManifest(_0x24782b){const _0x4c28fd=a342_0x4b62bd;requireValue(isObject(_0x24782b),_0x4c28fd(0x1e7)),keys(_0x24782b,[_0x4c28fd(0x1db),_0x4c28fd(0x1ec),_0x4c28fd(0x1ef),_0x4c28fd(0x1f1),_0x4c28fd(0x183),'unresolvedRelations'],_0x4c28fd(0x1b8)),requireValue(_0x24782b['kind']==='dataset-design'&&_0x24782b['schemaVersion']===0x1&&_0x24782b['doVersion']==='v2',_0x4c28fd(0x1e8)),requireValue(Array['isArray'](_0x24782b[_0x4c28fd(0x1f1)])&&_0x24782b[_0x4c28fd(0x1f1)][_0x4c28fd(0x1f2)]>=0x1&&_0x24782b[_0x4c28fd(0x1f1)][_0x4c28fd(0x1f2)]<=0x14,'datasets\x20must\x20contain\x201..20\x20items.');const _0x26161d=new Map();for(const [_0x5cda0c,_0x3c950a]of _0x24782b['datasets']['entries']()){const _0x3e202c=_0x4c28fd(0x1f7)+_0x5cda0c+']';requireValue(isObject(_0x3c950a),_0x3e202c+_0x4c28fd(0x199)),keys(_0x3c950a,[_0x4c28fd(0x1d2),_0x4c28fd(0x1d1),_0x4c28fd(0x1b1)],_0x3e202c),requireValue(typeof _0x3c950a[_0x4c28fd(0x1d2)]===_0x4c28fd(0x1e3)&&/^[a-z][a-z0-9_]{0,63}$/[_0x4c28fd(0x1d8)](_0x3c950a[_0x4c28fd(0x1d2)])&&!_0x26161d[_0x4c28fd(0x1e2)](_0x3c950a[_0x4c28fd(0x1d2)]),_0x3e202c+'.localKey\x20is\x20invalid\x20or\x20duplicated.'),requireValue(isObject(_0x3c950a['dataset']),_0x3e202c+'.dataset\x20is\x20required.'),keys(_0x3c950a[_0x4c28fd(0x1d1)],[_0x4c28fd(0x1b3),_0x4c28fd(0x187),_0x4c28fd(0x1a7),_0x4c28fd(0x182),_0x4c28fd(0x176)],_0x3e202c+_0x4c28fd(0x1eb)),text(_0x3c950a['dataset'][_0x4c28fd(0x1b3)],_0x3e202c+_0x4c28fd(0x17c));for(const [_0xd6a36a,_0x5f0828]of Object[_0x4c28fd(0x186)](_0x3c950a[_0x4c28fd(0x1d1)]))requireValue(_0x5f0828==null||typeof _0x5f0828===_0x4c28fd(0x1e3),_0x3e202c+_0x4c28fd(0x1d0)+_0xd6a36a+_0x4c28fd(0x1cb));requireValue(Array['isArray'](_0x3c950a[_0x4c28fd(0x1b1)])&&_0x3c950a[_0x4c28fd(0x1b1)][_0x4c28fd(0x1f2)]>0x0&&(_0x24782b[_0x4c28fd(0x1f1)][_0x4c28fd(0x1f2)]===0x1||_0x3c950a['fields'][_0x4c28fd(0x1f2)]<=0xc8),_0x3e202c+_0x4c28fd(0x180));const _0xcc0771=new Set();_0x26161d[_0x4c28fd(0x1a3)](_0x3c950a['localKey'],_0xcc0771);for(const [_0x28c438,_0x101ac2]of _0x3c950a[_0x4c28fd(0x1b1)]['entries']()){const _0x24bdaf=_0x3e202c+_0x4c28fd(0x1ab)+_0x28c438+']';requireValue(isObject(_0x101ac2),_0x24bdaf+_0x4c28fd(0x199)),keys(_0x101ac2,['name','displayName',_0x4c28fd(0x177),_0x4c28fd(0x1ea),_0x4c28fd(0x198),_0x4c28fd(0x1d7),'required',_0x4c28fd(0x1ee),'disabled','readonly','pkField','autoIncrement','options',_0x4c28fd(0x1f4),_0x4c28fd(0x1d9),'defaultAggregation',_0x4c28fd(0x17e),_0x4c28fd(0x1a4),_0x4c28fd(0x1a9)],_0x24bdaf),requireValue(typeof _0x101ac2[_0x4c28fd(0x1ae)]===_0x4c28fd(0x1e3)&&identifier[_0x4c28fd(0x1d8)](_0x101ac2[_0x4c28fd(0x1ae)])&&!_0xcc0771[_0x4c28fd(0x1e2)](_0x101ac2[_0x4c28fd(0x1ae)]),_0x24bdaf+_0x4c28fd(0x192)),_0xcc0771[_0x4c28fd(0x1cd)](_0x101ac2[_0x4c28fd(0x1ae)]),text(_0x101ac2[_0x4c28fd(0x1e5)],_0x24bdaf+_0x4c28fd(0x1b6)),requireValue(types[_0x4c28fd(0x1e2)](_0x101ac2[_0x4c28fd(0x177)]),_0x24bdaf+_0x4c28fd(0x1d4)),requireValue(dbTypes['has'](_0x101ac2[_0x4c28fd(0x1ea)]),_0x24bdaf+_0x4c28fd(0x1ed));for(const _0x27f06e of[_0x4c28fd(0x1ea),_0x4c28fd(0x1d7),'semanticName',_0x4c28fd(0x1d9),'defaultAggregation',_0x4c28fd(0x1a9)]){requireValue(_0x101ac2[_0x27f06e]==null||typeof _0x101ac2[_0x27f06e]===_0x4c28fd(0x1e3),_0x24bdaf+'.'+_0x27f06e+_0x4c28fd(0x1cb));}for(const _0x22463d of[_0x4c28fd(0x1ba),_0x4c28fd(0x1ee),_0x4c28fd(0x1bd),_0x4c28fd(0x1c0),_0x4c28fd(0x1b4),_0x4c28fd(0x1fb),_0x4c28fd(0x1a4)]){requireValue(_0x101ac2[_0x22463d]==null||typeof _0x101ac2[_0x22463d]===_0x4c28fd(0x1c6),_0x24bdaf+'.'+_0x22463d+_0x4c28fd(0x18f));}requireValue(_0x101ac2['dbTypeLen']==null||Number['isSafeInteger'](_0x101ac2[_0x4c28fd(0x198)])&&_0x101ac2['dbTypeLen']>0x0&&_0x101ac2[_0x4c28fd(0x198)]<=0xffff,_0x24bdaf+_0x4c28fd(0x188)),requireValue(_0x101ac2['supportedAggregation']==null||Array[_0x4c28fd(0x1b7)](_0x101ac2[_0x4c28fd(0x17e)])&&_0x101ac2['supportedAggregation']['every'](_0x11d227=>typeof _0x11d227===_0x4c28fd(0x1e3)),_0x24bdaf+_0x4c28fd(0x1de));if(_0x101ac2[_0x4c28fd(0x18e)]!=null){requireValue(Array[_0x4c28fd(0x1b7)](_0x101ac2[_0x4c28fd(0x18e)]),_0x24bdaf+'.options\x20must\x20be\x20an\x20array.');const _0x5f0bf7=new Set(),_0x53d1b1=new Set();for(const _0xffed58 of _0x101ac2['options']){requireValue(isObject(_0xffed58),_0x24bdaf+_0x4c28fd(0x1e4)),keys(_0xffed58,[_0x4c28fd(0x19e),_0x4c28fd(0x18d)],_0x24bdaf+_0x4c28fd(0x1aa)),text(_0xffed58[_0x4c28fd(0x19e)],_0x24bdaf+_0x4c28fd(0x1f9)),requireValue(typeof _0xffed58[_0x4c28fd(0x18d)]===_0x4c28fd(0x1e3)&&identifier['test'](_0xffed58[_0x4c28fd(0x18d)])&&!_0x53d1b1[_0x4c28fd(0x1e2)](_0xffed58[_0x4c28fd(0x18d)])&&!_0x5f0bf7[_0x4c28fd(0x1e2)](_0xffed58[_0x4c28fd(0x19e)]),_0x24bdaf+'.options\x20is\x20invalid\x20or\x20duplicated.'),_0x5f0bf7[_0x4c28fd(0x1cd)](_0xffed58['label']),_0x53d1b1[_0x4c28fd(0x1cd)](_0xffed58[_0x4c28fd(0x18d)]);}}if([_0x4c28fd(0x191),_0x4c28fd(0x18a)][_0x4c28fd(0x1d5)](_0x101ac2[_0x4c28fd(0x177)])){const _0x93e994=Array['isArray'](_0x24782b[_0x4c28fd(0x183)])&&_0x24782b[_0x4c28fd(0x183)]['some'](_0x35a784=>_0x35a784?.[_0x4c28fd(0x1cc)]===_0x3c950a[_0x4c28fd(0x1d2)]&&_0x35a784?.[_0x4c28fd(0x1ca)]===_0x101ac2['name']);requireValue(_0x93e994||Array[_0x4c28fd(0x1b7)](_0x101ac2[_0x4c28fd(0x18e)])&&_0x101ac2['options'][_0x4c28fd(0x1f2)]>0x0,_0x24bdaf+'\x20requires\x20options\x20or\x20an\x20explicit\x20relation.');}}_0xcc0771[_0x4c28fd(0x1cd)]('id');}for(const _0x35aacd of[_0x4c28fd(0x183),_0x4c28fd(0x19a)])requireValue(_0x24782b[_0x35aacd]==null||Array['isArray'](_0x24782b[_0x35aacd])&&_0x24782b[_0x35aacd]['length']<=0xc8,_0x35aacd+_0x4c28fd(0x1c4));const _0x47addd=new Set();for(const [_0x51d3dc,_0x570905]of(_0x24782b[_0x4c28fd(0x183)]??[])['entries']()){const _0x3d8362=_0x4c28fd(0x1c2)+_0x51d3dc+']';requireValue(isObject(_0x570905),_0x3d8362+_0x4c28fd(0x199)),keys(_0x570905,['fromDatasetKey',_0x4c28fd(0x1ca),_0x4c28fd(0x1e9),_0x4c28fd(0x1a8),_0x4c28fd(0x18b),_0x4c28fd(0x194),_0x4c28fd(0x1b5),_0x4c28fd(0x1c3),'reason','confidence'],_0x3d8362),requireValue(_0x26161d[_0x4c28fd(0x190)](_0x570905[_0x4c28fd(0x1cc)])?.[_0x4c28fd(0x1e2)](_0x570905[_0x4c28fd(0x1ca)]),_0x3d8362+_0x4c28fd(0x184)),requireValue(Boolean(_0x570905[_0x4c28fd(0x1e9)])!==Boolean(_0x570905['toDatasetCode']),_0x3d8362+_0x4c28fd(0x1c8));if(_0x570905['toDatasetKey'])requireValue(_0x26161d[_0x4c28fd(0x190)](_0x570905[_0x4c28fd(0x1e9)])?.[_0x4c28fd(0x1e2)](_0x570905[_0x4c28fd(0x18b)]),_0x3d8362+_0x4c28fd(0x1b0));else text(_0x570905['toDatasetCode'],_0x3d8362+_0x4c28fd(0x175)),text(_0x570905[_0x4c28fd(0x18b)],_0x3d8362+'.toField');requireValue(_0x570905[_0x4c28fd(0x1b5)]==null||_0x570905[_0x4c28fd(0x1b5)]===_0x4c28fd(0x1b2),_0x3d8362+_0x4c28fd(0x1bb)),requireValue(_0x570905['cardinality']==null||[_0x4c28fd(0x17f),_0x4c28fd(0x197)][_0x4c28fd(0x1d5)](_0x570905['cardinality']),_0x3d8362+'.cardinality\x20is\x20unsupported.'),text(_0x570905[_0x4c28fd(0x18c)],_0x3d8362+'.reason'),requireValue(_0x570905[_0x4c28fd(0x178)]==null||typeof _0x570905['confidence']===_0x4c28fd(0x1dc)&&Number[_0x4c28fd(0x17b)](_0x570905['confidence'])&&_0x570905[_0x4c28fd(0x178)]>=0x0&&_0x570905[_0x4c28fd(0x178)]<=0x1,_0x3d8362+'.confidence\x20is\x20invalid.');const _0x549d4d=_0x570905[_0x4c28fd(0x1cc)]+':'+_0x570905[_0x4c28fd(0x1ca)];requireValue(!_0x47addd[_0x4c28fd(0x1e2)](_0x549d4d),_0x3d8362+'\x20duplicates\x20a\x20source\x20field.'),_0x47addd['add'](_0x549d4d);}for(const _0xc0e0cb of _0x24782b[_0x4c28fd(0x19a)]??[]){requireValue(isObject(_0xc0e0cb),_0x4c28fd(0x1c1)),text(_0xc0e0cb['reason'],_0x4c28fd(0x1f5));}return _0x24782b;}export async function readManifest(_0x32eff9){const _0x2943be=a342_0x4b62bd,_0x55cab8=await lstat(_0x32eff9);requireValue(_0x55cab8[_0x2943be(0x189)]()&&!_0x55cab8[_0x2943be(0x1e6)]()&&_0x55cab8['size']<=0x1e8480,_0x2943be(0x1ad));let _0x54ce8a;try{_0x54ce8a=JSON[_0x2943be(0x185)](await readFile(_0x32eff9,'utf8'));}catch{throw CliErrors[_0x2943be(0x1f6)]('Design\x20file\x20contains\x20invalid\x20JSON.');}return validateManifest(isObject(_0x54ce8a)&&isObject(_0x54ce8a['normalizedManifest'])?_0x54ce8a[_0x2943be(0x1f8)]:_0x54ce8a);}export function inputHash(_0x4cd011){const _0x3a7689=a342_0x4b62bd,_0x30c346=_0xd11ef1=>Array[_0x3a7689(0x1b7)](_0xd11ef1)?_0xd11ef1['map'](_0x30c346):isObject(_0xd11ef1)?Object[_0x3a7689(0x1b9)](Object['keys'](_0xd11ef1)['sort']()['map'](_0x5d3e14=>[_0x5d3e14,_0x30c346(_0xd11ef1[_0x5d3e14])])):_0xd11ef1;return createHash(_0x3a7689(0x19c))['update'](JSON[_0x3a7689(0x1fa)](_0x30c346(_0x4cd011)))[_0x3a7689(0x1da)](_0x3a7689(0x1e0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a343_0x327335=a343_0x4bf5;(function(_0x1cc421,_0x5c9e6a){const _0xa838df=a343_0x4bf5,_0xe6b275=_0x1cc421();while(!![]){try{const _0x160b59=-parseInt(_0xa838df(0x19c))/0x1*(parseInt(_0xa838df(0x18c))/0x2)+-parseInt(_0xa838df(0x19b))/0x3*(parseInt(_0xa838df(0x164))/0x4)+parseInt(_0xa838df(0x196))/0x5+parseInt(_0xa838df(0x189))/0x6+-parseInt(_0xa838df(0x173))/0x7+parseInt(_0xa838df(0x17b))/0x8*(parseInt(_0xa838df(0x16d))/0x9)+parseInt(_0xa838df(0x195))/0xa;if(_0x160b59===_0x5c9e6a)break;else _0xe6b275['push'](_0xe6b275['shift']());}catch(_0x549f26){_0xe6b275['push'](_0xe6b275['shift']());}}}(a343_0x59f4,0x8de29));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';function a343_0x4bf5(_0x95ab20,_0x3fd39b){_0x95ab20=_0x95ab20-0x15e;const _0x59f423=a343_0x59f4();let _0x4bf56f=_0x59f423[_0x95ab20];return _0x4bf56f;}import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a343_0x327335(0x18a),SKILL_NAME='rabetbase',debug=debuglog(a343_0x327335(0x199));function frontmatterValue(_0x14b2b6,_0x4ef139){const _0x179885=a343_0x327335;return _0x14b2b6['match'](new RegExp('^'+_0x4ef139+_0x179885(0x15e),'m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x5c64aa,_0x202962=_0x5c64aa){const _0x3a88f7=a343_0x327335;return readdirSync(_0x202962,{'withFileTypes':!![]})[_0x3a88f7(0x191)](_0x321929=>{const _0x135873=_0x3a88f7,_0x3ebac8=join(_0x202962,_0x321929[_0x135873(0x162)]),_0x4d9c60=lstatSync(_0x3ebac8);if(_0x4d9c60[_0x135873(0x19d)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x3ebac8);if(_0x4d9c60[_0x135873(0x16a)]())return listFiles(_0x5c64aa,_0x3ebac8);if(!_0x4d9c60['isFile']())throw new Error(_0x135873(0x168)+_0x3ebac8);return[relative(_0x5c64aa,_0x3ebac8)[_0x135873(0x181)](sep)[_0x135873(0x18f)]('/')];})['sort']((_0x321cd8,_0x4aae98)=>_0x321cd8<_0x4aae98?-0x1:_0x321cd8>_0x4aae98?0x1:0x0);}function digestFiles(_0x5d17a7,_0x8475fc){const _0x51f4ca=a343_0x327335,_0xb52ca3=createHash('sha256');for(const _0x4a6823 of _0x8475fc){if(_0x4a6823[_0x51f4ca(0x18d)]('/')||_0x4a6823['split']('/')[_0x51f4ca(0x165)]('..')||_0x4a6823['includes']('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x4a6823);_0xb52ca3[_0x51f4ca(0x175)](_0x4a6823),_0xb52ca3['update']('\x00'),_0xb52ca3['update'](readFileSync(join(_0x5d17a7,..._0x4a6823[_0x51f4ca(0x181)]('/')))),_0xb52ca3[_0x51f4ca(0x175)]('\x00');}return _0xb52ca3['digest'](_0x51f4ca(0x174));}function a343_0x59f4(){const _0x56cb21=['3hpGceL','55ipCBWP','isSymbolicLink','manifest',':\x5cs*(.+)$','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','version','path','name','skills@latest\x20exited\x20','4171124oAKhal','includes','packageRoot','files','Unsupported\x20Skill\x20entry:\x20','length','isDirectory','unverifiable','missing','9IcwLwF','skillVersion','stdio','current','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','INSTALL_FAILED','5473923dXFfFm','hex','update','SKILL.md','status','skills','digest','every','2830376DoeCnS','reason','state','schemaVersion','skipped','content_mismatch','split','partialFailure','pipe','unknown','root','message','parse','home','6399894yBmqsR','rabetbase\x20cli-skill\x20install','rabetbase.manifest.json','22642Vctvfi','startsWith','utf8','join','absent','flatMap','packageVersion','error','output','13989530tQnYIW','1045935IDfzUj','installedPath','VERIFY_FAILED','rabetbase-skills','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest'];a343_0x59f4=function(){return _0x56cb21;};return a343_0x59f4();}function sameFiles(_0x4f1a21,_0x3fa827){const _0x3f560d=a343_0x327335;return _0x4f1a21[_0x3f560d(0x169)]===_0x3fa827['length']&&_0x4f1a21[_0x3f560d(0x17a)]((_0x245014,_0xb975c0)=>_0x245014===_0x3fa827[_0xb975c0]);}function readSource(_0x5cb00c){const _0x427548=a343_0x327335,_0x429f3c=JSON[_0x427548(0x187)](readFileSync(join(_0x5cb00c,'package.json'),'utf8')),_0x1d574f=JSON['parse'](readFileSync(join(_0x5cb00c,_0x427548(0x178),_0x427548(0x18b)),_0x427548(0x18e))),_0x4e1cba=join(_0x5cb00c,_0x427548(0x178),SKILL_NAME),_0x4b64c2=frontmatterValue(readFileSync(join(_0x4e1cba,'SKILL.md'),_0x427548(0x18e)),_0x427548(0x160)),_0x45122d=listFiles(_0x4e1cba);if(_0x1d574f[_0x427548(0x17e)]!==0x1||_0x1d574f['name']!==SKILL_NAME||!_0x429f3c[_0x427548(0x160)]||_0x1d574f[_0x427548(0x192)]!==_0x429f3c[_0x427548(0x160)]||_0x1d574f[_0x427548(0x16e)]!==_0x429f3c[_0x427548(0x160)]||_0x4b64c2!==_0x429f3c[_0x427548(0x160)]||!sameFiles(_0x45122d,_0x1d574f[_0x427548(0x167)])||digestFiles(_0x4e1cba,_0x45122d)!==_0x1d574f[_0x427548(0x179)])throw new Error(_0x427548(0x19a));return{'packageVersion':_0x429f3c[_0x427548(0x160)],'skillVersion':_0x4b64c2,'root':_0x4e1cba,'manifest':_0x1d574f};}function installedSkillPath(_0x5d33a9){const _0x14e534=a343_0x327335,_0x19f181=resolveInstalledSkill(SKILL_NAME,{'home':_0x5d33a9});if(_0x19f181[_0x14e534(0x17d)]==='present')return{'state':'present','path':dirname(_0x19f181[_0x14e534(0x161)])};if(_0x19f181['state']===_0x14e534(0x190))return{'state':_0x14e534(0x16c)};return{'state':_0x14e534(0x16b),'reason':_0x19f181['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x593b4c,_0x2be32f={}){const _0x18d3ef=a343_0x327335,_0x3b651d=installedSkillPath(_0x2be32f['home']??homedir());if(_0x3b651d[_0x18d3ef(0x17d)]===_0x18d3ef(0x16c))return{'state':_0x18d3ef(0x16c),'expectedVersion':_0x593b4c,'repairCommand':REPAIR_COMMAND};if(_0x3b651d[_0x18d3ef(0x17d)]===_0x18d3ef(0x16b))return{'state':'unverifiable','expectedVersion':_0x593b4c,'reason':_0x3b651d[_0x18d3ef(0x17c)],'repairCommand':REPAIR_COMMAND};try{const _0x5822f1=frontmatterValue(readFileSync(join(_0x3b651d['path'],_0x18d3ef(0x176)),_0x18d3ef(0x18e)),_0x18d3ef(0x160));return{'state':_0x5822f1===_0x593b4c?_0x18d3ef(0x170):'version_mismatch','expectedVersion':_0x593b4c,'skillVersion':_0x5822f1,'installedPath':_0x3b651d[_0x18d3ef(0x161)],'repairCommand':REPAIR_COMMAND};}catch(_0x37a8a4){return{'state':_0x18d3ef(0x16b),'expectedVersion':_0x593b4c,'installedPath':_0x3b651d[_0x18d3ef(0x161)],'reason':_0x37a8a4 instanceof Error?_0x37a8a4[_0x18d3ef(0x186)]:String(_0x37a8a4),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x564d13={}){const _0x29cca9=a343_0x327335,_0xf1980d=_0x564d13[_0x29cca9(0x166)]??DEFAULT_PACKAGE_ROOT;let _0x1d440c;try{_0x1d440c=readSource(_0xf1980d);}catch(_0x5ae91b){return{'state':_0x29cca9(0x16b),'packageVersion':'unknown','reason':_0x5ae91b instanceof Error?_0x5ae91b[_0x29cca9(0x186)]:String(_0x5ae91b),'repairCommand':REPAIR_COMMAND};}const _0x5cb6ef=installedSkillPath(_0x564d13[_0x29cca9(0x188)]??homedir());if(_0x5cb6ef[_0x29cca9(0x17d)]===_0x29cca9(0x16c))return{'state':_0x29cca9(0x16c),'packageVersion':_0x1d440c['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x5cb6ef[_0x29cca9(0x17d)]===_0x29cca9(0x16b))return{'state':_0x29cca9(0x16b),'packageVersion':_0x1d440c[_0x29cca9(0x192)],'reason':_0x5cb6ef['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x2a9720=frontmatterValue(readFileSync(join(_0x5cb6ef[_0x29cca9(0x161)],_0x29cca9(0x176)),_0x29cca9(0x18e)),_0x29cca9(0x160));if(_0x2a9720!==_0x1d440c[_0x29cca9(0x16e)])return{'state':'version_mismatch','packageVersion':_0x1d440c[_0x29cca9(0x192)],'skillVersion':_0x2a9720,'installedPath':_0x5cb6ef[_0x29cca9(0x161)],'repairCommand':REPAIR_COMMAND};const _0x3a7efe=listFiles(_0x5cb6ef['path']),_0x8d1f09=digestFiles(_0x5cb6ef['path'],_0x3a7efe);return{'state':sameFiles(_0x3a7efe,_0x1d440c[_0x29cca9(0x19e)]['files'])&&_0x8d1f09===_0x1d440c[_0x29cca9(0x19e)][_0x29cca9(0x179)]?_0x29cca9(0x170):_0x29cca9(0x180),'packageVersion':_0x1d440c[_0x29cca9(0x192)],'skillVersion':_0x2a9720,'installedPath':_0x5cb6ef[_0x29cca9(0x161)],'digest':_0x8d1f09,'repairCommand':REPAIR_COMMAND};}catch(_0x2c31d9){return{'state':_0x29cca9(0x16b),'packageVersion':_0x1d440c[_0x29cca9(0x192)],'installedPath':_0x5cb6ef[_0x29cca9(0x161)],'reason':_0x2c31d9 instanceof Error?_0x2c31d9[_0x29cca9(0x186)]:String(_0x2c31d9),'repairCommand':REPAIR_COMMAND};}}function failure(_0x959521,_0x4990a0,_0x17d808,_0x4634d1){const _0x31d6b5=a343_0x327335;return{'ok':![],'code':_0x959521,'packageVersion':_0x4990a0[_0x31d6b5(0x192)],'skillVersion':_0x4990a0['skillVersion'],'installedPath':_0x4634d1,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x17d808 instanceof Error?_0x17d808[_0x31d6b5(0x186)]:String(_0x17d808)};}export function installBuiltinSkill(_0x2f7663={}){const _0x1be096=a343_0x327335,_0x3278f3=_0x2f7663['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x8c43d0=_0x2f7663[_0x1be096(0x188)]??homedir();let _0x1f5e7b;try{_0x1f5e7b=readSource(_0x3278f3);}catch(_0x1ef929){return failure('SOURCE_INVALID',{'packageVersion':_0x1be096(0x184),'skillVersion':_0x1be096(0x184)},_0x1ef929);}const _0x1ac014=inspectBuiltinSkill({'packageRoot':_0x3278f3,'home':_0x8c43d0}),_0x1b6b12=runNpxSkillsAddGlobal(_0x3278f3,_0x1f5e7b[_0x1be096(0x185)],{'stdio':_0x2f7663[_0x1be096(0x16f)]??_0x1be096(0x183),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x8c43d0}});if(_0x1b6b12[_0x1be096(0x17f)])return{'ok':!![],'packageVersion':_0x1f5e7b[_0x1be096(0x192)],'skillVersion':_0x1f5e7b[_0x1be096(0x16e)],'installedPath':_0x1ac014[_0x1be096(0x197)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x1b6b12['ok'])return failure(_0x1be096(0x172),_0x1f5e7b,_0x1b6b12[_0x1be096(0x193)]??_0x1be096(0x163)+_0x1b6b12[_0x1be096(0x177)]);const _0x2cd6fc=inspectBuiltinSkill({'packageRoot':_0x3278f3,'home':_0x8c43d0});if(_0x2cd6fc[_0x1be096(0x17d)]!==_0x1be096(0x170)){const _0x2578be=_0x2cd6fc['reason']??'Installed\x20Skill\x20state\x20is\x20'+_0x2cd6fc['state'];return failure(_0x1be096(0x198),_0x1f5e7b,_0x1b6b12[_0x1be096(0x182)]?_0x2578be+'\x0a'+_0x1b6b12[_0x1be096(0x182)][_0x1be096(0x194)]:_0x2578be,_0x2cd6fc[_0x1be096(0x197)]);}return _0x1b6b12[_0x1be096(0x182)]&&(debug(_0x1be096(0x15f),_0x1b6b12[_0x1be096(0x182)][_0x1be096(0x194)]),console['log']('CLI\x20Built-in\x20Skill\x20'+_0x1f5e7b['skillVersion']+'\x20verified;\x20'+_0x1b6b12['partialFailure']['count']+_0x1be096(0x171))),{'ok':!![],'packageVersion':_0x1f5e7b['packageVersion'],'skillVersion':_0x1f5e7b[_0x1be096(0x16e)],'installedPath':_0x2cd6fc['installedPath'],'changed':_0x1ac014[_0x1be096(0x17d)]!==_0x1be096(0x170),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a343_0x5cb8bb=a343_0x1bce;(function(_0x5e5a4e,_0x23641a){const _0x3c3e7f=a343_0x1bce,_0x4f58d2=_0x5e5a4e();while(!![]){try{const _0x1d4a38=parseInt(_0x3c3e7f(0x174))/0x1*(-parseInt(_0x3c3e7f(0x158))/0x2)+-parseInt(_0x3c3e7f(0x13b))/0x3*(parseInt(_0x3c3e7f(0x169))/0x4)+-parseInt(_0x3c3e7f(0x16c))/0x5*(-parseInt(_0x3c3e7f(0x15d))/0x6)+parseInt(_0x3c3e7f(0x146))/0x7*(parseInt(_0x3c3e7f(0x167))/0x8)+-parseInt(_0x3c3e7f(0x13d))/0x9+-parseInt(_0x3c3e7f(0x165))/0xa+parseInt(_0x3c3e7f(0x15c))/0xb;if(_0x1d4a38===_0x23641a)break;else _0x4f58d2['push'](_0x4f58d2['shift']());}catch(_0x48d070){_0x4f58d2['push'](_0x4f58d2['shift']());}}}(a343_0x1815,0xb0559));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';function a343_0x1bce(_0x14542d,_0x50a0f8){_0x14542d=_0x14542d-0x135;const _0x18153f=a343_0x1815();let _0x1bceb3=_0x18153f[_0x14542d];return _0x1bceb3;}const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a343_0x5cb8bb(0x136),SKILL_NAME=a343_0x5cb8bb(0x13e),debug=debuglog('rabetbase-skills');function frontmatterValue(_0x3752d9,_0x17eed8){const _0x2f2e08=a343_0x5cb8bb;return _0x3752d9[_0x2f2e08(0x147)](new RegExp('^'+_0x17eed8+_0x2f2e08(0x139),'m'))?.[0x1]?.[_0x2f2e08(0x14f)]()??'';}function a343_0x1815(){const _0x515857=['manifest','1099704xsMghE','installedPath','28832eFalPG','skillVersion','split','114040xsNnIC','home','packageVersion','partialFailure','utf8','hex','name','\x20verified;\x20','7589PpXlhc','isSymbolicLink','packageRoot','rabetbase.manifest.json','state','version_mismatch','length','path','rabetbase\x20cli-skill\x20install','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest',':\x5cs*(.+)$','SKILL.md','174MMZyQI','message','5485680zkTDzI','rabetbase','log','SOURCE_INVALID','status','Symbolic\x20link\x20is\x20not\x20allowed:\x20','Installed\x20Skill\x20state\x20is\x20','present','pipe','56WAmjvE','match','version','includes','INSTALL_FAILED','startsWith','every','output','stdio','trim','parse','count','schemaVersion','absent','join','sha256','isDirectory','reason','214ivlIvt','unknown','update','skills@latest\x20exited\x20','20830062cQvBED','138HMXTOm','VERIFY_FAILED','missing','current','digest','flatMap','files','unverifiable','9560580SkMhho'];a343_0x1815=function(){return _0x515857;};return a343_0x1815();}function listFiles(_0x4d4747,_0x52496f=_0x4d4747){const _0x5e6a77=a343_0x5cb8bb;return readdirSync(_0x52496f,{'withFileTypes':!![]})[_0x5e6a77(0x162)](_0x270f79=>{const _0xd9f23c=_0x5e6a77,_0x9cab8a=join(_0x52496f,_0x270f79[_0xd9f23c(0x172)]),_0x4d5bf1=lstatSync(_0x9cab8a);if(_0x4d5bf1[_0xd9f23c(0x175)]())throw new Error(_0xd9f23c(0x142)+_0x9cab8a);if(_0x4d5bf1[_0xd9f23c(0x156)]())return listFiles(_0x4d4747,_0x9cab8a);if(!_0x4d5bf1['isFile']())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x9cab8a);return[relative(_0x4d4747,_0x9cab8a)[_0xd9f23c(0x16b)](sep)[_0xd9f23c(0x154)]('/')];})['sort']((_0x5c8147,_0x8ca6d9)=>_0x5c8147<_0x8ca6d9?-0x1:_0x5c8147>_0x8ca6d9?0x1:0x0);}function digestFiles(_0x68bc1e,_0x130cf0){const _0x2d8bc8=a343_0x5cb8bb,_0xbef906=createHash(_0x2d8bc8(0x155));for(const _0x4f6084 of _0x130cf0){if(_0x4f6084[_0x2d8bc8(0x14b)]('/')||_0x4f6084[_0x2d8bc8(0x16b)]('/')[_0x2d8bc8(0x149)]('..')||_0x4f6084[_0x2d8bc8(0x149)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x4f6084);_0xbef906['update'](_0x4f6084),_0xbef906[_0x2d8bc8(0x15a)]('\x00'),_0xbef906['update'](readFileSync(join(_0x68bc1e,..._0x4f6084['split']('/')))),_0xbef906[_0x2d8bc8(0x15a)]('\x00');}return _0xbef906[_0x2d8bc8(0x161)](_0x2d8bc8(0x171));}function sameFiles(_0x983072,_0x1a2e69){const _0x22fa13=a343_0x5cb8bb;return _0x983072[_0x22fa13(0x17a)]===_0x1a2e69['length']&&_0x983072[_0x22fa13(0x14c)]((_0x4e3014,_0x2a4bb1)=>_0x4e3014===_0x1a2e69[_0x2a4bb1]);}function readSource(_0x186949){const _0x3b032a=a343_0x5cb8bb,_0xf9b383=JSON['parse'](readFileSync(join(_0x186949,'package.json'),_0x3b032a(0x170))),_0xec5ac4=JSON[_0x3b032a(0x150)](readFileSync(join(_0x186949,'skills',_0x3b032a(0x177)),_0x3b032a(0x170))),_0xac6aa1=join(_0x186949,'skills',SKILL_NAME),_0x22524b=frontmatterValue(readFileSync(join(_0xac6aa1,_0x3b032a(0x13a)),'utf8'),'version'),_0xa22e6c=listFiles(_0xac6aa1);if(_0xec5ac4[_0x3b032a(0x152)]!==0x1||_0xec5ac4[_0x3b032a(0x172)]!==SKILL_NAME||!_0xf9b383['version']||_0xec5ac4[_0x3b032a(0x16e)]!==_0xf9b383[_0x3b032a(0x148)]||_0xec5ac4[_0x3b032a(0x16a)]!==_0xf9b383[_0x3b032a(0x148)]||_0x22524b!==_0xf9b383[_0x3b032a(0x148)]||!sameFiles(_0xa22e6c,_0xec5ac4['files'])||digestFiles(_0xac6aa1,_0xa22e6c)!==_0xec5ac4['digest'])throw new Error(_0x3b032a(0x138));return{'packageVersion':_0xf9b383[_0x3b032a(0x148)],'skillVersion':_0x22524b,'root':_0xac6aa1,'manifest':_0xec5ac4};}function installedSkillPath(_0x5f001b){const _0x320440=a343_0x5cb8bb,_0x1d1841=resolveInstalledSkill(SKILL_NAME,{'home':_0x5f001b});if(_0x1d1841['state']===_0x320440(0x144))return{'state':_0x320440(0x144),'path':dirname(_0x1d1841[_0x320440(0x135)])};if(_0x1d1841[_0x320440(0x178)]===_0x320440(0x153))return{'state':_0x320440(0x15f)};return{'state':_0x320440(0x164),'reason':_0x1d1841[_0x320440(0x157)]};}export function inspectInstalledBuiltinSkillVersion(_0x817fcf,_0x246521={}){const _0x12408f=a343_0x5cb8bb,_0x2fd6ae=installedSkillPath(_0x246521[_0x12408f(0x16d)]??homedir());if(_0x2fd6ae['state']==='missing')return{'state':_0x12408f(0x15f),'expectedVersion':_0x817fcf,'repairCommand':REPAIR_COMMAND};if(_0x2fd6ae[_0x12408f(0x178)]===_0x12408f(0x164))return{'state':_0x12408f(0x164),'expectedVersion':_0x817fcf,'reason':_0x2fd6ae[_0x12408f(0x157)],'repairCommand':REPAIR_COMMAND};try{const _0x473324=frontmatterValue(readFileSync(join(_0x2fd6ae['path'],_0x12408f(0x13a)),_0x12408f(0x170)),_0x12408f(0x148));return{'state':_0x473324===_0x817fcf?_0x12408f(0x160):_0x12408f(0x179),'expectedVersion':_0x817fcf,'skillVersion':_0x473324,'installedPath':_0x2fd6ae[_0x12408f(0x135)],'repairCommand':REPAIR_COMMAND};}catch(_0x43ca20){return{'state':'unverifiable','expectedVersion':_0x817fcf,'installedPath':_0x2fd6ae[_0x12408f(0x135)],'reason':_0x43ca20 instanceof Error?_0x43ca20['message']:String(_0x43ca20),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0xba6b67={}){const _0x3f6697=a343_0x5cb8bb,_0x34daf5=_0xba6b67[_0x3f6697(0x176)]??DEFAULT_PACKAGE_ROOT;let _0x5d95ec;try{_0x5d95ec=readSource(_0x34daf5);}catch(_0x10c8b3){return{'state':_0x3f6697(0x164),'packageVersion':'unknown','reason':_0x10c8b3 instanceof Error?_0x10c8b3['message']:String(_0x10c8b3),'repairCommand':REPAIR_COMMAND};}const _0x255d93=installedSkillPath(_0xba6b67[_0x3f6697(0x16d)]??homedir());if(_0x255d93[_0x3f6697(0x178)]===_0x3f6697(0x15f))return{'state':'missing','packageVersion':_0x5d95ec[_0x3f6697(0x16e)],'repairCommand':REPAIR_COMMAND};if(_0x255d93['state']===_0x3f6697(0x164))return{'state':_0x3f6697(0x164),'packageVersion':_0x5d95ec[_0x3f6697(0x16e)],'reason':_0x255d93[_0x3f6697(0x157)],'repairCommand':REPAIR_COMMAND};try{const _0x5eecd5=frontmatterValue(readFileSync(join(_0x255d93[_0x3f6697(0x135)],'SKILL.md'),'utf8'),'version');if(_0x5eecd5!==_0x5d95ec['skillVersion'])return{'state':_0x3f6697(0x179),'packageVersion':_0x5d95ec['packageVersion'],'skillVersion':_0x5eecd5,'installedPath':_0x255d93[_0x3f6697(0x135)],'repairCommand':REPAIR_COMMAND};const _0x26e98f=listFiles(_0x255d93[_0x3f6697(0x135)]),_0x48bfc4=digestFiles(_0x255d93[_0x3f6697(0x135)],_0x26e98f);return{'state':sameFiles(_0x26e98f,_0x5d95ec[_0x3f6697(0x166)][_0x3f6697(0x163)])&&_0x48bfc4===_0x5d95ec[_0x3f6697(0x166)][_0x3f6697(0x161)]?'current':'content_mismatch','packageVersion':_0x5d95ec[_0x3f6697(0x16e)],'skillVersion':_0x5eecd5,'installedPath':_0x255d93[_0x3f6697(0x135)],'digest':_0x48bfc4,'repairCommand':REPAIR_COMMAND};}catch(_0x2fa0fd){return{'state':_0x3f6697(0x164),'packageVersion':_0x5d95ec[_0x3f6697(0x16e)],'installedPath':_0x255d93['path'],'reason':_0x2fa0fd instanceof Error?_0x2fa0fd[_0x3f6697(0x13c)]:String(_0x2fa0fd),'repairCommand':REPAIR_COMMAND};}}function failure(_0x54f5b5,_0x54f622,_0x253e8c,_0x1579f6){const _0x28a3f5=a343_0x5cb8bb;return{'ok':![],'code':_0x54f5b5,'packageVersion':_0x54f622[_0x28a3f5(0x16e)],'skillVersion':_0x54f622['skillVersion'],'installedPath':_0x1579f6,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x253e8c instanceof Error?_0x253e8c[_0x28a3f5(0x13c)]:String(_0x253e8c)};}export function installBuiltinSkill(_0x1efd03={}){const _0x56ecfe=a343_0x5cb8bb,_0x3d62e1=_0x1efd03[_0x56ecfe(0x176)]??DEFAULT_PACKAGE_ROOT,_0x1a3531=_0x1efd03[_0x56ecfe(0x16d)]??homedir();let _0x15bb52;try{_0x15bb52=readSource(_0x3d62e1);}catch(_0x4a5016){return failure(_0x56ecfe(0x140),{'packageVersion':_0x56ecfe(0x159),'skillVersion':'unknown'},_0x4a5016);}const _0xf3025b=inspectBuiltinSkill({'packageRoot':_0x3d62e1,'home':_0x1a3531}),_0xcd6bc0=runNpxSkillsAddGlobal(_0x3d62e1,_0x15bb52['root'],{'stdio':_0x1efd03[_0x56ecfe(0x14e)]??_0x56ecfe(0x145),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x1a3531}});if(_0xcd6bc0['skipped'])return{'ok':!![],'packageVersion':_0x15bb52[_0x56ecfe(0x16e)],'skillVersion':_0x15bb52[_0x56ecfe(0x16a)],'installedPath':_0xf3025b[_0x56ecfe(0x168)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0xcd6bc0['ok'])return failure(_0x56ecfe(0x14a),_0x15bb52,_0xcd6bc0['error']??_0x56ecfe(0x15b)+_0xcd6bc0[_0x56ecfe(0x141)]);const _0x4ceba4=inspectBuiltinSkill({'packageRoot':_0x3d62e1,'home':_0x1a3531});if(_0x4ceba4[_0x56ecfe(0x178)]!==_0x56ecfe(0x160)){const _0x2ccc70=_0x4ceba4['reason']??_0x56ecfe(0x143)+_0x4ceba4['state'];return failure(_0x56ecfe(0x15e),_0x15bb52,_0xcd6bc0['partialFailure']?_0x2ccc70+'\x0a'+_0xcd6bc0[_0x56ecfe(0x16f)][_0x56ecfe(0x14d)]:_0x2ccc70,_0x4ceba4[_0x56ecfe(0x168)]);}return _0xcd6bc0[_0x56ecfe(0x16f)]&&(debug(_0x56ecfe(0x137),_0xcd6bc0[_0x56ecfe(0x16f)][_0x56ecfe(0x14d)]),console[_0x56ecfe(0x13f)]('CLI\x20Built-in\x20Skill\x20'+_0x15bb52[_0x56ecfe(0x16a)]+_0x56ecfe(0x173)+_0xcd6bc0[_0x56ecfe(0x16f)][_0x56ecfe(0x151)]+'\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.')),{'ok':!![],'packageVersion':_0x15bb52[_0x56ecfe(0x16e)],'skillVersion':_0x15bb52[_0x56ecfe(0x16a)],'installedPath':_0x4ceba4[_0x56ecfe(0x168)],'changed':_0xf3025b[_0x56ecfe(0x178)]!==_0x56ecfe(0x160),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a344_0xc516(){const _0x4397dd=['log','11732YJLtkl','dangerously-bff-save','Error:\x20Unsupported\x20command:\x20','push','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','exit','length','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','argv','5912KrwIus','--help','\x0aAvailable\x20commands:','skill','1603qbHImM','cwd','2920332SjEmsz','setLogPath','from','148232PgGbIV','add','7426590OAzdWm','2uSkhxW','has','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','2502891xilLKW','help','includes','Public\x20Open\x20Skill\x20source:\x20','(empty)','error','141cADQxS','slice','2421865yofVUv'];a344_0xc516=function(){return _0x4397dd;};return a344_0xc516();}(function(_0x15237d,_0x538c5c){const _0x225fd9=a344_0x5ee9,_0x15b459=_0x15237d();while(!![]){try{const _0x419ba8=-parseInt(_0x225fd9(0x1c7))/0x1*(parseInt(_0x225fd9(0x1ca))/0x2)+parseInt(_0x225fd9(0x1d3))/0x3*(parseInt(_0x225fd9(0x1d7))/0x4)+parseInt(_0x225fd9(0x1d5))/0x5+-parseInt(_0x225fd9(0x1c4))/0x6+parseInt(_0x225fd9(0x1c2))/0x7*(-parseInt(_0x225fd9(0x1be))/0x8)+-parseInt(_0x225fd9(0x1cd))/0x9+parseInt(_0x225fd9(0x1c9))/0xa;if(_0x419ba8===_0x538c5c)break;else _0x15b459['push'](_0x15b459['shift']());}catch(_0x5f484c){_0x15b459['push'](_0x15b459['shift']());}}}(a344_0xc516,0x44fe7));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a344_0x5ee9(_0x198fd4,_0x27e1a3){_0x198fd4=_0x198fd4-0x1b9;const _0xc516e9=a344_0xc516();let _0x5ee918=_0xc516e9[_0x198fd4];return _0x5ee918;}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x2df5b4){const _0x599152=a344_0x5ee9,_0x105ae7=[];for(const [_0x1e80cd,_0x55da98]of Object['entries'](_0x2df5b4)){if(_0x55da98===!![]){const _0x1f7e52=_0x1e80cd['replace'](/([A-Z])/g,'-$1')['toLowerCase']();_0x105ae7[_0x599152(0x1da)](_0x1f7e52);}}return _0x105ae7;}export function parseDynamicFlags(){const _0x43f012=a344_0x5ee9,_0x49af05=[];for(let _0x6e02c2=0x3;_0x6e02c2<process[_0x43f012(0x1bd)][_0x43f012(0x1ba)];_0x6e02c2++){const _0x175615=process[_0x43f012(0x1bd)][_0x6e02c2];if(_0x175615&&_0x175615['startsWith']('--')){const _0x534af5=_0x175615[_0x43f012(0x1d4)](0x2);_0x534af5&&!_0x534af5[_0x43f012(0x1cf)]('=')&&_0x49af05[_0x43f012(0x1da)](_0x534af5);}}return _0x49af05;}export function getAllProvidedFlags(_0x3f4dc9){const _0x540c2b=camelCaseFlagsToKebab(_0x3f4dc9),_0x4e2076=parseDynamicFlags(),_0x4c51a6=new Set([..._0x540c2b,..._0x4e2076]);return Array['from'](_0x4c51a6);}export function normalizeLegacyBffSaveFlags(_0x4f4974){const _0x3ac5e4=a344_0x5ee9,_0x5a21a5=new Set(_0x4f4974);return _0x5a21a5[_0x3ac5e4(0x1cb)](_0x3ac5e4(0x1d8))&&_0x5a21a5[_0x3ac5e4(0x1c8)]('enable-bff-save'),Array[_0x3ac5e4(0x1c6)](_0x5a21a5);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x446535,_0x31ffd3,_0x1a3588){const _0x5cbe36=a344_0x5ee9;logger[_0x5cbe36(0x1c5)](process[_0x5cbe36(0x1c3)]());if(_0x1a3588?.[_0x5cbe36(0x1ce)]||_0x446535===_0x5cbe36(0x1bf)){showHelp();return;}console[_0x5cbe36(0x1d2)](_0x5cbe36(0x1d9)+(_0x446535||_0x5cbe36(0x1d1))),console['log'](_0x5cbe36(0x1c0)),console[_0x5cbe36(0x1d6)]('\x20\x20'+CLI_BIN_NAME+_0x5cbe36(0x1cc)),console[_0x5cbe36(0x1d6)](''),console['log'](_0x5cbe36(0x1d0)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x5cbe36(0x1d2)](_0x5cbe36(0x1c1),'Unsupported\x20command:\x20'+_0x446535),process[_0x5cbe36(0x1b9)](0x1);}function showHelp(){const _0x560ded=a344_0x5ee9;console[_0x560ded(0x1d6)](_0x560ded(0x1db)+CLI_BIN_NAME+_0x560ded(0x1bc)+SKILLS_INSTALL_COMMAND_LINE+_0x560ded(0x1bb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a345_0x4a545f=a345_0x2dad;(function(_0x5c2497,_0x54347d){const _0x148093=a345_0x2dad,_0x1d22b0=_0x5c2497();while(!![]){try{const _0x236b7f=-parseInt(_0x148093(0x8b))/0x1+parseInt(_0x148093(0x7a))/0x2*(parseInt(_0x148093(0x9f))/0x3)+-parseInt(_0x148093(0x9c))/0x4*(-parseInt(_0x148093(0xaa))/0x5)+-parseInt(_0x148093(0x8e))/0x6+-parseInt(_0x148093(0xab))/0x7*(parseInt(_0x148093(0x94))/0x8)+parseInt(_0x148093(0xb3))/0x9*(parseInt(_0x148093(0xa3))/0xa)+-parseInt(_0x148093(0x81))/0xb*(parseInt(_0x148093(0x82))/0xc);if(_0x236b7f===_0x54347d)break;else _0x1d22b0['push'](_0x1d22b0['shift']());}catch(_0x342b3a){_0x1d22b0['push'](_0x1d22b0['shift']());}}}(a345_0x1924,0xdfe6a));import{execaSync}from'execa';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a345_0x4a545f(0x8d);export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL=a345_0x4a545f(0x7c);export const RABETBASE_SKILL_SOURCE=a345_0x4a545f(0x99);export const RABETBASE_GLOBAL_SKILL_NAME=a345_0x4a545f(0x9b);export const RABETBASE_SKILL_GIT_SOURCE='git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git';export function resolveGlobalSkillName(_0x1579d3){const _0x365cdb=a345_0x4a545f;switch(_0x1579d3[_0x365cdb(0xa1)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x1c2682){const _0x2c7c0d=a345_0x4a545f,_0x9ecdbf=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x1c2682&&_0x9ecdbf[_0x2c7c0d(0xb1)](NPX_SKILLS_FLAG_SKILL,_0x1c2682),_0x9ecdbf;}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()][a345_0x4a545f(0x9d)]('\x20');function a345_0x1924(){const _0x4a5c11=['failed','code','skill','present','log','inherit','81335LEYDDO','98959HNUTmK','expectedSkillName','SKILL_NOT_INSTALLED','SPAWN_FAILED','pipe','Installer\x20reported\x20','push','unknown','57123jTSFfA','\x22\x20install\x20state:\x20','presence','3285286UwxsjH','message','--skill','Skill\x20\x22','shortMessage','stderr','NPX_NOT_FOUND','11qsbTHH','17541228ZyEeby','INSTALL_PARTIAL','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','CHILD_EXIT_NONZERO','partialFailure','EPERM','checked','npx','CHILD_TERMINATED','826716NEGEqk','warn','skills@latest','2745336UCMVRL','npx\x20terminated\x20by\x20signal\x20','exit\x20','reason','EACCES','npx\x20failed\x20to\x20start','104qLqOmp','signal','NPM_CONFIG_GLOBAL','ENOENT','absent','lovrabet/rabetbase','state','rabetbase','400zAEXCF','join','!\x20Could\x20not\x20verify\x20\x22','3hqqmNF','npm_config_global','trim','stdio','910yoQZde'];a345_0x1924=function(){return _0x4a5c11;};return a345_0x1924();}export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a345_0x4a545f(0x89),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function a345_0x2dad(_0x1165b6,_0x5560b9){_0x1165b6=_0x1165b6-0x79;const _0x19242b=a345_0x1924();let _0x2dad6b=_0x19242b[_0x1165b6];return _0x2dad6b;}function failure(_0x44fe15,_0x1aaa7c,_0x6f82fb){return{'ok':![],'status':_0x1aaa7c,'code':_0x44fe15,'error':'['+_0x44fe15+']\x20'+_0x6f82fb};}function execaOptions(_0x1f7065,_0x257935){const _0x2bbd3a=a345_0x4a545f,_0x3c4c9a={...process.env};return delete _0x3c4c9a[_0x2bbd3a(0xa0)],delete _0x3c4c9a[_0x2bbd3a(0x96)],{'cwd':_0x1f7065,'stdio':_0x257935,'env':_0x3c4c9a,'extendEnv':![],'shell':![],'reject':![],..._0x257935==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x2cf32c,_0x338ef4,_0x15f445){const _0x233eea=a345_0x4a545f,_0x59ddd7=[_0x2cf32c['stdout']?String(_0x2cf32c['stdout']):'',_0x2cf32c[_0x233eea(0x7f)]?String(_0x2cf32c[_0x233eea(0x7f)]):'']['filter'](Boolean)[_0x233eea(0x9d)]('\x0a')[_0x233eea(0xa1)](),_0x364017=_0x2cf32c['exitCode']??null;if(_0x2cf32c[_0x233eea(0xa5)]){const _0xad5237=_0x2cf32c[_0x233eea(0xa5)]===_0x233eea(0x97)?_0x233eea(0x80):_0x2cf32c[_0x233eea(0xa5)]===_0x233eea(0x87)||_0x2cf32c[_0x233eea(0xa5)]===_0x233eea(0x92)?'PERMISSION_DENIED':_0x233eea(0xae);return failure(_0xad5237,_0x364017,_0x2cf32c[_0x233eea(0x7e)]??_0x2cf32c['message']??_0x2cf32c[_0x233eea(0xa5)]);}if(_0x2cf32c[_0x233eea(0x95)])return failure(_0x233eea(0x8a),_0x364017,_0x233eea(0x8f)+_0x2cf32c[_0x233eea(0x95)]);if(_0x2cf32c[_0x233eea(0xa4)]&&_0x364017===null)return failure(_0x233eea(0xae),_0x364017,_0x2cf32c[_0x233eea(0x7e)]??_0x2cf32c[_0x233eea(0x7b)]??_0x233eea(0x93));if(_0x364017!==0x0)return failure(_0x233eea(0x85),_0x364017,_0x59ddd7||_0x2cf32c[_0x233eea(0x7e)]||_0x233eea(0x90)+(_0x364017??_0x233eea(0xb2)));const _0x19e972=_0x338ef4?resolveInstalledSkill(_0x338ef4,_0x15f445):undefined,_0x2cb34e=_0x59ddd7['match'](/Failed to install\s+(\d+)/i);if(_0x2cb34e&&Number(_0x2cb34e[0x1])>0x0){const _0x364e20=_0x233eea(0xb0)+_0x2cb34e[0x1]+'\x20failed\x20target(s)'+(_0x59ddd7?':\x0a'+_0x59ddd7:'');if(_0x19e972?.[_0x233eea(0x9a)]===_0x233eea(0xa7))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x2cb34e[0x1]),'output':_0x59ddd7}};return failure(_0x233eea(0x83),0x0,_0x364e20);}if(_0x19e972){if(_0x19e972[_0x233eea(0x9a)]===_0x233eea(0x98))return failure(_0x233eea(0xad),0x0,_0x233eea(0x7d)+_0x338ef4+_0x233eea(0x84)+_0x19e972[_0x233eea(0x88)][_0x233eea(0x9d)](',\x20')+')');_0x19e972[_0x233eea(0x9a)]==='unverifiable'&&console[_0x233eea(0x8c)](_0x233eea(0x9e)+_0x338ef4+_0x233eea(0xb4)+_0x19e972[_0x233eea(0x91)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x2331ef,_0x12c1a5){const _0x2f6cac=a345_0x4a545f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x28f607=_0x12c1a5?.['stdio']??_0x2f6cac(0xa9),_0x1516d4=buildNpxSkillsAddArgv(_0x12c1a5?.[_0x2f6cac(0xa6)]),_0x2dd424=['npx',..._0x1516d4][_0x2f6cac(0x9d)]('\x20');console[_0x2f6cac(0xa8)]('*\x20'+_0x2dd424);const _0x25f39c=execaSync('npx',_0x1516d4,execaOptions(_0x2331ef,_0x28f607));return normalizeExecaResult(_0x25f39c);}export function runNpxSkillsAddGlobal(_0x2aa788,_0x1f9d08,_0x497533){const _0x2e344a=a345_0x4a545f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x55f842=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x1f9d08,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x276615=[_0x2e344a(0x89),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x1f9d08,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x2e344a(0x9d)]('\x20');console['log']('*\x20'+_0x276615);const _0x518f8f=execaSync(_0x2e344a(0x89),_0x55f842,execaOptions(_0x2aa788,_0x2e344a(0xaf))),_0x5a49ff=normalizeExecaResult(_0x518f8f,_0x497533?.[_0x2e344a(0xac)]??resolveGlobalSkillName(_0x1f9d08),_0x497533?.[_0x2e344a(0x79)]);if(_0x497533?.[_0x2e344a(0xa2)]!==_0x2e344a(0xaf)&&!_0x5a49ff[_0x2e344a(0x86)]){const _0x4933d6=[_0x518f8f['stdout'],_0x518f8f[_0x2e344a(0x7f)]]['filter'](Boolean)[_0x2e344a(0x9d)]('\x0a')[_0x2e344a(0xa1)]();if(_0x4933d6)console[_0x2e344a(0xa8)](_0x4933d6);}return _0x5a49ff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a346_0x43b92d=a346_0x3a8a;(function(_0x29b5fe,_0x4d441e){const _0x50e3f8=a346_0x3a8a,_0x353c17=_0x29b5fe();while(!![]){try{const _0x9e6336=-parseInt(_0x50e3f8(0x82))/0x1+-parseInt(_0x50e3f8(0x8d))/0x2*(-parseInt(_0x50e3f8(0x87))/0x3)+parseInt(_0x50e3f8(0x89))/0x4+-parseInt(_0x50e3f8(0x93))/0x5*(-parseInt(_0x50e3f8(0x7b))/0x6)+parseInt(_0x50e3f8(0x76))/0x7+-parseInt(_0x50e3f8(0x86))/0x8*(parseInt(_0x50e3f8(0x7d))/0x9)+-parseInt(_0x50e3f8(0x94))/0xa;if(_0x9e6336===_0x4d441e)break;else _0x353c17['push'](_0x353c17['shift']());}catch(_0x17eb88){_0x353c17['push'](_0x353c17['shift']());}}}(a346_0xd909,0x32f03));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a346_0x43b92d(0x83),a346_0x43b92d(0x84));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a346_0x43b92d(0x83),'skills'),join(a346_0x43b92d(0x80),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function a346_0x3a8a(_0x40d516,_0x21df61){_0x40d516=_0x40d516-0x76;const _0xd90900=a346_0xd909();let _0x3a8a45=_0xd90900[_0x40d516];return _0x3a8a45;}function a346_0xd909(){const _0x46d32b=['.claude','reason','208838QQiWVE','.agents','.skill-lock.json','unverifiable','935544fQXmDy','3vOojtY','kind','11624eOioSl','recorded','version','parse','434006wuvomc','lockFile','\x20records\x20\x22','\x20is\x20unreadable:\x20','present','\x20uses\x20unsupported\x20version\x20','1113860ZtZojn','2345980IvQVVJ','unusable','map','skills','2284387jJEhir','\x20has\x20no\x20skills\x20map','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','number','not-recorded','6OoAYuw','SKILL.md','9FrkeGz','message','utf8'];a346_0xd909=function(){return _0x46d32b;};return a346_0xd909();}function readLockLookup(_0x2983a2,_0x65ca7e){const _0x41c175=a346_0x43b92d;if(!existsSync(_0x2983a2))return{'kind':_0x41c175(0x7a)};let _0x9e74f6;try{_0x9e74f6=JSON[_0x41c175(0x8c)](readFileSync(_0x2983a2,_0x41c175(0x7f)));}catch(_0x15ba6f){return{'kind':_0x41c175(0x95),'reason':_0x2983a2+_0x41c175(0x90)+_0x15ba6f[_0x41c175(0x7e)]};}const _0x3abe80=_0x9e74f6;if(typeof _0x3abe80?.[_0x41c175(0x8b)]!==_0x41c175(0x79)||!SUPPORTED_LOCK_VERSIONS['includes'](_0x3abe80[_0x41c175(0x8b)]))return{'kind':_0x41c175(0x95),'reason':_0x2983a2+_0x41c175(0x92)+String(_0x3abe80?.[_0x41c175(0x8b)])};if(!_0x3abe80['skills']||typeof _0x3abe80[_0x41c175(0x97)]!=='object')return{'kind':'unusable','reason':_0x2983a2+_0x41c175(0x77)};return _0x3abe80[_0x41c175(0x97)][_0x65ca7e]?{'kind':_0x41c175(0x8a)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x5afefa,_0x4f457c){const _0x227619=a346_0x43b92d,_0x2e57bf=_0x4f457c?.['home']??homedir(),_0x2e30a7=_0x4f457c?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x227619(0x96)](_0x5f216d=>join(_0x2e57bf,_0x5f216d)),_0x5533fe=_0x4f457c?.[_0x227619(0x8e)]??join(_0x2e57bf,SKILL_LOCK_RELATIVE_PATH),_0x6b9a55=_0x2e30a7[_0x227619(0x96)](_0x248962=>join(_0x248962,_0x5afefa,_0x227619(0x7c))),_0x2808c9=_0x6b9a55['find'](_0x1069b1=>existsSync(_0x1069b1));if(_0x2808c9)return{'state':_0x227619(0x91),'path':_0x2808c9};const _0x3bea6d=readLockLookup(_0x5533fe,_0x5afefa);if(_0x3bea6d[_0x227619(0x88)]===_0x227619(0x95))return{'state':_0x227619(0x85),'reason':_0x3bea6d[_0x227619(0x81)]};if(_0x3bea6d[_0x227619(0x88)]===_0x227619(0x8a))return{'state':_0x227619(0x85),'reason':_0x5533fe+_0x227619(0x8f)+_0x5afefa+_0x227619(0x78)+('('+_0x6b9a55['join'](',\x20')+')')};return{'state':'absent','checked':_0x6b9a55};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a347_0x11cb(){const _0x10160f=['command','2144525zgxngR','error','128lgwzjl','3703152PhvWRi','durationMs','[REDACTED]','stringify','11886364tLkcwq','flags','16220hfKuHm','some','9IUzxpU','260XIDZIp','service','1598668PSTsby','rabetbase.command','424377albSBA','1760196LEIbdQ'];a347_0x11cb=function(){return _0x10160f;};return a347_0x11cb();}function a347_0x5669(_0x32bc5f,_0x1f7217){_0x32bc5f=_0x32bc5f-0x1bd;const _0x11cbbb=a347_0x11cb();let _0x5669b2=_0x11cbbb[_0x32bc5f];return _0x5669b2;}(function(_0x2fc398,_0x543b91){const _0x3b4647=a347_0x5669,_0x87a2b4=_0x2fc398();while(!![]){try{const _0x2aa866=parseInt(_0x3b4647(0x1c1))/0x1*(-parseInt(_0x3b4647(0x1c8))/0x2)+parseInt(_0x3b4647(0x1ca))/0x3*(-parseInt(_0x3b4647(0x1cd))/0x4)+parseInt(_0x3b4647(0x1bf))/0x5+parseInt(_0x3b4647(0x1bd))/0x6+parseInt(_0x3b4647(0x1c6))/0x7+-parseInt(_0x3b4647(0x1c2))/0x8+-parseInt(_0x3b4647(0x1cf))/0x9*(-parseInt(_0x3b4647(0x1cb))/0xa);if(_0x2aa866===_0x543b91)break;else _0x87a2b4['push'](_0x87a2b4['shift']());}catch(_0x1d5f2e){_0x87a2b4['push'](_0x87a2b4['shift']());}}}(a347_0x11cb,0xe7096));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x565674){const _0x4709a9=a347_0x5669;return SENSITIVE_PATTERNS[_0x4709a9(0x1c9)](_0x2a0a7f=>_0x2a0a7f['test'](_0x565674));}function sanitizeFlags(_0x5013be){const _0x1f68da=a347_0x5669,_0x4f9172={};for(const [_0x554644,_0x34425d]of Object['entries'](_0x5013be)){isSensitiveKey(_0x554644)?_0x4f9172[_0x554644]=_0x34425d!=null&&_0x34425d!==''?_0x1f68da(0x1c4):_0x34425d:_0x4f9172[_0x554644]=_0x34425d;}return _0x4f9172;}export async function reportCommandTrace(_0x36844d){const _0x3a40a7=a347_0x5669;try{const _0x1ef966=sanitizeFlags(_0x36844d[_0x3a40a7(0x1c7)]);await sendCliTraceLog({'spanName':_0x3a40a7(0x1ce),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x36844d[_0x3a40a7(0x1cc)],'command.name':_0x36844d[_0x3a40a7(0x1be)],'command.flags':JSON[_0x3a40a7(0x1c5)](_0x1ef966),..._0x36844d[_0x3a40a7(0x1c3)]!=null?{'command.duration_ms':_0x36844d[_0x3a40a7(0x1c3)]}:{},..._0x36844d['error']?{'command.error':_0x36844d[_0x3a40a7(0x1c0)]instanceof Error?_0x36844d[_0x3a40a7(0x1c0)]['message']:String(_0x36844d[_0x3a40a7(0x1c0)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16bf64,_0x2b860c){var _0x55073e=a348_0x1681,_0x545d3e=_0x16bf64();while(!![]){try{var _0x5b4a60=-parseInt(_0x55073e(0x15b))/0x1*(parseInt(_0x55073e(0x15c))/0x2)+-parseInt(_0x55073e(0x158))/0x3*(-parseInt(_0x55073e(0x160))/0x4)+-parseInt(_0x55073e(0x154))/0x5+-parseInt(_0x55073e(0x15a))/0x6*(-parseInt(_0x55073e(0x15e))/0x7)+parseInt(_0x55073e(0x156))/0x8+-parseInt(_0x55073e(0x15f))/0x9+parseInt(_0x55073e(0x155))/0xa;if(_0x5b4a60===_0x2b860c)break;else _0x545d3e['push'](_0x545d3e['shift']());}catch(_0x2619b7){_0x545d3e['push'](_0x545d3e['shift']());}}}(a348_0x356a,0x723f2));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x521fd3,_0x32146e){var _0x4a1821=a348_0x1681;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x521fd3,..._0x32146e?.[_0x4a1821(0x157)]&&{'rabetbase.help.service':_0x32146e[_0x4a1821(0x157)]}}});}catch(_0x409280){console[_0x4a1821(0x159)](_0x4a1821(0x15d),_0x409280);}}function a348_0x1681(_0x3dff98,_0x41323d){_0x3dff98=_0x3dff98-0x154;var _0x356a23=a348_0x356a();var _0x1681f3=_0x356a23[_0x3dff98];return _0x1681f3;}function a348_0x356a(){var _0x4e9ae4=['5859816NPcIWv','service','3LEwGoH','error','342NHjJYO','21eKfVBE','69926WZMANO','Failed\x20to\x20report\x20CLI\x20help\x20trace:','10031VLKiNY','2643876WVdQlx','2920048bdNBIm','2841725NNNngK','5201160nvPPbg'];a348_0x356a=function(){return _0x4e9ae4;};return a348_0x356a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c1e72,_0x5b5a1b){const _0x44aa00=a349_0x249b,_0xaf4952=_0x2c1e72();while(!![]){try{const _0x235497=parseInt(_0x44aa00(0x190))/0x1*(parseInt(_0x44aa00(0x196))/0x2)+parseInt(_0x44aa00(0x19d))/0x3+parseInt(_0x44aa00(0x19c))/0x4*(-parseInt(_0x44aa00(0x195))/0x5)+parseInt(_0x44aa00(0x198))/0x6+-parseInt(_0x44aa00(0x194))/0x7+-parseInt(_0x44aa00(0x19b))/0x8*(parseInt(_0x44aa00(0x193))/0x9)+-parseInt(_0x44aa00(0x191))/0xa;if(_0x235497===_0x5b5a1b)break;else _0xaf4952['push'](_0xaf4952['shift']());}catch(_0x1347c0){_0xaf4952['push'](_0xaf4952['shift']());}}}(a349_0x4b4a,0x728d8));function a349_0x249b(_0x27535a,_0x2b6f1d){_0x27535a=_0x27535a-0x190;const _0x4b4a2b=a349_0x4b4a();let _0x249bc6=_0x4b4a2b[_0x27535a];return _0x249bc6;}function a349_0x4b4a(){const _0x581ae3=['4254450svnQhf','username','7563285lqyPCi','403235vuhyob','5YCiBuH','31288CRaZre','tenant','4550082OZjRye','user','production','8RXlktv','1174832hKVwiZ','1261896mlXsSK','58AvOKAK'];a349_0x4b4a=function(){return _0x581ae3;};return a349_0x4b4a();}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x12ffea=a349_0x249b,_0x4b4678=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x4ac94f=_0x4b4678?.[_0x12ffea(0x199)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x12ffea(0x19a))}),setUserContext({'id':_0x4ac94f?.['id'],'username':_0x4ac94f?.[_0x12ffea(0x192)],'nickname':_0x4ac94f?.['nickname'],'email':_0x4ac94f?.['email'],'tenantCode':_0x4ac94f?.[_0x12ffea(0x197)]?.['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x4b4678;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x267e56,_0x380108){const _0x20748d=a350_0x5348,_0x2fda0f=_0x267e56();while(!![]){try{const _0x479071=-parseInt(_0x20748d(0x161))/0x1+parseInt(_0x20748d(0x15d))/0x2*(-parseInt(_0x20748d(0x165))/0x3)+parseInt(_0x20748d(0x16a))/0x4+parseInt(_0x20748d(0x160))/0x5+parseInt(_0x20748d(0x164))/0x6+-parseInt(_0x20748d(0x166))/0x7+parseInt(_0x20748d(0x167))/0x8*(-parseInt(_0x20748d(0x163))/0x9);if(_0x479071===_0x380108)break;else _0x2fda0f['push'](_0x2fda0f['shift']());}catch(_0x1b0b4c){_0x2fda0f['push'](_0x2fda0f['shift']());}}}(a350_0x2b31,0x26838));function a350_0x5348(_0x57ba74,_0x17e7c8){_0x57ba74=_0x57ba74-0x15c;const _0x2b31eb=a350_0x2b31();let _0x53483a=_0x2b31eb[_0x57ba74];return _0x53483a;}import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a350_0x2b31(){const _0x448ed7=['SIGTERM','SIGINT','1040350XbWFyi','136642DaiJel','once','1494ZtrcBA','853788JHdAjM','3LoUgzE','1034187uittKG','40xGiSUR','then','exit','730272YXHPtC','beforeExit','179942nfVwuu'];a350_0x2b31=function(){return _0x448ed7;};return a350_0x2b31();}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x3e10a0=a350_0x5348;process[_0x3e10a0(0x162)](_0x3e10a0(0x15c),()=>{void flushOtelNodeIfUsed();});const _0x44c7af=()=>{const _0x50900b=_0x3e10a0;void flushOtelNodeIfUsed()[_0x50900b(0x168)](()=>process[_0x50900b(0x169)](0x0));};process[_0x3e10a0(0x162)](_0x3e10a0(0x15f),_0x44c7af),process[_0x3e10a0(0x162)](_0x3e10a0(0x15e),_0x44c7af);}export async function exitWithOtelShutdown(_0x3f1945){const _0x4a4515=a350_0x5348;await flushOtelNodeIfUsed(),process[_0x4a4515(0x169)](_0x3f1945);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a351_0x57ae(_0x44037d,_0x530a37){_0x44037d=_0x44037d-0x1b0;const _0x2391af=a351_0x2391();let _0x57ae9a=_0x2391af[_0x44037d];return _0x57ae9a;}const a351_0x5a4ff3=a351_0x57ae;(function(_0x229195,_0x481404){const _0x5f23fe=a351_0x57ae,_0x58cc65=_0x229195();while(!![]){try{const _0xaded58=parseInt(_0x5f23fe(0x1b8))/0x1+-parseInt(_0x5f23fe(0x1bf))/0x2*(parseInt(_0x5f23fe(0x1bc))/0x3)+-parseInt(_0x5f23fe(0x1b6))/0x4+-parseInt(_0x5f23fe(0x1b1))/0x5*(-parseInt(_0x5f23fe(0x1c0))/0x6)+-parseInt(_0x5f23fe(0x1c2))/0x7*(parseInt(_0x5f23fe(0x1ba))/0x8)+-parseInt(_0x5f23fe(0x1b2))/0x9*(parseInt(_0x5f23fe(0x1b5))/0xa)+-parseInt(_0x5f23fe(0x1b9))/0xb*(-parseInt(_0x5f23fe(0x1be))/0xc);if(_0xaded58===_0x481404)break;else _0x58cc65['push'](_0x58cc65['shift']());}catch(_0x58b5c3){_0x58cc65['push'](_0x58cc65['shift']());}}}(a351_0x2391,0xd8cbd));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a351_0x5a4ff3(0x1b0);function a351_0x2391(){const _0x45a647=['traceparent','1724359NOfbxo','rabetbase-cli','5NyYALl','27kDoxOD','logData','traceName','1826230XyvRgE','367520OgTFeN','version','562945kLzKYr','22AoKxGL','48jYrjkr','manual','3ResLjp','spanName','22115952UHzOXF','3340430aytOZe','2562276QlvzJf'];a351_0x2391=function(){return _0x45a647;};return a351_0x2391();}export async function sendCliTraceLog(_0x57e810){const _0x109622=a351_0x5a4ff3;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x57e810[_0x109622(0x1b4)]??DEFAULT_TRACE_NAME,'version':_0x57e810[_0x109622(0x1b7)]??getCliVersion(),'spanName':_0x57e810[_0x109622(0x1bd)],'eventType':_0x109622(0x1bb),'logData':_0x57e810[_0x109622(0x1b3)],..._0x57e810['traceparent']&&{'traceparent':_0x57e810[_0x109622(0x1c1)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a352_0x10202b=a352_0x3142;function a352_0x3440(){const _0x15fc19=['title','2423245rGUBrC','originalBytes','8RzfsoE','2676195qolaTJ','redactionCount','2BkOCYp','1109999krFHJy','11xoPuPt','sanitize','6IqONxt','248IqYGPb','join','issue.log.collect','70002ibHPwi','10765260xOUHth','truncated','description','2886506vLRUiy','64665816ccBsvO'];a352_0x3440=function(){return _0x15fc19;};return a352_0x3440();}(function(_0x3e46ed,_0x1e61e4){const _0x2fdcd8=a352_0x3142,_0x49b5bf=_0x3e46ed();while(!![]){try{const _0x4dbdba=-parseInt(_0x2fdcd8(0xb8))/0x1+-parseInt(_0x2fdcd8(0xb7))/0x2*(parseInt(_0x2fdcd8(0xb5))/0x3)+-parseInt(_0x2fdcd8(0xb4))/0x4*(parseInt(_0x2fdcd8(0xb2))/0x5)+parseInt(_0x2fdcd8(0xbb))/0x6*(-parseInt(_0x2fdcd8(0xc3))/0x7)+-parseInt(_0x2fdcd8(0xbc))/0x8*(parseInt(_0x2fdcd8(0xbf))/0x9)+-parseInt(_0x2fdcd8(0xc0))/0xa+parseInt(_0x2fdcd8(0xb9))/0xb*(parseInt(_0x2fdcd8(0xb0))/0xc);if(_0x4dbdba===_0x1e61e4)break;else _0x49b5bf['push'](_0x49b5bf['shift']());}catch(_0x3f5070){_0x49b5bf['push'](_0x49b5bf['shift']());}}}(a352_0x3440,0xa7d5e));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME='platform-issue-log-collect';export const PLATFORM_ISSUE_SPAN_NAME=a352_0x10202b(0xbe);function a352_0x3142(_0x4a8f16,_0x36ab9a){_0x4a8f16=_0x4a8f16-0xb0;const _0x3440ed=a352_0x3440();let _0x31423f=_0x3440ed[_0x4a8f16];return _0x31423f;}export async function sendPlatformIssueCollectLog(_0x4b5424){const _0x57302f=a352_0x10202b;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x4b5424[_0x57302f(0xb1)],'issue.description':_0x4b5424[_0x57302f(0xc2)],..._0x4b5424[_0x57302f(0xba)]?{'issue.description_original_bytes':_0x4b5424[_0x57302f(0xba)][_0x57302f(0xb3)],'issue.description_truncated':_0x4b5424[_0x57302f(0xba)][_0x57302f(0xc1)],'issue.description_redactions':_0x4b5424['sanitize'][_0x57302f(0xb6)],'issue.description_redaction_kinds':_0x4b5424[_0x57302f(0xba)]['redactionKinds'][_0x57302f(0xbd)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a354_0x571c(_0x5eda81,_0x3f8b43){_0x5eda81=_0x5eda81-0xd0;const _0x3ee994=a354_0x3ee9();let _0x571c67=_0x3ee994[_0x5eda81];return _0x571c67;}const a354_0x3a667a=a354_0x571c;(function(_0x5d89bf,_0x4e86e3){const _0x4894ac=a354_0x571c,_0x199fd4=_0x5d89bf();while(!![]){try{const _0x22eeb2=parseInt(_0x4894ac(0xdb))/0x1*(-parseInt(_0x4894ac(0x103))/0x2)+parseInt(_0x4894ac(0x106))/0x3+-parseInt(_0x4894ac(0xe3))/0x4+-parseInt(_0x4894ac(0x101))/0x5*(parseInt(_0x4894ac(0xf9))/0x6)+parseInt(_0x4894ac(0x102))/0x7*(-parseInt(_0x4894ac(0xe8))/0x8)+parseInt(_0x4894ac(0xf3))/0x9+parseInt(_0x4894ac(0xff))/0xa;if(_0x22eeb2===_0x4e86e3)break;else _0x199fd4['push'](_0x199fd4['shift']());}catch(_0x13492b){_0x199fd4['push'](_0x199fd4['shift']());}}}(a354_0x3ee9,0x677a1));export const CORE_IDE_CONFIGS={'cursor':{'name':a354_0x3a667a(0xd9),'description':a354_0x3a667a(0xfb),'folders':[a354_0x3a667a(0x105),a354_0x3a667a(0xea)],'files':[{'type':a354_0x3a667a(0xf7),'path':a354_0x3a667a(0xec)}]},'windsurf':{'name':a354_0x3a667a(0xe1),'description':'Windsurf\x20IDE','folders':[a354_0x3a667a(0xfd)],'files':[{'type':a354_0x3a667a(0xf7),'path':a354_0x3a667a(0xdd)}]},'claude':{'name':a354_0x3a667a(0xda),'description':a354_0x3a667a(0xda),'folders':['.claude'],'files':[{'type':a354_0x3a667a(0xf7),'path':a354_0x3a667a(0xe7)}]},'cline':{'name':a354_0x3a667a(0xe6),'description':a354_0x3a667a(0xe0),'folders':[a354_0x3a667a(0xd6)],'files':[{'type':'file','path':a354_0x3a667a(0xe2)}]},'codex':{'name':a354_0x3a667a(0xd7),'description':'Codex\x20IDE','folders':[a354_0x3a667a(0xee)],'files':[{'type':'file','path':'.codex/skills/lovrabet/SKILL.md'}]},'opencode':{'name':a354_0x3a667a(0xd4),'description':a354_0x3a667a(0xe9),'folders':[a354_0x3a667a(0xf5)],'files':[{'type':'file','path':a354_0x3a667a(0xf1)}]},'qoder':{'name':a354_0x3a667a(0xf0),'description':'Qoder\x20IDE','folders':[a354_0x3a667a(0xd3)],'files':[{'type':a354_0x3a667a(0xf7),'path':'.qoder/rules/rabetbase.md'},{'type':a354_0x3a667a(0xf7),'path':'.qoder/skills/lovrabet/SKILL.md'}]},'codebuddy':{'name':'CodeBuddy','description':a354_0x3a667a(0xe4),'folders':[a354_0x3a667a(0xdc)],'files':[{'type':a354_0x3a667a(0xf7),'path':a354_0x3a667a(0xe5)}]},'trae':{'name':a354_0x3a667a(0xfe),'description':a354_0x3a667a(0xd1),'folders':[a354_0x3a667a(0xd5)],'files':[{'type':'file','path':a354_0x3a667a(0xef)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a354_0x3a667a(0xd8),'description':a354_0x3a667a(0xf8),'folders':[a354_0x3a667a(0xfa)],'files':[{'type':a354_0x3a667a(0xf7),'path':a354_0x3a667a(0xfc)}]},'antigravity':{'name':a354_0x3a667a(0xdf),'description':a354_0x3a667a(0x104),'folders':['.agent'],'files':[{'type':a354_0x3a667a(0xf7),'path':'.agent/skills/lovrabet/SKILL.md'}]}};export const CORE_IDE_LIST=['claude',a354_0x3a667a(0xde),a354_0x3a667a(0xf6),a354_0x3a667a(0xd0),'cursor',a354_0x3a667a(0xeb),'qoder',a354_0x3a667a(0xed),a354_0x3a667a(0xd2)];export const IDE_LIST=[a354_0x3a667a(0x100),a354_0x3a667a(0xf4),a354_0x3a667a(0xde),a354_0x3a667a(0xf6),a354_0x3a667a(0xd0),'cursor',a354_0x3a667a(0xeb),a354_0x3a667a(0xf2),a354_0x3a667a(0xed),'windsurf','agent'];function a354_0x3ee9(){const _0x151575=['Trae\x20IDE','windsurf','.qoder','OpenCode','.trae','.cline','Codex','Other\x20(generic\x20template)','Cursor','Claude\x20Code','11aqjvFO','.codebuddy','.windsurf/workflows/rabetbase.md','cline','Antigravity','Cline\x20IDE','Windsurf','.cline/skills/lovrabet/SKILL.md','1309168zYiddA','CodeBuddy\x20IDE','.codebuddy/skills/lovrabet/SKILL.md','Cline','.claude/skills/lovrabet/SKILL.md','8HtydiA','OpenCode\x20IDE','.cursor','opencode','.cursor/skills/rabetbase.md','trae','.codex','.trae/skills/lovrabet/SKILL.md','Qoder','.opencode/skills/lovrabet/SKILL.md','qoder','3502071YmFKsz','claude','.opencode','codebuddy','file','Generic\x20template\x20fallback','606FVYJfe','.agent','Cursor\x20IDE','.agent/skills/lovrabet/SKILL.md','.windsurf','Trae','12785530OmNhbq','antigravity','36405VwPMAm','129395OePUbL','78076UQSINm','Antigravity\x20IDE','.cursorrules','800235IOuely','cursor','codex'];a354_0x3ee9=function(){return _0x151575;};return a354_0x3ee9();}export const ALL_CORE_IDES=[a354_0x3a667a(0x107),a354_0x3a667a(0xd2),'claude','cline','codex','opencode','qoder',a354_0x3a667a(0xf6),a354_0x3a667a(0xed)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x44a3b5,_0x7de9de){const _0x317d72=a355_0x2765,_0x57ee4d=_0x44a3b5();while(!![]){try{const _0x1d33ff=parseInt(_0x317d72(0x1bf))/0x1*(-parseInt(_0x317d72(0x1c0))/0x2)+parseInt(_0x317d72(0x1bc))/0x3*(parseInt(_0x317d72(0x1c4))/0x4)+-parseInt(_0x317d72(0x1c3))/0x5*(parseInt(_0x317d72(0x1c2))/0x6)+-parseInt(_0x317d72(0x1c1))/0x7*(-parseInt(_0x317d72(0x1ba))/0x8)+-parseInt(_0x317d72(0x1bb))/0x9+parseInt(_0x317d72(0x1be))/0xa+parseInt(_0x317d72(0x1bd))/0xb;if(_0x1d33ff===_0x7de9de)break;else _0x57ee4d['push'](_0x57ee4d['shift']());}catch(_0x29b7cd){_0x57ee4d['push'](_0x57ee4d['shift']());}}}(a355_0x1c2d,0x47182));function a355_0x2765(_0x320332,_0x580590){_0x320332=_0x320332-0x1ba;const _0x1c2d0c=a355_0x1c2d();let _0x27652b=_0x1c2d0c[_0x320332];return _0x27652b;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a355_0x1c2d(){const _0x160f41=['3462MokRIc','11042295oIVVVJ','3421480LeMXFL','564121PZzlty','2PIzYST','76286mvgSKE','18RXtHUx','267005jUoxyP','284hbJXlm','48yldLdY','4300101VGPWPz'];a355_0x1c2d=function(){return _0x160f41;};return a355_0x1c2d();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1afdf3,_0x480cfa){const _0x3017bd=a356_0x46f7,_0x1beb4a=_0x1afdf3();while(!![]){try{const _0x13734d=-parseInt(_0x3017bd(0x15d))/0x1*(-parseInt(_0x3017bd(0x160))/0x2)+parseInt(_0x3017bd(0x168))/0x3*(-parseInt(_0x3017bd(0x15e))/0x4)+parseInt(_0x3017bd(0x15a))/0x5+parseInt(_0x3017bd(0x15f))/0x6*(-parseInt(_0x3017bd(0x164))/0x7)+parseInt(_0x3017bd(0x166))/0x8*(-parseInt(_0x3017bd(0x167))/0x9)+-parseInt(_0x3017bd(0x161))/0xa*(parseInt(_0x3017bd(0x163))/0xb)+parseInt(_0x3017bd(0x159))/0xc*(parseInt(_0x3017bd(0x158))/0xd);if(_0x13734d===_0x480cfa)break;else _0x1beb4a['push'](_0x1beb4a['shift']());}catch(_0x15da6c){_0x1beb4a['push'](_0x1beb4a['shift']());}}}(a356_0x199d,0x335d5));function a356_0x199d(){const _0x5db8aa=['/config.json','sdk','278318RGFdcH','482680ebdqgz','78WzNLke','2yKNrVP','373970lmWVWc','/config/index.json','11xHnAxm','25655bKhWTA','application/json','8ZglKTC','3721059jPqIyI','9RpaMmr','now','9699027TWPhZD','12uhMune','232475NjubMf'];a356_0x199d=function(){return _0x5db8aa;};return a356_0x199d();}import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x5bcddb=a356_0x46f7,_0x27a8b1=getTemplateBaseUrl(),_0x1a481e=[_0x27a8b1+_0x5bcddb(0x15b),_0x27a8b1+_0x5bcddb(0x162)];for(const _0x5c957c of _0x1a481e){try{const _0xc7d16a=await fetch(_0x5c957c,{'headers':{'Accept':_0x5bcddb(0x165)}});if(!_0xc7d16a['ok'])continue;const _0x3f72c2=await _0xc7d16a['json']();if(!_0x3f72c2['cli']?.['stableVersion']||!_0x3f72c2[_0x5bcddb(0x15c)]?.['node']?.['stableVersion'])continue;return _0x3f72c2;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a356_0x46f7(_0x32e8f6,_0x4bb53e){_0x32e8f6=_0x32e8f6-0x158;const _0x199dc9=a356_0x199d();let _0x46f7b2=_0x199dc9[_0x32e8f6];return _0x46f7b2;}export async function getCdnConfig(){const _0x207ed9=a356_0x46f7,_0x1a497f=Date[_0x207ed9(0x169)]();if(hasCachedConfig){const _0x197d41=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x1a497f-cacheTime<_0x197d41)return cachedConfig;}const _0xad8a79=await fetchCdnConfig();return cachedConfig=_0xad8a79,cacheTime=_0x1a497f,hasCachedConfig=!![],_0xad8a79;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a357_0x5382bd=a357_0x2591;(function(_0x58d080,_0x44c408){const _0x57a687=a357_0x2591,_0x366975=_0x58d080();while(!![]){try{const _0x331088=parseInt(_0x57a687(0xcf))/0x1+parseInt(_0x57a687(0xeb))/0x2*(-parseInt(_0x57a687(0xe1))/0x3)+-parseInt(_0x57a687(0xf2))/0x4+-parseInt(_0x57a687(0xd9))/0x5+parseInt(_0x57a687(0xe6))/0x6+parseInt(_0x57a687(0xce))/0x7*(-parseInt(_0x57a687(0xe5))/0x8)+parseInt(_0x57a687(0xf0))/0x9;if(_0x331088===_0x44c408)break;else _0x366975['push'](_0x366975['shift']());}catch(_0x3ffc62){_0x366975['push'](_0x366975['shift']());}}}(a357_0x3f6f,0x4a36d));import a357_0x481ed0 from'node:fs';import a357_0x1618d2 from'node:path';import a357_0x3280b0 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a357_0x5382bd(0xe9);function isNonNumericVersion(_0x43dfb0){const _0x587eef=a357_0x5382bd,_0x512edb=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x512edb[_0x587eef(0xd2)](_0x301b7d=>_0x301b7d[_0x587eef(0xdb)](_0x43dfb0));}function getInstalledVersion(_0x5d1b59,_0x12106d){const _0x5a27ec=a357_0x5382bd;try{const _0x2af358=a357_0x1618d2['join'](_0x5d1b59,_0x5a27ec(0xd1),_0x12106d,_0x5a27ec(0xde));if(a357_0x481ed0[_0x5a27ec(0xee)](_0x2af358)){const _0x3b9b1c=JSON[_0x5a27ec(0xed)](a357_0x481ed0['readFileSync'](_0x2af358,_0x5a27ec(0xe3)));return _0x3b9b1c[_0x5a27ec(0xd7)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x116ba3=a357_0x5382bd;try{const _0xbeee42=await getCdnConfig();return _0xbeee42?.['sdk']?.['node']?.[_0x116ba3(0xef)]||null;}catch{return null;}}async function getSdkPackageName(){const _0xe64020=a357_0x5382bd;try{const _0x455550=await getCdnConfig();return _0x455550?.[_0xe64020(0xdf)]?.[_0xe64020(0xd4)]?.[_0xe64020(0xe4)]||_0xe64020(0xe8);}catch{return _0xe64020(0xe8);}}export async function checkSdkVersion(_0x199f05){const _0x38dcb8=a357_0x5382bd,_0x2ae100=a357_0x1618d2[_0x38dcb8(0xda)](_0x199f05,_0x38dcb8(0xde)),[_0x1ce0f2,_0x42cb23]=await Promise[_0x38dcb8(0xd8)]([getSdkStableVersion(),getSdkPackageName()]),_0x5312da=_0x1ce0f2||FALLBACK_MIN_SDK_VERSION;if(!a357_0x481ed0[_0x38dcb8(0xee)](_0x2ae100))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5312da,'packageName':_0x42cb23,'stableVersion':_0x1ce0f2};try{const _0x595e2a=JSON[_0x38dcb8(0xed)](a357_0x481ed0['readFileSync'](_0x2ae100,_0x38dcb8(0xf3))),_0x6985=_0x595e2a[_0x38dcb8(0xe0)]||{},_0x26a238=_0x595e2a[_0x38dcb8(0xdc)]||{},_0x3af223=_0x6985[_0x42cb23]||_0x26a238[_0x42cb23];if(!_0x3af223)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5312da,'packageName':_0x42cb23,'stableVersion':_0x1ce0f2};let _0x45f05a=getInstalledVersion(_0x199f05,_0x42cb23);!_0x45f05a&&(_0x45f05a=_0x3af223);if(isNonNumericVersion(_0x3af223))return{'installed':!![],'version':_0x45f05a,'needsUpgrade':![],'minVersion':_0x5312da,'packageName':_0x42cb23,'stableVersion':_0x1ce0f2};const _0x37582f=a357_0x3280b0[_0x38dcb8(0xd3)](_0x45f05a),_0x2089fa=a357_0x3280b0[_0x38dcb8(0xd3)](_0x5312da),_0x2da172=_0x37582f&&_0x2089fa?a357_0x3280b0['lt'](_0x37582f,_0x2089fa):![];return{'installed':!![],'version':_0x45f05a,'needsUpgrade':_0x2da172,'minVersion':_0x5312da,'packageName':_0x42cb23,'stableVersion':_0x1ce0f2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5312da,'packageName':_0x42cb23,'stableVersion':_0x1ce0f2};}}export function checkSdkVersionSync(_0x5ba677){const _0x36e2d2=a357_0x5382bd,_0x3a3ee7=a357_0x1618d2[_0x36e2d2(0xda)](_0x5ba677,_0x36e2d2(0xde)),_0x2deb9d=_0x36e2d2(0xe8);if(!a357_0x481ed0['existsSync'](_0x3a3ee7))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2deb9d,'stableVersion':null};try{const _0x4d83e9=JSON[_0x36e2d2(0xed)](a357_0x481ed0[_0x36e2d2(0xd6)](_0x3a3ee7,_0x36e2d2(0xf3))),_0x2ba58e=_0x4d83e9[_0x36e2d2(0xe0)]||{},_0x7b943b=_0x4d83e9[_0x36e2d2(0xdc)]||{},_0x28632e=_0x2ba58e[_0x2deb9d]||_0x7b943b[_0x2deb9d];if(!_0x28632e)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2deb9d,'stableVersion':null};let _0x23ee30=getInstalledVersion(_0x5ba677,_0x2deb9d);!_0x23ee30&&(_0x23ee30=_0x28632e);if(isNonNumericVersion(_0x28632e))return{'installed':!![],'version':_0x23ee30,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2deb9d,'stableVersion':null};const _0x5ad85c=a357_0x3280b0[_0x36e2d2(0xd3)](_0x23ee30),_0x48db2f=_0x5ad85c?a357_0x3280b0['lt'](_0x5ad85c,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x23ee30,'needsUpgrade':_0x48db2f,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2deb9d,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2deb9d,'stableVersion':null};}}function a357_0x2591(_0x10986f,_0x5f2834){_0x10986f=_0x10986f-0xce;const _0x3f6fcf=a357_0x3f6f();let _0x259126=_0x3f6fcf[_0x10986f];return _0x259126;}export function printSdkUpgradeWarning(_0x5d1c09){const _0x41818b=a357_0x5382bd;if(!_0x5d1c09[_0x41818b(0xd5)])return;const _0x4bfcaf=_0x41818b(0xd0),_0x1c4254=_0x41818b(0xdd),_0x135947='\x1b[1m',_0x22b583=_0x5d1c09[_0x41818b(0xe4)]||_0x41818b(0xe8),_0x4de59b=_0x5d1c09[_0x41818b(0xef)]||_0x5d1c09[_0x41818b(0xe2)],_0x463049='npm\x20install\x20'+_0x22b583+'@'+(_0x4de59b||_0x41818b(0xe7));console[_0x41818b(0xea)](),console['log'](''+_0x4bfcaf+_0x135947+'↪\x20SDK\x20update\x20available'+_0x1c4254),console[_0x41818b(0xea)](_0x4bfcaf+_0x41818b(0xec)+_0x22b583+'@'+_0x5d1c09[_0x41818b(0xd7)]+_0x1c4254),console[_0x41818b(0xea)](_0x4bfcaf+_0x41818b(0xf1)+_0x4de59b+_0x1c4254),console['log'](_0x4bfcaf+_0x41818b(0xf4)+_0x463049+_0x1c4254),console[_0x41818b(0xea)]();}function a357_0x3f6f(){const _0x4b56c3=['48920lmwozv','1660416jmGRFH','latest','@lovrabet/sdk','1.2.0','log','382362ELLfQM','\x20\x20\x20Current\x20version:\x20','parse','existsSync','stableVersion','8190900bzjbpy','\x20\x20\x20Stable\x20version:\x20','1962548HoWJWU','utf8','\x20\x20\x20Upgrade\x20command:\x20','399SmtIQG','479933leUNud','\x1b[33m','node_modules','some','coerce','node','needsUpgrade','readFileSync','version','all','1662075KBqXnL','join','test','devDependencies','\x1b[0m','package.json','sdk','dependencies','3dlrwwJ','minVersion','utf-8','packageName'];a357_0x3f6f=function(){return _0x4b56c3;};return a357_0x3f6f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x329ee9,_0x489c9){const _0x52a167=a358_0x5ad3,_0x4ad307=_0x329ee9();while(!![]){try{const _0x4b8e8e=parseInt(_0x52a167(0x120))/0x1+parseInt(_0x52a167(0x124))/0x2+parseInt(_0x52a167(0x13a))/0x3+parseInt(_0x52a167(0x125))/0x4*(parseInt(_0x52a167(0x12a))/0x5)+-parseInt(_0x52a167(0x13b))/0x6+parseInt(_0x52a167(0x12f))/0x7*(parseInt(_0x52a167(0x11d))/0x8)+-parseInt(_0x52a167(0x122))/0x9;if(_0x4b8e8e===_0x489c9)break;else _0x4ad307['push'](_0x4ad307['shift']());}catch(_0x3596bf){_0x4ad307['push'](_0x4ad307['shift']());}}}(a358_0x133f,0x7f81f));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a358_0x1bf14b 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(_0x2f51c7){const _0x32dfa1=a358_0x5ad3,_0x2d414f=_0x2f51c7[_0x32dfa1(0x12c)]||_0x32dfa1(0x136);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x2d414f;}function a358_0x5ad3(_0x282c71,_0x6a781c){_0x282c71=_0x282c71-0x11d;const _0x133f3c=a358_0x133f();let _0x5ad32f=_0x133f3c[_0x282c71];return _0x5ad32f;}function getCurrentCliVersion(){const _0x34bbfa=a358_0x5ad3;try{const _0x4b46bd=fileURLToPath(import.meta.url),_0x22b7a0=resolve(dirname(_0x4b46bd),_0x34bbfa(0x139)),_0x1bcc0b=resolve(_0x22b7a0,_0x34bbfa(0x140)),_0x4deba2=JSON['parse'](readFileSync(_0x1bcc0b,_0x34bbfa(0x130)));return _0x4deba2[_0x34bbfa(0x133)]||_0x34bbfa(0x132);}catch{return _0x34bbfa(0x132);}}export async function checkCliVersion(){const _0x17e9f2=a358_0x5ad3,_0x286841=getCurrentCliVersion(),_0x921233=await getCliVersionPolicy(),_0x4f1a74=_0x921233?.[_0x17e9f2(0x12c)]||null,_0x217f24=_0x921233?.['minimumVersion']||null;let _0x22bcc3=![],_0x18e125=![];const _0x3e6162=a358_0x1bf14b[_0x17e9f2(0x126)](_0x286841);if(_0x3e6162&&_0x4f1a74)try{const _0x47a78a=a358_0x1bf14b['coerce'](_0x4f1a74);if(_0x47a78a)_0x22bcc3=a358_0x1bf14b['lt'](_0x3e6162,_0x47a78a);}catch{}if(_0x3e6162&&_0x217f24)try{const _0x46fe9a=a358_0x1bf14b[_0x17e9f2(0x126)](_0x217f24);if(_0x46fe9a)_0x18e125=a358_0x1bf14b['lt'](_0x3e6162,_0x46fe9a);}catch{}return _0x18e125&&(_0x22bcc3=!![]),{'currentVersion':_0x286841,'stableVersion':_0x4f1a74,'minimumVersion':_0x217f24,'needsUpgrade':_0x22bcc3,'belowMinimum':_0x18e125,'isPreRelease':![],'upgradeMessage':_0x921233?.[_0x17e9f2(0x135)],'minimumVersionMessage':_0x921233?.[_0x17e9f2(0x134)]};}function a358_0x133f(){const _0x36ae21=['3145296VCPRPn','\x20\x20\x20Stable\x20version:\x20','currentVersion','\x20\x20\x20Upgrade\x20command:\x20','join','package.json','947888DmagCe','belowMinimum','\x1b[1m','300073YkPFFG','log','15895341dKiCBU','\x20\x20\x20Current\x20CLI\x20version:\x20','1686134tnlcwh','876UkEGJj','coerce','validation','\x20\x20\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','10835GRibVi','\x1b[31m','stableVersion','Upgrade\x20command:\x20','minimumVersion','28vqDeDY','utf-8','\x1b[33m','1.0.0','version','minimumVersionMessage','upgradeMessage','latest','needsUpgrade','\x20\x20\x20Minimum\x20supported:\x20','../..','2162937ViveLr'];a358_0x133f=function(){return _0x36ae21;};return a358_0x133f();}export function printCliUpgradeWarning(_0x57f603){const _0x3f2782=a358_0x5ad3;if(!_0x57f603[_0x3f2782(0x137)]&&!_0x57f603[_0x3f2782(0x11e)])return;const _0x22224c=_0x3f2782(0x12b),_0x2b91f1=_0x3f2782(0x131),_0x20225c='\x1b[0m',_0x1067dd=_0x3f2782(0x11f),_0xb80e3e=getCliUpgradeCommand(_0x57f603);console[_0x3f2782(0x121)](),_0x57f603[_0x3f2782(0x11e)]?(console[_0x3f2782(0x121)](''+_0x22224c+_0x1067dd+_0x3f2782(0x129)+_0x20225c),console[_0x3f2782(0x121)](_0x22224c+_0x3f2782(0x123)+_0x57f603[_0x3f2782(0x13d)]+_0x20225c),_0x57f603[_0x3f2782(0x12e)]&&console[_0x3f2782(0x121)](_0x22224c+_0x3f2782(0x138)+_0x57f603[_0x3f2782(0x12e)]+_0x20225c),_0x57f603[_0x3f2782(0x12c)]&&_0x57f603['stableVersion']!==_0x57f603[_0x3f2782(0x12e)]&&console['log'](_0x22224c+'\x20\x20\x20Recommended\x20stable:\x20'+_0x57f603[_0x3f2782(0x12c)]+_0x20225c),_0x57f603[_0x3f2782(0x134)]&&console[_0x3f2782(0x121)](_0x22224c+_0x3f2782(0x128)+_0x57f603[_0x3f2782(0x134)]+_0x20225c),console[_0x3f2782(0x121)](_0x22224c+_0x3f2782(0x13e)+_0xb80e3e+_0x20225c)):(console[_0x3f2782(0x121)](''+_0x2b91f1+_0x1067dd+'↪\x20New\x20version\x20available'+_0x20225c),console[_0x3f2782(0x121)](_0x2b91f1+_0x3f2782(0x123)+_0x57f603[_0x3f2782(0x13d)]+_0x20225c),console[_0x3f2782(0x121)](_0x2b91f1+_0x3f2782(0x13c)+_0x57f603[_0x3f2782(0x12c)]+_0x20225c),_0x57f603[_0x3f2782(0x135)]&&console[_0x3f2782(0x121)](_0x2b91f1+'\x20\x20\x20'+_0x57f603[_0x3f2782(0x135)]+_0x20225c),console[_0x3f2782(0x121)](_0x2b91f1+_0x3f2782(0x13e)+_0xb80e3e+_0x20225c)),console[_0x3f2782(0x121)]();}export function assertCliVersionSupported(_0x872530){const _0x53ec6b=a358_0x5ad3;if(!_0x872530['belowMinimum'])return;const _0xf2fe75=[_0x872530[_0x53ec6b(0x134)],'Current\x20version:\x20'+_0x872530[_0x53ec6b(0x13d)],_0x872530['minimumVersion']?'Minimum\x20supported:\x20'+_0x872530[_0x53ec6b(0x12e)]:null,_0x53ec6b(0x12d)+getCliUpgradeCommand(_0x872530)]['filter'](Boolean)[_0x53ec6b(0x13f)]('\x0a');throw CliErrors[_0x53ec6b(0x127)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.',_0xf2fe75);}
|