@lovrabet/rabetbase-cli 2.5.7 → 2.5.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
-
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
|
+
const a342_0x46c69d=a342_0xbce9;(function(_0x3563a8,_0xf2ac1a){const _0x26be57=a342_0xbce9,_0x2b697a=_0x3563a8();while(!![]){try{const _0x23e354=-parseInt(_0x26be57(0x161))/0x1*(parseInt(_0x26be57(0x1bf))/0x2)+parseInt(_0x26be57(0x151))/0x3+parseInt(_0x26be57(0x18e))/0x4*(parseInt(_0x26be57(0x1c3))/0x5)+parseInt(_0x26be57(0x188))/0x6*(parseInt(_0x26be57(0x1b3))/0x7)+parseInt(_0x26be57(0x19f))/0x8*(parseInt(_0x26be57(0x160))/0x9)+parseInt(_0x26be57(0x163))/0xa+-parseInt(_0x26be57(0x1b8))/0xb*(parseInt(_0x26be57(0x177))/0xc);if(_0x23e354===_0xf2ac1a)break;else _0x2b697a['push'](_0x2b697a['shift']());}catch(_0x109d3d){_0x2b697a['push'](_0x2b697a['shift']());}}}(a342_0x50d4,0x19bf6));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const isObject=_0x1b2e74=>_0x1b2e74!==null&&typeof _0x1b2e74===a342_0x46c69d(0x1a8)&&!Array[a342_0x46c69d(0x19b)](_0x1b2e74);const types=new Set([a342_0x46c69d(0x150),a342_0x46c69d(0x146),a342_0x46c69d(0x194),a342_0x46c69d(0x1ac),a342_0x46c69d(0x18b),a342_0x46c69d(0x17b),'DATE_RANGE',a342_0x46c69d(0x17a),a342_0x46c69d(0x143),a342_0x46c69d(0x152)]),dbTypes=new Set([a342_0x46c69d(0x1b7),'CHAR',a342_0x46c69d(0x150),a342_0x46c69d(0x1a2),a342_0x46c69d(0x1a3),'SMALLINT',a342_0x46c69d(0x182),'INTEGER',a342_0x46c69d(0x178),a342_0x46c69d(0x16d),a342_0x46c69d(0x17c),'DECIMAL','NUMERIC',a342_0x46c69d(0x166),a342_0x46c69d(0x194),a342_0x46c69d(0x190),a342_0x46c69d(0x1ac),a342_0x46c69d(0x1c4)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0xda6ee2,_0x2fbf34){const _0x29b134=a342_0x46c69d;if(!_0xda6ee2)throw CliErrors[_0x29b134(0x1c8)](_0x2fbf34);}function keys(_0x2633f6,_0xc5210d,_0x4d5b7c){const _0x4ba20b=a342_0x46c69d;for(const _0x4a2814 of Object[_0x4ba20b(0x159)](_0x2633f6))requireValue(_0xc5210d[_0x4ba20b(0x183)](_0x4a2814),_0x4d5b7c+'.'+_0x4a2814+_0x4ba20b(0x186));}function text(_0x14af4b,_0x2b0c88){const _0x2b66f9=a342_0x46c69d;requireValue(typeof _0x14af4b===_0x2b66f9(0x197)&&_0x14af4b[_0x2b66f9(0x172)]()[_0x2b66f9(0x17e)]>0x0,_0x2b0c88+_0x2b66f9(0x148));}function a342_0xbce9(_0x41e286,_0x5564f5){_0x41e286=_0x41e286-0x140;const _0x50d471=a342_0x50d4();let _0xbce9c6=_0x50d471[_0x41e286];return _0xbce9c6;}export function validateManifest(_0x257e56){const _0x436b16=a342_0x46c69d;requireValue(isObject(_0x257e56),_0x436b16(0x191)),keys(_0x257e56,[_0x436b16(0x1af),_0x436b16(0x14d),_0x436b16(0x19c),_0x436b16(0x1b0),_0x436b16(0x16a),_0x436b16(0x198)],'manifest'),requireValue(_0x257e56[_0x436b16(0x1af)]==='dataset-design'&&_0x257e56[_0x436b16(0x14d)]===0x1&&_0x257e56[_0x436b16(0x19c)]==='v2',_0x436b16(0x176)),requireValue(Array[_0x436b16(0x19b)](_0x257e56[_0x436b16(0x1b0)])&&_0x257e56[_0x436b16(0x1b0)][_0x436b16(0x17e)]>=0x1&&_0x257e56[_0x436b16(0x1b0)][_0x436b16(0x17e)]<=0x14,'datasets\x20must\x20contain\x201..20\x20items.');const _0x3e616d=new Map();for(const [_0x96ee,_0x84af23]of _0x257e56['datasets'][_0x436b16(0x17d)]()){const _0x58969a=_0x436b16(0x18f)+_0x96ee+']';requireValue(isObject(_0x84af23),_0x58969a+_0x436b16(0x19a)),keys(_0x84af23,[_0x436b16(0x19d),_0x436b16(0x181),'fields'],_0x58969a),requireValue(typeof _0x84af23[_0x436b16(0x19d)]===_0x436b16(0x197)&&/^[a-z][a-z0-9_]{0,63}$/['test'](_0x84af23[_0x436b16(0x19d)])&&!_0x3e616d[_0x436b16(0x1b5)](_0x84af23[_0x436b16(0x19d)]),_0x58969a+'.localKey\x20is\x20invalid\x20or\x20duplicated.'),requireValue(isObject(_0x84af23[_0x436b16(0x181)]),_0x58969a+'.dataset\x20is\x20required.'),keys(_0x84af23[_0x436b16(0x181)],[_0x436b16(0x155),_0x436b16(0x193),_0x436b16(0x1c1),_0x436b16(0x1c5),_0x436b16(0x196)],_0x58969a+_0x436b16(0x165)),text(_0x84af23[_0x436b16(0x181)]['datasetName'],_0x58969a+'.dataset.datasetName');for(const [_0x1e823a,_0x4a533e]of Object[_0x436b16(0x17d)](_0x84af23[_0x436b16(0x181)]))requireValue(_0x4a533e==null||typeof _0x4a533e===_0x436b16(0x197),_0x58969a+_0x436b16(0x15b)+_0x1e823a+'\x20must\x20be\x20a\x20string.');requireValue(Array[_0x436b16(0x19b)](_0x84af23[_0x436b16(0x180)])&&_0x84af23[_0x436b16(0x180)][_0x436b16(0x17e)]>0x0&&(_0x257e56[_0x436b16(0x1b0)][_0x436b16(0x17e)]===0x1||_0x84af23[_0x436b16(0x180)][_0x436b16(0x17e)]<=0xc8),_0x58969a+_0x436b16(0x1a4));const _0x59850d=new Set();_0x3e616d['set'](_0x84af23[_0x436b16(0x19d)],_0x59850d);for(const [_0x40abff,_0x2f5dcc]of _0x84af23['fields'][_0x436b16(0x17d)]()){const _0x568653=_0x58969a+'.fields['+_0x40abff+']';requireValue(isObject(_0x2f5dcc),_0x568653+_0x436b16(0x19a)),keys(_0x2f5dcc,[_0x436b16(0x1ba),'displayName',_0x436b16(0x144),'dbType',_0x436b16(0x171),'description',_0x436b16(0x15c),'visible','disabled',_0x436b16(0x1a7),_0x436b16(0x140),_0x436b16(0x14b),_0x436b16(0x184),_0x436b16(0x15f),'chartRole',_0x436b16(0x15d),_0x436b16(0x149),_0x436b16(0x141),'displayFormat'],_0x568653),requireValue(typeof _0x2f5dcc[_0x436b16(0x1ba)]===_0x436b16(0x197)&&identifier[_0x436b16(0x1a6)](_0x2f5dcc[_0x436b16(0x1ba)])&&!_0x59850d[_0x436b16(0x1b5)](_0x2f5dcc['name']),_0x568653+_0x436b16(0x18c)),_0x59850d[_0x436b16(0x142)](_0x2f5dcc['name']),text(_0x2f5dcc[_0x436b16(0x168)],_0x568653+'.displayName'),requireValue(types['has'](_0x2f5dcc['doType']),_0x568653+_0x436b16(0x1c7)),requireValue(dbTypes[_0x436b16(0x1b5)](_0x2f5dcc[_0x436b16(0x18a)]),_0x568653+_0x436b16(0x1c2));for(const _0x13dc5a of[_0x436b16(0x18a),'description',_0x436b16(0x15f),_0x436b16(0x1a9),_0x436b16(0x15d),'displayFormat']){requireValue(_0x2f5dcc[_0x13dc5a]==null||typeof _0x2f5dcc[_0x13dc5a]==='string',_0x568653+'.'+_0x13dc5a+_0x436b16(0x175));}for(const _0x3d21a2 of['required',_0x436b16(0x158),_0x436b16(0x1b6),_0x436b16(0x1a7),_0x436b16(0x140),'autoIncrement',_0x436b16(0x141)]){requireValue(_0x2f5dcc[_0x3d21a2]==null||typeof _0x2f5dcc[_0x3d21a2]==='boolean',_0x568653+'.'+_0x3d21a2+'\x20must\x20be\x20a\x20boolean.');}requireValue(_0x2f5dcc[_0x436b16(0x171)]==null||Number[_0x436b16(0x16e)](_0x2f5dcc[_0x436b16(0x171)])&&_0x2f5dcc['dbTypeLen']>0x0&&_0x2f5dcc[_0x436b16(0x171)]<=0xffff,_0x568653+_0x436b16(0x16b)),requireValue(_0x2f5dcc[_0x436b16(0x149)]==null||Array[_0x436b16(0x19b)](_0x2f5dcc[_0x436b16(0x149)])&&_0x2f5dcc['supportedAggregation'][_0x436b16(0x15a)](_0x45cb07=>typeof _0x45cb07==='string'),_0x568653+'.supportedAggregation\x20must\x20contain\x20strings.');if(_0x2f5dcc[_0x436b16(0x184)]!=null){requireValue(Array['isArray'](_0x2f5dcc[_0x436b16(0x184)]),_0x568653+_0x436b16(0x1bc));const _0x2cabe5=new Set(),_0xd8196e=new Set();for(const _0x2f1cc4 of _0x2f5dcc[_0x436b16(0x184)]){requireValue(isObject(_0x2f1cc4),_0x568653+_0x436b16(0x192)),keys(_0x2f1cc4,['label',_0x436b16(0x156)],_0x568653+'.options'),text(_0x2f1cc4['label'],_0x568653+_0x436b16(0x195)),requireValue(typeof _0x2f1cc4[_0x436b16(0x156)]==='string'&&identifier[_0x436b16(0x1a6)](_0x2f1cc4[_0x436b16(0x156)])&&!_0xd8196e[_0x436b16(0x1b5)](_0x2f1cc4[_0x436b16(0x156)])&&!_0x2cabe5[_0x436b16(0x1b5)](_0x2f1cc4[_0x436b16(0x1ae)]),_0x568653+'.options\x20is\x20invalid\x20or\x20duplicated.'),_0x2cabe5[_0x436b16(0x142)](_0x2f1cc4[_0x436b16(0x1ae)]),_0xd8196e[_0x436b16(0x142)](_0x2f1cc4['value']);}}if(['SELECT',_0x436b16(0x17b)][_0x436b16(0x183)](_0x2f5dcc[_0x436b16(0x144)])){const _0x4a97c3=Array['isArray'](_0x257e56[_0x436b16(0x16a)])&&_0x257e56[_0x436b16(0x16a)][_0x436b16(0x1ad)](_0x46ed1f=>_0x46ed1f?.['fromDatasetKey']===_0x84af23[_0x436b16(0x19d)]&&_0x46ed1f?.[_0x436b16(0x153)]===_0x2f5dcc[_0x436b16(0x1ba)]);requireValue(_0x4a97c3||Array[_0x436b16(0x19b)](_0x2f5dcc[_0x436b16(0x184)])&&_0x2f5dcc[_0x436b16(0x184)][_0x436b16(0x17e)]>0x0,_0x568653+_0x436b16(0x1b4));}}_0x59850d[_0x436b16(0x142)]('id');}for(const _0x30d651 of[_0x436b16(0x16a),'unresolvedRelations'])requireValue(_0x257e56[_0x30d651]==null||Array[_0x436b16(0x19b)](_0x257e56[_0x30d651])&&_0x257e56[_0x30d651]['length']<=0xc8,_0x30d651+_0x436b16(0x1a1));const _0x317d9a=new Set();for(const [_0x37a192,_0x497f4c]of(_0x257e56['relations']??[])[_0x436b16(0x17d)]()){const _0x5fc04a='relations['+_0x37a192+']';requireValue(isObject(_0x497f4c),_0x5fc04a+_0x436b16(0x19a)),keys(_0x497f4c,[_0x436b16(0x14f),_0x436b16(0x153),_0x436b16(0x1bd),_0x436b16(0x147),_0x436b16(0x179),'toFieldLabel','relationType',_0x436b16(0x1aa),_0x436b16(0x15e),_0x436b16(0x19e)],_0x5fc04a),requireValue(_0x3e616d[_0x436b16(0x1a0)](_0x497f4c['fromDatasetKey'])?.[_0x436b16(0x1b5)](_0x497f4c['fromField']),_0x5fc04a+_0x436b16(0x1ab)),requireValue(Boolean(_0x497f4c[_0x436b16(0x1bd)])!==Boolean(_0x497f4c[_0x436b16(0x147)]),_0x5fc04a+_0x436b16(0x199));if(_0x497f4c[_0x436b16(0x1bd)])requireValue(_0x3e616d[_0x436b16(0x1a0)](_0x497f4c[_0x436b16(0x1bd)])?.[_0x436b16(0x1b5)](_0x497f4c['toField']),_0x5fc04a+_0x436b16(0x1b2));else text(_0x497f4c['toDatasetCode'],_0x5fc04a+'.toDatasetCode'),text(_0x497f4c[_0x436b16(0x179)],_0x5fc04a+_0x436b16(0x1a5));requireValue(_0x497f4c[_0x436b16(0x185)]==null||_0x497f4c[_0x436b16(0x185)]===_0x436b16(0x154),_0x5fc04a+_0x436b16(0x1c6)),requireValue(_0x497f4c['cardinality']==null||[_0x436b16(0x187),_0x436b16(0x173)][_0x436b16(0x183)](_0x497f4c[_0x436b16(0x1aa)]),_0x5fc04a+_0x436b16(0x14a)),text(_0x497f4c[_0x436b16(0x15e)],_0x5fc04a+_0x436b16(0x1c0)),requireValue(_0x497f4c[_0x436b16(0x19e)]==null||typeof _0x497f4c['confidence']===_0x436b16(0x164)&&Number[_0x436b16(0x189)](_0x497f4c[_0x436b16(0x19e)])&&_0x497f4c[_0x436b16(0x19e)]>=0x0&&_0x497f4c[_0x436b16(0x19e)]<=0x1,_0x5fc04a+_0x436b16(0x169));const _0xc08d48=_0x497f4c['fromDatasetKey']+':'+_0x497f4c[_0x436b16(0x153)];requireValue(!_0x317d9a['has'](_0xc08d48),_0x5fc04a+_0x436b16(0x14c)),_0x317d9a[_0x436b16(0x142)](_0xc08d48);}for(const _0x38f675 of _0x257e56[_0x436b16(0x198)]??[]){requireValue(isObject(_0x38f675),_0x436b16(0x18d)),text(_0x38f675[_0x436b16(0x15e)],'unresolvedRelations.reason');}return _0x257e56;}export async function readManifest(_0x4dce01){const _0x4f336f=a342_0x46c69d,_0x40d2fc=await lstat(_0x4dce01);requireValue(_0x40d2fc[_0x4f336f(0x17f)]()&&!_0x40d2fc['isSymbolicLink']()&&_0x40d2fc[_0x4f336f(0x1b1)]<=0x1e8480,_0x4f336f(0x1be));let _0x22aca1;try{_0x22aca1=JSON[_0x4f336f(0x16f)](await readFile(_0x4dce01,_0x4f336f(0x162)));}catch{throw CliErrors[_0x4f336f(0x1c8)](_0x4f336f(0x174));}return validateManifest(isObject(_0x22aca1)&&isObject(_0x22aca1[_0x4f336f(0x167)])?_0x22aca1['normalizedManifest']:_0x22aca1);}export function inputHash(_0x175fd6){const _0x17d0de=a342_0x46c69d,_0x4a449d=_0x3ba17d=>Array[_0x17d0de(0x19b)](_0x3ba17d)?_0x3ba17d['map'](_0x4a449d):isObject(_0x3ba17d)?Object[_0x17d0de(0x170)](Object[_0x17d0de(0x159)](_0x3ba17d)[_0x17d0de(0x145)]()[_0x17d0de(0x1bb)](_0x5ed817=>[_0x5ed817,_0x4a449d(_0x3ba17d[_0x5ed817])])):_0x3ba17d;return createHash(_0x17d0de(0x14e))[_0x17d0de(0x1b9)](JSON[_0x17d0de(0x157)](_0x4a449d(_0x175fd6)))[_0x17d0de(0x16c)]('hex');}function a342_0x50d4(){const _0x4abde2=['has','disabled','VARCHAR','1023275MfxQUI','update','name','map','.options\x20must\x20be\x20an\x20array.','toDatasetKey','Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.','216nbZlZG','.reason','tableComment','.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.','150LXaZkX','JSON','businessGroup','.relationType\x20must\x20be\x20lookup.','.doType\x20is\x20unsupported.','validation','pkField','isTimeDimension','add','ADDRESS','doType','sort','NUMBER','toDatasetCode','\x20must\x20be\x20a\x20non-empty\x20string.','supportedAggregation','.cardinality\x20is\x20unsupported.','autoIncrement','\x20duplicates\x20a\x20source\x20field.','schemaVersion','sha256','fromDatasetKey','TEXT','79542vcYnLw','UPLOAD','fromField','lookup','datasetName','value','stringify','visible','keys','every','.dataset.','required','defaultAggregation','reason','semanticName','1415889AwHEsl','124JsSjBu','utf8','893790dqSnSy','number','.dataset','DATE','normalizedManifest','displayName','.confidence\x20is\x20invalid.','relations','.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.','digest','FLOAT','isSafeInteger','parse','fromEntries','dbTypeLen','trim','ONE_TO_ONE','Design\x20file\x20contains\x20invalid\x20JSON.','\x20must\x20be\x20a\x20string.','Unsupported\x20dataset\x20manifest\x20version.','48bsQcCM','BIGINT','toField','USER','MULTI_SELECT','DOUBLE','entries','length','isFile','fields','dataset','INT','includes','options','relationType','\x20is\x20not\x20supported.','MANY_TO_ONE','12RobajO','isFinite','dbType','SELECT','.name\x20is\x20invalid\x20or\x20duplicated.','Invalid\x20unresolved\x20relation.','4772LwxgOh','datasets[','TIMESTAMP','Manifest\x20must\x20be\x20an\x20object.','.options\x20contains\x20an\x20invalid\x20item.','tableName','DATETIME','.options.label','labelField','string','unresolvedRelations','\x20requires\x20exactly\x20one\x20target.','\x20must\x20be\x20an\x20object.','isArray','doVersion','localKey','confidence','8ykSvXl','get','\x20must\x20contain\x20at\x20most\x20200\x20items.','LONGTEXT','TINYINT','.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.','.toField','test','readonly','object','chartRole','cardinality','\x20source\x20does\x20not\x20exist.','BOOLEAN','some','label','kind','datasets','size','\x20target\x20field\x20does\x20not\x20exist.','636825tavjlz','\x20requires\x20options\x20or\x20an\x20explicit\x20relation.'];a342_0x50d4=function(){return _0x4abde2;};return a342_0x50d4();}
|
|
@@ -1 +1 @@
|
|
|
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};}
|
|
1
|
+
const a343_0x4c7105=a343_0x14e3;(function(_0x508e18,_0xabfb9b){const _0x3c4239=a343_0x14e3,_0x4fd217=_0x508e18();while(!![]){try{const _0x40029b=parseInt(_0x3c4239(0x1b8))/0x1+parseInt(_0x3c4239(0x1d2))/0x2+parseInt(_0x3c4239(0x1b7))/0x3*(-parseInt(_0x3c4239(0x1df))/0x4)+parseInt(_0x3c4239(0x1d0))/0x5+-parseInt(_0x3c4239(0x19e))/0x6*(-parseInt(_0x3c4239(0x1c1))/0x7)+-parseInt(_0x3c4239(0x1ba))/0x8+-parseInt(_0x3c4239(0x1a7))/0x9;if(_0x40029b===_0xabfb9b)break;else _0x4fd217['push'](_0x4fd217['shift']());}catch(_0x2cda17){_0x4fd217['push'](_0x4fd217['shift']());}}}(a343_0x2244,0xe8854));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';function a343_0x14e3(_0x2ee494,_0x28c25c){_0x2ee494=_0x2ee494-0x19a;const _0x2244af=a343_0x2244();let _0x14e3d4=_0x2244af[_0x2ee494];return _0x14e3d4;}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';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a343_0x4c7105(0x1aa),SKILL_NAME=a343_0x4c7105(0x1b4),debug=debuglog(a343_0x4c7105(0x1d7));function frontmatterValue(_0x1e64aa,_0x150c4e){const _0x288a56=a343_0x4c7105;return _0x1e64aa[_0x288a56(0x1da)](new RegExp('^'+_0x150c4e+_0x288a56(0x1a2),'m'))?.[0x1]?.['trim']()??'';}function a343_0x2244(){const _0x2fbc8f=['root','28RTlrIr','every','log','split','unknown','6xNrnsv','message','reason','version',':\x5cs*(.+)$','isFile','missing','INSTALL_FAILED','isSymbolicLink','3318012yroRiy','pipe','CLI\x20Built-in\x20Skill\x20','rabetbase\x20cli-skill\x20install','skillVersion','installedPath','startsWith','update','home','packageRoot','packageVersion','SKILL.md','parse','rabetbase','digest','length','522645NdGCaC','908077OfoQeD','flatMap','14409032vtTEFy','Symbolic\x20link\x20is\x20not\x20allowed:\x20','unverifiable','error','name','schemaVersion','Unsafe\x20manifest\x20path:\x20','11165525GoIalw','present','stdio','\x20verified;\x20','files','rabetbase.manifest.json','version_mismatch','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','absent','current','state','count','skills','Unsupported\x20Skill\x20entry:\x20','package.json','4771130wYUYgp','manifest','1768656eokvOO','status','utf8','output','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','rabetbase-skills','partialFailure','path','match','hex','skills@latest\x20exited\x20','SOURCE_INVALID'];a343_0x2244=function(){return _0x2fbc8f;};return a343_0x2244();}function listFiles(_0x3bcc6b,_0x2e9c1f=_0x3bcc6b){const _0x65752f=a343_0x4c7105;return readdirSync(_0x2e9c1f,{'withFileTypes':!![]})[_0x65752f(0x1b9)](_0x5a881b=>{const _0x4eb403=_0x65752f,_0x3d6af2=join(_0x2e9c1f,_0x5a881b[_0x4eb403(0x1be)]),_0x2c9eca=lstatSync(_0x3d6af2);if(_0x2c9eca[_0x4eb403(0x1a6)]())throw new Error(_0x4eb403(0x1bb)+_0x3d6af2);if(_0x2c9eca['isDirectory']())return listFiles(_0x3bcc6b,_0x3d6af2);if(!_0x2c9eca[_0x4eb403(0x1a3)]())throw new Error(_0x4eb403(0x1ce)+_0x3d6af2);return[relative(_0x3bcc6b,_0x3d6af2)[_0x4eb403(0x19c)](sep)['join']('/')];})['sort']((_0x302b24,_0x23f011)=>_0x302b24<_0x23f011?-0x1:_0x302b24>_0x23f011?0x1:0x0);}function digestFiles(_0x2169f5,_0x5ddd89){const _0x456a9f=a343_0x4c7105,_0x102299=createHash('sha256');for(const _0x45ff72 of _0x5ddd89){if(_0x45ff72[_0x456a9f(0x1ad)]('/')||_0x45ff72[_0x456a9f(0x19c)]('/')['includes']('..')||_0x45ff72['includes']('\x5c'))throw new Error(_0x456a9f(0x1c0)+_0x45ff72);_0x102299[_0x456a9f(0x1ae)](_0x45ff72),_0x102299[_0x456a9f(0x1ae)]('\x00'),_0x102299[_0x456a9f(0x1ae)](readFileSync(join(_0x2169f5,..._0x45ff72[_0x456a9f(0x19c)]('/')))),_0x102299[_0x456a9f(0x1ae)]('\x00');}return _0x102299[_0x456a9f(0x1b5)](_0x456a9f(0x1db));}function sameFiles(_0x51cea9,_0x22d8ae){const _0x446f4a=a343_0x4c7105;return _0x51cea9[_0x446f4a(0x1b6)]===_0x22d8ae[_0x446f4a(0x1b6)]&&_0x51cea9[_0x446f4a(0x19a)]((_0x492f91,_0x1d4c2c)=>_0x492f91===_0x22d8ae[_0x1d4c2c]);}function readSource(_0x340878){const _0x47e7ae=a343_0x4c7105,_0x299084=JSON[_0x47e7ae(0x1b3)](readFileSync(join(_0x340878,_0x47e7ae(0x1cf)),_0x47e7ae(0x1d4))),_0x3ab881=JSON['parse'](readFileSync(join(_0x340878,_0x47e7ae(0x1cd),_0x47e7ae(0x1c6)),_0x47e7ae(0x1d4))),_0x457202=join(_0x340878,_0x47e7ae(0x1cd),SKILL_NAME),_0x1228fa=frontmatterValue(readFileSync(join(_0x457202,_0x47e7ae(0x1b2)),'utf8'),'version'),_0x1e48e1=listFiles(_0x457202);if(_0x3ab881[_0x47e7ae(0x1bf)]!==0x1||_0x3ab881[_0x47e7ae(0x1be)]!==SKILL_NAME||!_0x299084['version']||_0x3ab881['packageVersion']!==_0x299084[_0x47e7ae(0x1a1)]||_0x3ab881[_0x47e7ae(0x1ab)]!==_0x299084[_0x47e7ae(0x1a1)]||_0x1228fa!==_0x299084['version']||!sameFiles(_0x1e48e1,_0x3ab881['files'])||digestFiles(_0x457202,_0x1e48e1)!==_0x3ab881[_0x47e7ae(0x1b5)])throw new Error(_0x47e7ae(0x1c8));return{'packageVersion':_0x299084[_0x47e7ae(0x1a1)],'skillVersion':_0x1228fa,'root':_0x457202,'manifest':_0x3ab881};}function installedSkillPath(_0x47fefb){const _0x23e61f=a343_0x4c7105,_0x2ae71c=resolveInstalledSkill(SKILL_NAME,{'home':_0x47fefb});if(_0x2ae71c[_0x23e61f(0x1cb)]===_0x23e61f(0x1c2))return{'state':_0x23e61f(0x1c2),'path':dirname(_0x2ae71c[_0x23e61f(0x1d9)])};if(_0x2ae71c[_0x23e61f(0x1cb)]===_0x23e61f(0x1c9))return{'state':_0x23e61f(0x1a4)};return{'state':'unverifiable','reason':_0x2ae71c[_0x23e61f(0x1a0)]};}export function inspectInstalledBuiltinSkillVersion(_0x4c34d0,_0x222d1e={}){const _0x582346=a343_0x4c7105,_0x2e6358=installedSkillPath(_0x222d1e[_0x582346(0x1af)]??homedir());if(_0x2e6358[_0x582346(0x1cb)]==='missing')return{'state':'missing','expectedVersion':_0x4c34d0,'repairCommand':REPAIR_COMMAND};if(_0x2e6358[_0x582346(0x1cb)]===_0x582346(0x1bc))return{'state':_0x582346(0x1bc),'expectedVersion':_0x4c34d0,'reason':_0x2e6358['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x302891=frontmatterValue(readFileSync(join(_0x2e6358[_0x582346(0x1d9)],_0x582346(0x1b2)),_0x582346(0x1d4)),_0x582346(0x1a1));return{'state':_0x302891===_0x4c34d0?'current':_0x582346(0x1c7),'expectedVersion':_0x4c34d0,'skillVersion':_0x302891,'installedPath':_0x2e6358[_0x582346(0x1d9)],'repairCommand':REPAIR_COMMAND};}catch(_0x10abd7){return{'state':'unverifiable','expectedVersion':_0x4c34d0,'installedPath':_0x2e6358[_0x582346(0x1d9)],'reason':_0x10abd7 instanceof Error?_0x10abd7['message']:String(_0x10abd7),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x28420d={}){const _0x316f8c=a343_0x4c7105,_0xc5db1=_0x28420d[_0x316f8c(0x1b0)]??DEFAULT_PACKAGE_ROOT;let _0x514efb;try{_0x514efb=readSource(_0xc5db1);}catch(_0x494f7f){return{'state':_0x316f8c(0x1bc),'packageVersion':_0x316f8c(0x19d),'reason':_0x494f7f instanceof Error?_0x494f7f['message']:String(_0x494f7f),'repairCommand':REPAIR_COMMAND};}const _0x4fa893=installedSkillPath(_0x28420d['home']??homedir());if(_0x4fa893[_0x316f8c(0x1cb)]===_0x316f8c(0x1a4))return{'state':_0x316f8c(0x1a4),'packageVersion':_0x514efb[_0x316f8c(0x1b1)],'repairCommand':REPAIR_COMMAND};if(_0x4fa893[_0x316f8c(0x1cb)]===_0x316f8c(0x1bc))return{'state':_0x316f8c(0x1bc),'packageVersion':_0x514efb[_0x316f8c(0x1b1)],'reason':_0x4fa893[_0x316f8c(0x1a0)],'repairCommand':REPAIR_COMMAND};try{const _0x1c3e60=frontmatterValue(readFileSync(join(_0x4fa893['path'],_0x316f8c(0x1b2)),'utf8'),_0x316f8c(0x1a1));if(_0x1c3e60!==_0x514efb['skillVersion'])return{'state':_0x316f8c(0x1c7),'packageVersion':_0x514efb[_0x316f8c(0x1b1)],'skillVersion':_0x1c3e60,'installedPath':_0x4fa893[_0x316f8c(0x1d9)],'repairCommand':REPAIR_COMMAND};const _0x51b3bc=listFiles(_0x4fa893[_0x316f8c(0x1d9)]),_0x504e9f=digestFiles(_0x4fa893[_0x316f8c(0x1d9)],_0x51b3bc);return{'state':sameFiles(_0x51b3bc,_0x514efb[_0x316f8c(0x1d1)][_0x316f8c(0x1c5)])&&_0x504e9f===_0x514efb[_0x316f8c(0x1d1)]['digest']?_0x316f8c(0x1ca):'content_mismatch','packageVersion':_0x514efb['packageVersion'],'skillVersion':_0x1c3e60,'installedPath':_0x4fa893[_0x316f8c(0x1d9)],'digest':_0x504e9f,'repairCommand':REPAIR_COMMAND};}catch(_0x5ca3f8){return{'state':_0x316f8c(0x1bc),'packageVersion':_0x514efb['packageVersion'],'installedPath':_0x4fa893[_0x316f8c(0x1d9)],'reason':_0x5ca3f8 instanceof Error?_0x5ca3f8[_0x316f8c(0x19f)]:String(_0x5ca3f8),'repairCommand':REPAIR_COMMAND};}}function failure(_0x116ed2,_0x1bb22b,_0x5de7d6,_0x24600c){const _0x4f2817=a343_0x4c7105;return{'ok':![],'code':_0x116ed2,'packageVersion':_0x1bb22b[_0x4f2817(0x1b1)],'skillVersion':_0x1bb22b[_0x4f2817(0x1ab)],'installedPath':_0x24600c,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x5de7d6 instanceof Error?_0x5de7d6['message']:String(_0x5de7d6)};}export function installBuiltinSkill(_0x5540bb={}){const _0xeeb60=a343_0x4c7105,_0x4695e6=_0x5540bb[_0xeeb60(0x1b0)]??DEFAULT_PACKAGE_ROOT,_0x5f2e08=_0x5540bb['home']??homedir();let _0x45b05f;try{_0x45b05f=readSource(_0x4695e6);}catch(_0x2a6c9c){return failure(_0xeeb60(0x1dd),{'packageVersion':_0xeeb60(0x19d),'skillVersion':'unknown'},_0x2a6c9c);}const _0x348b41=inspectBuiltinSkill({'packageRoot':_0x4695e6,'home':_0x5f2e08}),_0x212c67=runNpxSkillsAddGlobal(_0x4695e6,_0x45b05f[_0xeeb60(0x1de)],{'stdio':_0x5540bb[_0xeeb60(0x1c3)]??_0xeeb60(0x1a8),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x5f2e08}});if(_0x212c67['skipped'])return{'ok':!![],'packageVersion':_0x45b05f['packageVersion'],'skillVersion':_0x45b05f[_0xeeb60(0x1ab)],'installedPath':_0x348b41[_0xeeb60(0x1ac)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x212c67['ok'])return failure(_0xeeb60(0x1a5),_0x45b05f,_0x212c67[_0xeeb60(0x1bd)]??_0xeeb60(0x1dc)+_0x212c67[_0xeeb60(0x1d3)]);const _0x45a62b=inspectBuiltinSkill({'packageRoot':_0x4695e6,'home':_0x5f2e08});if(_0x45a62b[_0xeeb60(0x1cb)]!==_0xeeb60(0x1ca)){const _0x5d3ac3=_0x45a62b['reason']??'Installed\x20Skill\x20state\x20is\x20'+_0x45a62b[_0xeeb60(0x1cb)];return failure('VERIFY_FAILED',_0x45b05f,_0x212c67['partialFailure']?_0x5d3ac3+'\x0a'+_0x212c67[_0xeeb60(0x1d8)][_0xeeb60(0x1d5)]:_0x5d3ac3,_0x45a62b[_0xeeb60(0x1ac)]);}return _0x212c67[_0xeeb60(0x1d8)]&&(debug('Installer\x20reported\x20partial\x20target\x20failures:\x0a%s',_0x212c67['partialFailure'][_0xeeb60(0x1d5)]),console[_0xeeb60(0x19b)](_0xeeb60(0x1a9)+_0x45b05f[_0xeeb60(0x1ab)]+_0xeeb60(0x1c4)+_0x212c67['partialFailure'][_0xeeb60(0x1cc)]+_0xeeb60(0x1d6))),{'ok':!![],'packageVersion':_0x45b05f[_0xeeb60(0x1b1)],'skillVersion':_0x45b05f[_0xeeb60(0x1ab)],'installedPath':_0x45a62b[_0xeeb60(0x1ac)],'changed':_0x348b41[_0xeeb60(0x1cb)]!==_0xeeb60(0x1ca),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35acc4,_0xc71783){const _0x5ce0bd=a344_0x176a,_0x5a63bf=_0x35acc4();while(!![]){try{const _0x3f4d94=parseInt(_0x5ce0bd(0x11c))/0x1+parseInt(_0x5ce0bd(0x104))/0x2+-parseInt(_0x5ce0bd(0x11e))/0x3*(-parseInt(_0x5ce0bd(0x116))/0x4)+parseInt(_0x5ce0bd(0x10c))/0x5*(parseInt(_0x5ce0bd(0x100))/0x6)+-parseInt(_0x5ce0bd(0x10b))/0x7*(-parseInt(_0x5ce0bd(0x121))/0x8)+-parseInt(_0x5ce0bd(0x122))/0x9*(parseInt(_0x5ce0bd(0x113))/0xa)+-parseInt(_0x5ce0bd(0x118))/0xb;if(_0x3f4d94===_0xc71783)break;else _0x5a63bf['push'](_0x5a63bf['shift']());}catch(_0x5e7c65){_0x5a63bf['push'](_0x5a63bf['shift']());}}}(a344_0x1539,0x912d5));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a344_0x176a(_0x540945,_0x2de811){_0x540945=_0x540945-0xff;const _0x1539d8=a344_0x1539();let _0x176a3c=_0x1539d8[_0x540945];return _0x176a3c;}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x55c171){const _0x5bc80f=a344_0x176a,_0x267ec6=[];for(const [_0x5a1751,_0x528b51]of Object['entries'](_0x55c171)){if(_0x528b51===!![]){const _0x4fcf42=_0x5a1751[_0x5bc80f(0x112)](/([A-Z])/g,_0x5bc80f(0x101))['toLowerCase']();_0x267ec6['push'](_0x4fcf42);}}return _0x267ec6;}export function parseDynamicFlags(){const _0x3a124c=a344_0x176a,_0x3f2847=[];for(let _0x297a58=0x3;_0x297a58<process[_0x3a124c(0x108)][_0x3a124c(0x103)];_0x297a58++){const _0x36c3f6=process['argv'][_0x297a58];if(_0x36c3f6&&_0x36c3f6[_0x3a124c(0x10a)]('--')){const _0x7f47a4=_0x36c3f6[_0x3a124c(0x11f)](0x2);_0x7f47a4&&!_0x7f47a4[_0x3a124c(0x115)]('=')&&_0x3f2847[_0x3a124c(0x111)](_0x7f47a4);}}return _0x3f2847;}export function getAllProvidedFlags(_0x42679c){const _0xdcf6be=camelCaseFlagsToKebab(_0x42679c),_0x5ea755=parseDynamicFlags(),_0x1d6975=new Set([..._0xdcf6be,..._0x5ea755]);return Array['from'](_0x1d6975);}export function normalizeLegacyBffSaveFlags(_0xf4d1ee){const _0x3ca74f=a344_0x176a,_0xe4bcd0=new Set(_0xf4d1ee);return _0xe4bcd0[_0x3ca74f(0x114)](_0x3ca74f(0x120))&&_0xe4bcd0[_0x3ca74f(0x10d)]('enable-bff-save'),Array[_0x3ca74f(0x102)](_0xe4bcd0);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a344_0x1539(){const _0x112fb0=['-$1','from','length','748852ZdjYWo','help','Unsupported\x20command:\x20','exit','argv','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','startsWith','91OjwMkI','5aHrCyG','add','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','\x0aAvailable\x20commands:','log','push','replace','20990FeLIHO','has','includes','8SdRapl','skill','18218442fQToPW','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','--help','(empty)','1144677lELPoR','cwd','477768BjMjHe','slice','dangerously-bff-save','197584MnWDoi','801DHcctr','error','1673934vIlMuX'];a344_0x1539=function(){return _0x112fb0;};return a344_0x1539();}export async function skillsCommand(_0x53f232,_0x284312,_0x3bb8d9){const _0x41b968=a344_0x176a;logger['setLogPath'](process[_0x41b968(0x11d)]());if(_0x3bb8d9?.[_0x41b968(0x105)]||_0x53f232===_0x41b968(0x11a)){showHelp();return;}console[_0x41b968(0xff)]('Error:\x20Unsupported\x20command:\x20'+(_0x53f232||_0x41b968(0x11b))),console[_0x41b968(0x110)](_0x41b968(0x10f)),console[_0x41b968(0x110)]('\x20\x20'+CLI_BIN_NAME+_0x41b968(0x10e)),console['log'](''),console[_0x41b968(0x110)]('Public\x20Open\x20Skill\x20source:\x20'+SKILLS_INSTALL_COMMAND_LINE),logger[_0x41b968(0xff)](_0x41b968(0x117),_0x41b968(0x106)+_0x53f232),process[_0x41b968(0x107)](0x1);}function showHelp(){const _0x405203=a344_0x176a;console[_0x405203(0x110)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+_0x405203(0x119)+SKILLS_INSTALL_COMMAND_LINE+_0x405203(0x109));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a345_0x195334=a345_0x30be;(function(_0x6beddf,_0x25dcdd){const _0x556570=a345_0x30be,_0x59cbab=_0x6beddf();while(!![]){try{const _0x1c8fb5=parseInt(_0x556570(0x117))/0x1*(-parseInt(_0x556570(0x10f))/0x2)+parseInt(_0x556570(0xf3))/0x3*(-parseInt(_0x556570(0x10a))/0x4)+parseInt(_0x556570(0x112))/0x5*(-parseInt(_0x556570(0x124))/0x6)+-parseInt(_0x556570(0x104))/0x7+parseInt(_0x556570(0x119))/0x8*(-parseInt(_0x556570(0xfe))/0x9)+-parseInt(_0x556570(0x11b))/0xa+parseInt(_0x556570(0x106))/0xb;if(_0x1c8fb5===_0x25dcdd)break;else _0x59cbab['push'](_0x59cbab['shift']());}catch(_0x45823f){_0x59cbab['push'](_0x59cbab['shift']());}}}(a345_0x3f6b,0xa2d3a));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_0x195334(0x120);export const NPX_SKILLS_SUBCOMMAND_ADD=a345_0x195334(0x113);export const NPX_SKILLS_FLAG_SKILL=a345_0x195334(0xfc);export const RABETBASE_SKILL_SOURCE=a345_0x195334(0xef);export const RABETBASE_GLOBAL_SKILL_NAME=a345_0x195334(0xfd);export const RABETBASE_SKILL_GIT_SOURCE=a345_0x195334(0x10b);export function resolveGlobalSkillName(_0x18329e){const _0x55ef0e=a345_0x195334;switch(_0x18329e[_0x55ef0e(0x10c)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x72c5d1){const _0x1db442=a345_0x195334,_0x433caa=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x72c5d1&&_0x433caa[_0x1db442(0x11f)](NPX_SKILLS_FLAG_SKILL,_0x72c5d1),_0x433caa;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a345_0x195334(0xfb),...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a345_0x195334(0xfb),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a345_0x195334(0xf8)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x48e8b0,_0x15d732,_0x174783){return{'ok':![],'status':_0x15d732,'code':_0x48e8b0,'error':'['+_0x48e8b0+']\x20'+_0x174783};}function a345_0x3f6b(){const _0x24a0d1=['git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','trim','\x22\x20install\x20state:\x20','SPAWN_FAILED','1350EgsTJW','presence','signal','125WARkVR','add','skill','failed','EPERM','1361VCPqcS','reason','2344llOCfx','inherit','127530PubSte','warn','PERMISSION_DENIED','CHILD_TERMINATED','push','skills@latest','INSTALL_PARTIAL','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','stderr','178152DgdblX','present','ENOENT','npx\x20failed\x20to\x20start','Installer\x20reported\x20','EACCES','log','Skill\x20\x22','CHILD_EXIT_NONZERO','state','lovrabet/rabetbase','SKILL_NOT_INSTALLED','message','pipe','234417IVaQSh','NPM_CONFIG_GLOBAL','exit\x20','\x20failed\x20target(s)','npm_config_global','join','stdio','unverifiable','npx','--skill','rabetbase','39987NVUKlR','npx\x20terminated\x20by\x20signal\x20','match','exitCode','!\x20Could\x20not\x20verify\x20\x22','filter','7954975vrlZQU','stdout','53427319XsuojB','partialFailure','shortMessage','code','4QJppbR'];a345_0x3f6b=function(){return _0x24a0d1;};return a345_0x3f6b();}function execaOptions(_0x43f990,_0x4b1d43){const _0x45b56a=a345_0x195334,_0x5a5681={...process.env};return delete _0x5a5681[_0x45b56a(0xf7)],delete _0x5a5681[_0x45b56a(0xf4)],{'cwd':_0x43f990,'stdio':_0x4b1d43,'env':_0x5a5681,'extendEnv':![],'shell':![],'reject':![],..._0x4b1d43===_0x45b56a(0xf2)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x40f73c,_0x2c5e42,_0x469fd3){const _0x13db64=a345_0x195334,_0x59cb19=[_0x40f73c[_0x13db64(0x105)]?String(_0x40f73c[_0x13db64(0x105)]):'',_0x40f73c[_0x13db64(0x123)]?String(_0x40f73c['stderr']):''][_0x13db64(0x103)](Boolean)[_0x13db64(0xf8)]('\x0a')['trim'](),_0xf1f2b5=_0x40f73c[_0x13db64(0x101)]??null;if(_0x40f73c[_0x13db64(0x109)]){const _0x319dfb=_0x40f73c[_0x13db64(0x109)]===_0x13db64(0xe7)?'NPX_NOT_FOUND':_0x40f73c[_0x13db64(0x109)]===_0x13db64(0x116)||_0x40f73c['code']===_0x13db64(0xea)?_0x13db64(0x11d):_0x13db64(0x10e);return failure(_0x319dfb,_0xf1f2b5,_0x40f73c['shortMessage']??_0x40f73c[_0x13db64(0xf1)]??_0x40f73c['code']);}if(_0x40f73c['signal'])return failure(_0x13db64(0x11e),_0xf1f2b5,_0x13db64(0xff)+_0x40f73c[_0x13db64(0x111)]);if(_0x40f73c[_0x13db64(0x115)]&&_0xf1f2b5===null)return failure(_0x13db64(0x10e),_0xf1f2b5,_0x40f73c['shortMessage']??_0x40f73c[_0x13db64(0xf1)]??_0x13db64(0xe8));if(_0xf1f2b5!==0x0)return failure(_0x13db64(0xed),_0xf1f2b5,_0x59cb19||_0x40f73c[_0x13db64(0x108)]||_0x13db64(0xf5)+(_0xf1f2b5??'unknown'));const _0x778d6a=_0x2c5e42?resolveInstalledSkill(_0x2c5e42,_0x469fd3):undefined,_0x1c5683=_0x59cb19[_0x13db64(0x100)](/Failed to install\s+(\d+)/i);if(_0x1c5683&&Number(_0x1c5683[0x1])>0x0){const _0x90d312=_0x13db64(0xe9)+_0x1c5683[0x1]+_0x13db64(0xf6)+(_0x59cb19?':\x0a'+_0x59cb19:'');if(_0x778d6a?.[_0x13db64(0xee)]===_0x13db64(0x125))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x1c5683[0x1]),'output':_0x59cb19}};return failure(_0x13db64(0x121),0x0,_0x90d312);}if(_0x778d6a){if(_0x778d6a[_0x13db64(0xee)]==='absent')return failure(_0x13db64(0xf0),0x0,_0x13db64(0xec)+_0x2c5e42+_0x13db64(0x122)+_0x778d6a['checked']['join'](',\x20')+')');_0x778d6a[_0x13db64(0xee)]===_0x13db64(0xfa)&&console[_0x13db64(0x11c)](_0x13db64(0x102)+_0x2c5e42+_0x13db64(0x10d)+_0x778d6a[_0x13db64(0x118)]);}return{'ok':!![],'status':0x0};}function a345_0x30be(_0x67e85f,_0x244f6c){_0x67e85f=_0x67e85f-0xe7;const _0x3f6bb6=a345_0x3f6b();let _0x30bea6=_0x3f6bb6[_0x67e85f];return _0x30bea6;}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x530e91,_0x48022b){const _0x2bda85=a345_0x195334;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x49f960=_0x48022b?.[_0x2bda85(0xf9)]??_0x2bda85(0x11a),_0x3aa900=buildNpxSkillsAddArgv(_0x48022b?.[_0x2bda85(0x114)]),_0x28f23e=['npx',..._0x3aa900]['join']('\x20');console[_0x2bda85(0xeb)]('*\x20'+_0x28f23e);const _0x54fa60=execaSync('npx',_0x3aa900,execaOptions(_0x530e91,_0x49f960));return normalizeExecaResult(_0x54fa60);}export function runNpxSkillsAddGlobal(_0x4307c6,_0x3551d6,_0x58ec76){const _0x338b5d=a345_0x195334;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3bd0c6=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3551d6,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x1c1621=[_0x338b5d(0xfb),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3551d6,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x338b5d(0xf8)]('\x20');console[_0x338b5d(0xeb)]('*\x20'+_0x1c1621);const _0x22b1a5=execaSync(_0x338b5d(0xfb),_0x3bd0c6,execaOptions(_0x4307c6,_0x338b5d(0xf2))),_0x454c76=normalizeExecaResult(_0x22b1a5,_0x58ec76?.['expectedSkillName']??resolveGlobalSkillName(_0x3551d6),_0x58ec76?.[_0x338b5d(0x110)]);if(_0x58ec76?.['stdio']!==_0x338b5d(0xf2)&&!_0x454c76[_0x338b5d(0x107)]){const _0x1c0256=[_0x22b1a5[_0x338b5d(0x105)],_0x22b1a5[_0x338b5d(0x123)]][_0x338b5d(0x103)](Boolean)[_0x338b5d(0xf8)]('\x0a')[_0x338b5d(0x10c)]();if(_0x1c0256)console[_0x338b5d(0xeb)](_0x1c0256);}return _0x454c76;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a346_0x45a6=a346_0x8e54;(function(_0x3068e3,_0x20f7f9){const _0x31e086=a346_0x8e54,_0x42a858=_0x3068e3();while(!![]){try{const _0x4c78ac=-parseInt(_0x31e086(0x10f))/0x1*(-parseInt(_0x31e086(0x109))/0x2)+-parseInt(_0x31e086(0x116))/0x3+parseInt(_0x31e086(0x10d))/0x4+-parseInt(_0x31e086(0x113))/0x5+parseInt(_0x31e086(0x10e))/0x6*(-parseInt(_0x31e086(0x108))/0x7)+-parseInt(_0x31e086(0x11b))/0x8+-parseInt(_0x31e086(0x112))/0x9*(-parseInt(_0x31e086(0xfa))/0xa);if(_0x4c78ac===_0x20f7f9)break;else _0x42a858['push'](_0x42a858['shift']());}catch(_0x1fe217){_0x42a858['push'](_0x42a858['shift']());}}}(a346_0x15ec,0xeb280));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a346_0x15ec(){const _0x230e0f=['reason','version','present','map','.skill-lock.json','SKILL.md','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','globalSkillsDirs','not-recorded','recorded','join','7xrgTbc','242FPEhzw','.agents','includes','object','1584692pIhTVA','6857778GyNXPV','5981Slopox','home','skills','53451TFTgqD','8542565IdnpQv','utf8','number','3900888yTMgup','parse','.claude','find','\x20is\x20unreadable:\x20','7331640gLOXra','absent','unusable','8270IVwNJk','unverifiable','\x20uses\x20unsupported\x20version\x20'];a346_0x15ec=function(){return _0x230e0f;};return a346_0x15ec();}export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a346_0x45a6(0x101));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a346_0x45a6(0x10a),a346_0x45a6(0x111)),join(a346_0x45a6(0x118),a346_0x45a6(0x111))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x3869b3,_0x5801af){const _0x595e06=a346_0x45a6;if(!existsSync(_0x3869b3))return{'kind':_0x595e06(0x105)};let _0x25f15e;try{_0x25f15e=JSON[_0x595e06(0x117)](readFileSync(_0x3869b3,_0x595e06(0x114)));}catch(_0x51355a){return{'kind':_0x595e06(0xf9),'reason':_0x3869b3+_0x595e06(0x11a)+_0x51355a['message']};}const _0x3de5aa=_0x25f15e;if(typeof _0x3de5aa?.[_0x595e06(0xfe)]!==_0x595e06(0x115)||!SUPPORTED_LOCK_VERSIONS[_0x595e06(0x10b)](_0x3de5aa[_0x595e06(0xfe)]))return{'kind':'unusable','reason':_0x3869b3+_0x595e06(0xfc)+String(_0x3de5aa?.['version'])};if(!_0x3de5aa[_0x595e06(0x111)]||typeof _0x3de5aa['skills']!==_0x595e06(0x10c))return{'kind':_0x595e06(0xf9),'reason':_0x3869b3+'\x20has\x20no\x20skills\x20map'};return _0x3de5aa['skills'][_0x5801af]?{'kind':'recorded'}:{'kind':'not-recorded'};}function a346_0x8e54(_0xb214f2,_0x58642b){_0xb214f2=_0xb214f2-0xf9;const _0x15ec93=a346_0x15ec();let _0x8e54be=_0x15ec93[_0xb214f2];return _0x8e54be;}export function resolveInstalledSkill(_0x2b227a,_0x1fb0fd){const _0x2782b6=a346_0x45a6,_0x45d93c=_0x1fb0fd?.[_0x2782b6(0x110)]??homedir(),_0x3d9051=_0x1fb0fd?.[_0x2782b6(0x104)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x2782b6(0x100)](_0x1ed62b=>join(_0x45d93c,_0x1ed62b)),_0x487183=_0x1fb0fd?.['lockFile']??join(_0x45d93c,SKILL_LOCK_RELATIVE_PATH),_0x13b3a8=_0x3d9051[_0x2782b6(0x100)](_0x40de30=>join(_0x40de30,_0x2b227a,_0x2782b6(0x102))),_0x4f7bb6=_0x13b3a8[_0x2782b6(0x119)](_0x4020e6=>existsSync(_0x4020e6));if(_0x4f7bb6)return{'state':_0x2782b6(0xff),'path':_0x4f7bb6};const _0x41f908=readLockLookup(_0x487183,_0x2b227a);if(_0x41f908['kind']===_0x2782b6(0xf9))return{'state':_0x2782b6(0xfb),'reason':_0x41f908[_0x2782b6(0xfd)]};if(_0x41f908['kind']===_0x2782b6(0x106))return{'state':'unverifiable','reason':_0x487183+'\x20records\x20\x22'+_0x2b227a+_0x2782b6(0x103)+('('+_0x13b3a8[_0x2782b6(0x107)](',\x20')+')')};return{'state':_0x2782b6(0x11c),'checked':_0x13b3a8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b6ac2,_0x54ee5e){const _0xf9b853=a347_0x2ee8,_0x1f5a13=_0x1b6ac2();while(!![]){try{const _0x5f0176=-parseInt(_0xf9b853(0x159))/0x1*(parseInt(_0xf9b853(0x150))/0x2)+-parseInt(_0xf9b853(0x15a))/0x3*(parseInt(_0xf9b853(0x160))/0x4)+-parseInt(_0xf9b853(0x15e))/0x5+-parseInt(_0xf9b853(0x154))/0x6+-parseInt(_0xf9b853(0x152))/0x7*(-parseInt(_0xf9b853(0x15c))/0x8)+parseInt(_0xf9b853(0x15d))/0x9*(-parseInt(_0xf9b853(0x162))/0xa)+parseInt(_0xf9b853(0x157))/0xb;if(_0x5f0176===_0x54ee5e)break;else _0x1f5a13['push'](_0x1f5a13['shift']());}catch(_0xefc488){_0x1f5a13['push'](_0x1f5a13['shift']());}}}(a347_0x55f2,0xbcb28));function a347_0x55f2(){const _0x326aca=['28685635AEwCoO','[REDACTED]','1zljVPa','723WhKXtz','flags','757640WWXhlB','279ZYOlUW','7021415aFnfQd','error','8036NiHmtk','entries','15470mRxJMI','438878LiuZOL','some','84OQBKUj','message','4892958xOAooF','durationMs','service'];a347_0x55f2=function(){return _0x326aca;};return a347_0x55f2();}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(_0x47cf83){const _0x2c343c=a347_0x2ee8;return SENSITIVE_PATTERNS[_0x2c343c(0x151)](_0xb9788b=>_0xb9788b['test'](_0x47cf83));}function sanitizeFlags(_0x3f1b06){const _0x50c728=a347_0x2ee8,_0x1eb6f7={};for(const [_0x4fbd97,_0x124e1e]of Object[_0x50c728(0x161)](_0x3f1b06)){isSensitiveKey(_0x4fbd97)?_0x1eb6f7[_0x4fbd97]=_0x124e1e!=null&&_0x124e1e!==''?_0x50c728(0x158):_0x124e1e:_0x1eb6f7[_0x4fbd97]=_0x124e1e;}return _0x1eb6f7;}function a347_0x2ee8(_0x5a3e0f,_0x4d87d2){_0x5a3e0f=_0x5a3e0f-0x150;const _0x55f224=a347_0x55f2();let _0x2ee878=_0x55f224[_0x5a3e0f];return _0x2ee878;}export async function reportCommandTrace(_0x5daded){const _0x19ec91=a347_0x2ee8;try{const _0x1e6316=sanitizeFlags(_0x5daded[_0x19ec91(0x15b)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x5daded[_0x19ec91(0x156)],'command.name':_0x5daded['command'],'command.flags':JSON['stringify'](_0x1e6316),..._0x5daded[_0x19ec91(0x155)]!=null?{'command.duration_ms':_0x5daded[_0x19ec91(0x155)]}:{},..._0x5daded[_0x19ec91(0x15f)]?{'command.error':_0x5daded['error']instanceof Error?_0x5daded[_0x19ec91(0x15f)][_0x19ec91(0x153)]:String(_0x5daded[_0x19ec91(0x15f)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a348_0x1d0b(_0x37bfbd,_0x2a388e){_0x37bfbd=_0x37bfbd-0x1ec;var _0x174fde=a348_0x174f();var _0x1d0bcd=_0x174fde[_0x37bfbd];return _0x1d0bcd;}(function(_0x5df99a,_0x2ddaf0){var _0x3b5804=a348_0x1d0b,_0x448208=_0x5df99a();while(!![]){try{var _0x391f8e=-parseInt(_0x3b5804(0x1f8))/0x1*(-parseInt(_0x3b5804(0x1f6))/0x2)+-parseInt(_0x3b5804(0x1f0))/0x3*(parseInt(_0x3b5804(0x1ec))/0x4)+-parseInt(_0x3b5804(0x1ef))/0x5*(parseInt(_0x3b5804(0x1f9))/0x6)+parseInt(_0x3b5804(0x1f4))/0x7*(-parseInt(_0x3b5804(0x1f1))/0x8)+-parseInt(_0x3b5804(0x1f3))/0x9+-parseInt(_0x3b5804(0x1f5))/0xa+parseInt(_0x3b5804(0x1f2))/0xb*(parseInt(_0x3b5804(0x1ed))/0xc);if(_0x391f8e===_0x2ddaf0)break;else _0x448208['push'](_0x448208['shift']());}catch(_0x59ae92){_0x448208['push'](_0x448208['shift']());}}}(a348_0x174f,0x1adc7));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a348_0x174f(){var _0x2bd953=['1551672TYNJTL','22InqVSe','1084680SqSfDN','7byiQzz','2075640CgPFfb','56mCpkXc','service','7405moQwUC','1620ABUVdC','672QFXAKR','3299532mnxOrh','error','1970NRAPeG','336tHbNHA'];a348_0x174f=function(){return _0x2bd953;};return a348_0x174f();}export async function reportCliHelpTrace(_0x55f068,_0x3dd534){var _0x39b066=a348_0x1d0b;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x55f068,..._0x3dd534?.[_0x39b066(0x1f7)]&&{'rabetbase.help.service':_0x3dd534[_0x39b066(0x1f7)]}}});}catch(_0x1bc5b8){console[_0x39b066(0x1ee)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x1bc5b8);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x145b49,_0x203ef0){const _0xe96bdf=a349_0x11fa,_0x19da1d=_0x145b49();while(!![]){try{const _0x307cdd=-parseInt(_0xe96bdf(0x16a))/0x1+-parseInt(_0xe96bdf(0x175))/0x2*(-parseInt(_0xe96bdf(0x166))/0x3)+parseInt(_0xe96bdf(0x170))/0x4+-parseInt(_0xe96bdf(0x177))/0x5+-parseInt(_0xe96bdf(0x167))/0x6+-parseInt(_0xe96bdf(0x16c))/0x7*(parseInt(_0xe96bdf(0x168))/0x8)+-parseInt(_0xe96bdf(0x16f))/0x9*(-parseInt(_0xe96bdf(0x171))/0xa);if(_0x307cdd===_0x203ef0)break;else _0x19da1d['push'](_0x19da1d['shift']());}catch(_0x5178b2){_0x19da1d['push'](_0x19da1d['shift']());}}}(a349_0x4d2b,0x5975c));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 _0x290eea=a349_0x11fa,_0x532631=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x382e30=_0x532631?.[_0x290eea(0x176)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x290eea(0x172)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x290eea(0x174):_0x290eea(0x16d))}),setUserContext({'id':_0x382e30?.['id'],'username':_0x382e30?.[_0x290eea(0x169)],'nickname':_0x382e30?.[_0x290eea(0x16e)],'email':_0x382e30?.[_0x290eea(0x16b)],'tenantCode':_0x382e30?.['tenant']?.[_0x290eea(0x173)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x532631;}function a349_0x11fa(_0x3d5c8c,_0x29f245){_0x3d5c8c=_0x3d5c8c-0x166;const _0x4d2bbc=a349_0x4d2b();let _0x11fa74=_0x4d2bbc[_0x3d5c8c];return _0x11fa74;}function a349_0x4d2b(){const _0x4b3c79=['unknown','tenant_code','daily','145814mIlSmo','user','2390440hojgfw','18ISfWNK','339420RezNNP','1305416kkKWnD','username','484217gQLgFH','email','28KxypME','production','nickname','693uiyYaf','1991408vzdZMw','143210IGVPMz'];a349_0x4d2b=function(){return _0x4b3c79;};return a349_0x4d2b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x216e9b,_0x13b4b0){const _0x2473c1=a350_0x53ad,_0x49b2df=_0x216e9b();while(!![]){try{const _0x3725c2=-parseInt(_0x2473c1(0xd3))/0x1*(-parseInt(_0x2473c1(0xd6))/0x2)+-parseInt(_0x2473c1(0xdd))/0x3*(parseInt(_0x2473c1(0xe0))/0x4)+-parseInt(_0x2473c1(0xdc))/0x5+-parseInt(_0x2473c1(0xd5))/0x6+-parseInt(_0x2473c1(0xd8))/0x7+parseInt(_0x2473c1(0xd7))/0x8*(-parseInt(_0x2473c1(0xe1))/0x9)+parseInt(_0x2473c1(0xd9))/0xa;if(_0x3725c2===_0x13b4b0)break;else _0x49b2df['push'](_0x49b2df['shift']());}catch(_0x3afcc3){_0x49b2df['push'](_0x49b2df['shift']());}}}(a350_0x51c3,0xbb792));function a350_0x51c3(){const _0x4bc49a=['8026764OZEBPX','1514wYUKbl','488AATrPQ','9970800wqgaQY','44979230QvwHav','beforeExit','once','4763870AncmQF','112551vZBpgx','SIGTERM','exit','76cvVYsZ','43029fRFeMl','1307fmbejL','then'];a350_0x51c3=function(){return _0x4bc49a;};return a350_0x51c3();}function a350_0x53ad(_0x3e5d0a,_0x95d4c3){_0x3e5d0a=_0x3e5d0a-0xd3;const _0x51c386=a350_0x51c3();let _0x53add5=_0x51c386[_0x3e5d0a];return _0x53add5;}import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x158e90=a350_0x53ad;process['once'](_0x158e90(0xda),()=>{void flushOtelNodeIfUsed();});const _0x2dbc53=()=>{const _0x14f072=_0x158e90;void flushOtelNodeIfUsed()[_0x14f072(0xd4)](()=>process[_0x14f072(0xdf)](0x0));};process['once']('SIGINT',_0x2dbc53),process[_0x158e90(0xdb)](_0x158e90(0xde),_0x2dbc53);}export async function exitWithOtelShutdown(_0x26f2ab){const _0x175bda=a350_0x53ad;await flushOtelNodeIfUsed(),process[_0x175bda(0xdf)](_0x26f2ab);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a351_0x3ce8(_0xd38cc8,_0x1914cf){_0xd38cc8=_0xd38cc8-0x105;const _0x140518=a351_0x1405();let _0x3ce8be=_0x140518[_0xd38cc8];return _0x3ce8be;}const a351_0x577b7c=a351_0x3ce8;(function(_0x1327cb,_0x20f8c7){const _0x4e4dd4=a351_0x3ce8,_0x5bd618=_0x1327cb();while(!![]){try{const _0x42ba89=parseInt(_0x4e4dd4(0x10d))/0x1+parseInt(_0x4e4dd4(0x10f))/0x2*(-parseInt(_0x4e4dd4(0x107))/0x3)+-parseInt(_0x4e4dd4(0x105))/0x4*(-parseInt(_0x4e4dd4(0x114))/0x5)+parseInt(_0x4e4dd4(0x109))/0x6*(parseInt(_0x4e4dd4(0x112))/0x7)+-parseInt(_0x4e4dd4(0x106))/0x8*(-parseInt(_0x4e4dd4(0x10b))/0x9)+parseInt(_0x4e4dd4(0x110))/0xa*(-parseInt(_0x4e4dd4(0x10c))/0xb)+parseInt(_0x4e4dd4(0x111))/0xc;if(_0x42ba89===_0x20f8c7)break;else _0x5bd618['push'](_0x5bd618['shift']());}catch(_0x2c0dda){_0x5bd618['push'](_0x5bd618['shift']());}}}(a351_0x1405,0x3bc79));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a351_0x1405(){const _0x223cbd=['6849yVGoIm','39314tNesbc','130073ceBvBV','manual','8124uRTZRa','340TclKYH','126144sSTWlT','69174eSZrSi','rabetbase-cli','30540fVPSwL','72ohYPbY','5024usdkFH','282jgKMmg','traceName','12USMgjI','traceparent'];a351_0x1405=function(){return _0x223cbd;};return a351_0x1405();}const DEFAULT_TRACE_NAME=a351_0x577b7c(0x113);export async function sendCliTraceLog(_0x5585b3){const _0x13c292=a351_0x577b7c;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x5585b3[_0x13c292(0x108)]??DEFAULT_TRACE_NAME,'version':_0x5585b3['version']??getCliVersion(),'spanName':_0x5585b3['spanName'],'eventType':_0x13c292(0x10e),'logData':_0x5585b3['logData'],..._0x5585b3[_0x13c292(0x10a)]&&{'traceparent':_0x5585b3[_0x13c292(0x10a)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a352_0x1cadbf=a352_0x586f;(function(_0x3d0b63,_0x9a3cb7){const _0x4bd71b=a352_0x586f,_0x16eb8e=_0x3d0b63();while(!![]){try{const _0x3e9ef1=parseInt(_0x4bd71b(0xcb))/0x1*(-parseInt(_0x4bd71b(0xd0))/0x2)+-parseInt(_0x4bd71b(0xc7))/0x3+parseInt(_0x4bd71b(0xd6))/0x4*(parseInt(_0x4bd71b(0xd1))/0x5)+-parseInt(_0x4bd71b(0xc9))/0x6*(parseInt(_0x4bd71b(0xcd))/0x7)+parseInt(_0x4bd71b(0xd4))/0x8*(-parseInt(_0x4bd71b(0xc5))/0x9)+parseInt(_0x4bd71b(0xd5))/0xa*(-parseInt(_0x4bd71b(0xca))/0xb)+-parseInt(_0x4bd71b(0xcc))/0xc*(-parseInt(_0x4bd71b(0xce))/0xd);if(_0x3e9ef1===_0x9a3cb7)break;else _0x16eb8e['push'](_0x16eb8e['shift']());}catch(_0x229ca2){_0x16eb8e['push'](_0x16eb8e['shift']());}}}(a352_0x1429,0x5bf67));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_0x1cadbf(0xcf);function a352_0x1429(){const _0x4e6183=['sanitize','2196QSagXv','62832mXIStK','8jneBKf','48GBFEcm','3696NLduWG','5173688CkgVso','issue.log.collect','19828daoUmz','5sRllcm','title','redactionKinds','1877032kxIawR','1140OBaDds','2038888rKwADU','9VjHXty','join','1699770zAAKuB'];a352_0x1429=function(){return _0x4e6183;};return a352_0x1429();}function a352_0x586f(_0x19e624,_0x57a0b2){_0x19e624=_0x19e624-0xc5;const _0x1429f4=a352_0x1429();let _0x586f73=_0x1429f4[_0x19e624];return _0x586f73;}export async function sendPlatformIssueCollectLog(_0x359eed){const _0x4d2ad2=a352_0x1cadbf;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x359eed[_0x4d2ad2(0xd2)],'issue.description':_0x359eed['description'],..._0x359eed['sanitize']?{'issue.description_original_bytes':_0x359eed[_0x4d2ad2(0xc8)]['originalBytes'],'issue.description_truncated':_0x359eed[_0x4d2ad2(0xc8)]['truncated'],'issue.description_redactions':_0x359eed['sanitize']['redactionCount'],'issue.description_redaction_kinds':_0x359eed[_0x4d2ad2(0xc8)][_0x4d2ad2(0xd3)][_0x4d2ad2(0xc6)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a354_0x2c03(_0xae5949,_0x145477){_0xae5949=_0xae5949-0x1ac;const _0x5dae07=a354_0x5dae();let _0x2c034d=_0x5dae07[_0xae5949];return _0x2c034d;}const a354_0x432ca2=a354_0x2c03;(function(_0xc275dd,_0x3d6c5f){const _0x2806c4=a354_0x2c03,_0x4a8497=_0xc275dd();while(!![]){try{const _0x511c3f=parseInt(_0x2806c4(0x1d3))/0x1+parseInt(_0x2806c4(0x1ad))/0x2+parseInt(_0x2806c4(0x1bb))/0x3+-parseInt(_0x2806c4(0x1cb))/0x4*(parseInt(_0x2806c4(0x1d0))/0x5)+-parseInt(_0x2806c4(0x1dd))/0x6*(parseInt(_0x2806c4(0x1cc))/0x7)+-parseInt(_0x2806c4(0x1b1))/0x8*(-parseInt(_0x2806c4(0x1b6))/0x9)+parseInt(_0x2806c4(0x1b4))/0xa*(parseInt(_0x2806c4(0x1d8))/0xb);if(_0x511c3f===_0x3d6c5f)break;else _0x4a8497['push'](_0x4a8497['shift']());}catch(_0x3efcc1){_0x4a8497['push'](_0x4a8497['shift']());}}}(a354_0x5dae,0xc20c1));export const CORE_IDE_CONFIGS={'cursor':{'name':a354_0x432ca2(0x1b9),'description':a354_0x432ca2(0x1bf),'folders':[a354_0x432ca2(0x1b5),a354_0x432ca2(0x1da)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1d1)}]},'windsurf':{'name':a354_0x432ca2(0x1d9),'description':a354_0x432ca2(0x1c9),'folders':[a354_0x432ca2(0x1cd)],'files':[{'type':a354_0x432ca2(0x1be),'path':'.windsurf/workflows/rabetbase.md'}]},'claude':{'name':a354_0x432ca2(0x1ae),'description':a354_0x432ca2(0x1ae),'folders':['.claude'],'files':[{'type':'file','path':a354_0x432ca2(0x1d5)}]},'cline':{'name':a354_0x432ca2(0x1c1),'description':'Cline\x20IDE','folders':[a354_0x432ca2(0x1dc)],'files':[{'type':'file','path':a354_0x432ca2(0x1e4)}]},'codex':{'name':a354_0x432ca2(0x1de),'description':'Codex\x20IDE','folders':[a354_0x432ca2(0x1d7)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1ba)}]},'opencode':{'name':a354_0x432ca2(0x1bd),'description':a354_0x432ca2(0x1c4),'folders':[a354_0x432ca2(0x1e3)],'files':[{'type':a354_0x432ca2(0x1be),'path':'.opencode/skills/lovrabet/SKILL.md'}]},'qoder':{'name':a354_0x432ca2(0x1ce),'description':a354_0x432ca2(0x1b3),'folders':[a354_0x432ca2(0x1d4)],'files':[{'type':a354_0x432ca2(0x1be),'path':'.qoder/rules/rabetbase.md'},{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1e5)}]},'codebuddy':{'name':a354_0x432ca2(0x1c8),'description':a354_0x432ca2(0x1df),'folders':[a354_0x432ca2(0x1e0)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1b7)}]},'trae':{'name':a354_0x432ca2(0x1ac),'description':a354_0x432ca2(0x1ca),'folders':[a354_0x432ca2(0x1c7)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1cf)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a354_0x432ca2(0x1b0),'description':'Generic\x20template\x20fallback','folders':[a354_0x432ca2(0x1e1)],'files':[{'type':'file','path':a354_0x432ca2(0x1e2)}]},'antigravity':{'name':a354_0x432ca2(0x1e6),'description':a354_0x432ca2(0x1c6),'folders':[a354_0x432ca2(0x1e1)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1e2)}]}};function a354_0x5dae(){const _0xf63523=['CodeBuddy\x20IDE','.codebuddy','.agent','.agent/skills/lovrabet/SKILL.md','.opencode','.cline/skills/lovrabet/SKILL.md','.qoder/skills/lovrabet/SKILL.md','Antigravity','Trae','666352rbhcaQ','Claude\x20Code','cline','Other\x20(generic\x20template)','2405424rTIyvC','claude','Qoder\x20IDE','3674190YIVTrR','.cursorrules','9cXPOLd','.codebuddy/skills/lovrabet/SKILL.md','antigravity','Cursor','.codex/skills/lovrabet/SKILL.md','3966108IcuuLP','codebuddy','OpenCode','file','Cursor\x20IDE','windsurf','Cline','qoder','agent','OpenCode\x20IDE','trae','Antigravity\x20IDE','.trae','CodeBuddy','Windsurf\x20IDE','Trae\x20IDE','533356AeUGXO','485177FrYiEp','.windsurf','Qoder','.trae/skills/lovrabet/SKILL.md','25CtIfSD','.cursor/skills/rabetbase.md','opencode','39246vhOuLn','.qoder','.claude/skills/lovrabet/SKILL.md','codex','.codex','11wGzpuR','Windsurf','.cursor','cursor','.cline','78nmwjYO','Codex'];a354_0x5dae=function(){return _0xf63523;};return a354_0x5dae();}export const CORE_IDE_LIST=['claude','cline',a354_0x432ca2(0x1bc),a354_0x432ca2(0x1d6),a354_0x432ca2(0x1db),a354_0x432ca2(0x1d2),a354_0x432ca2(0x1c2),a354_0x432ca2(0x1c5),a354_0x432ca2(0x1c0)];export const IDE_LIST=[a354_0x432ca2(0x1b8),a354_0x432ca2(0x1b2),a354_0x432ca2(0x1af),a354_0x432ca2(0x1bc),a354_0x432ca2(0x1d6),a354_0x432ca2(0x1db),a354_0x432ca2(0x1d2),a354_0x432ca2(0x1c2),'trae','windsurf',a354_0x432ca2(0x1c3)];export const ALL_CORE_IDES=['cursor',a354_0x432ca2(0x1c0),a354_0x432ca2(0x1b2),a354_0x432ca2(0x1af),a354_0x432ca2(0x1d6),a354_0x432ca2(0x1d2),'qoder',a354_0x432ca2(0x1bc),a354_0x432ca2(0x1c5)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x226450,_0x1ba351){const _0x363f2d=a355_0xa1e6,_0x144663=_0x226450();while(!![]){try{const _0x1f6c63=parseInt(_0x363f2d(0x128))/0x1+-parseInt(_0x363f2d(0x12a))/0x2*(parseInt(_0x363f2d(0x125))/0x3)+-parseInt(_0x363f2d(0x126))/0x4*(-parseInt(_0x363f2d(0x127))/0x5)+-parseInt(_0x363f2d(0x12d))/0x6+-parseInt(_0x363f2d(0x124))/0x7+parseInt(_0x363f2d(0x12c))/0x8*(parseInt(_0x363f2d(0x129))/0x9)+parseInt(_0x363f2d(0x12b))/0xa;if(_0x1f6c63===_0x1ba351)break;else _0x144663['push'](_0x144663['shift']());}catch(_0xc2d9ac){_0x144663['push'](_0x144663['shift']());}}}(a355_0x3ef5,0x9047f));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a355_0xa1e6(_0x275178,_0x48d844){_0x275178=_0x275178-0x124;const _0x3ef5d0=a355_0x3ef5();let _0xa1e6ca=_0x3ef5d0[_0x275178];return _0xa1e6ca;}function a355_0x3ef5(){const _0x5d6919=['2639908KVysuF','5mOmCdb','708308fHEucM','1206xQtCRn','2QwIhqs','13232610bmXwsf','15176TCRaVJ','2667474VDhfNp','5993015mLqahe','3162135wRNbFH'];a355_0x3ef5=function(){return _0x5d6919;};return a355_0x3ef5();}
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x200582,_0x34e0a2){const _0x7f59c9=a356_0x576a,_0x4c2e80=_0x200582();while(!![]){try{const _0x1a5872=parseInt(_0x7f59c9(0x14d))/0x1+parseInt(_0x7f59c9(0x14c))/0x2+-parseInt(_0x7f59c9(0x151))/0x3*(-parseInt(_0x7f59c9(0x149))/0x4)+-parseInt(_0x7f59c9(0x150))/0x5*(-parseInt(_0x7f59c9(0x148))/0x6)+parseInt(_0x7f59c9(0x144))/0x7+-parseInt(_0x7f59c9(0x143))/0x8*(-parseInt(_0x7f59c9(0x14e))/0x9)+-parseInt(_0x7f59c9(0x145))/0xa;if(_0x1a5872===_0x34e0a2)break;else _0x4c2e80['push'](_0x4c2e80['shift']());}catch(_0x7a3292){_0x4c2e80['push'](_0x4c2e80['shift']());}}}(a356_0x3e0b,0xc66b5));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x422d32=a356_0x576a,_0x5eb904=getTemplateBaseUrl(),_0x48181c=[_0x5eb904+_0x422d32(0x142),_0x5eb904+_0x422d32(0x153)];for(const _0x49ea80 of _0x48181c){try{const _0x5f14d8=await fetch(_0x49ea80,{'headers':{'Accept':_0x422d32(0x14a)}});if(!_0x5f14d8['ok'])continue;const _0x1bfdf8=await _0x5f14d8[_0x422d32(0x154)]();if(!_0x1bfdf8[_0x422d32(0x14f)]?.[_0x422d32(0x14b)]||!_0x1bfdf8[_0x422d32(0x152)]?.[_0x422d32(0x147)]?.[_0x422d32(0x14b)])continue;return _0x1bfdf8;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a356_0x576a(_0x59ebce,_0x5eb24f){_0x59ebce=_0x59ebce-0x142;const _0x3e0b69=a356_0x3e0b();let _0x576a68=_0x3e0b69[_0x59ebce];return _0x576a68;}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a356_0x3e0b(){const _0x7848b4=['node','3702KazXDx','27928IUpJKq','application/json','stableVersion','1621862NAaQEx','302502XZwXVS','140157GbKdcP','cli','12525StoQSO','684cGeAcb','sdk','/config/index.json','json','/config.json','624FBSrlq','3831660hiqWQd','52002630PVpCRn','now'];a356_0x3e0b=function(){return _0x7848b4;};return a356_0x3e0b();}export async function getCdnConfig(){const _0x1d4360=a356_0x576a,_0x174b75=Date[_0x1d4360(0x146)]();if(hasCachedConfig){const _0x1e9a12=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x174b75-cacheTime<_0x1e9a12)return cachedConfig;}const _0x34eebf=await fetchCdnConfig();return cachedConfig=_0x34eebf,cacheTime=_0x174b75,hasCachedConfig=!![],_0x34eebf;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a357_0x37903c=a357_0x16c2;(function(_0x1e7e4c,_0x3cd47e){const _0x1f58de=a357_0x16c2,_0x14aaa9=_0x1e7e4c();while(!![]){try{const _0x17680e=-parseInt(_0x1f58de(0xd1))/0x1+parseInt(_0x1f58de(0xd2))/0x2+-parseInt(_0x1f58de(0xc4))/0x3+parseInt(_0x1f58de(0xbf))/0x4+parseInt(_0x1f58de(0xd3))/0x5+parseInt(_0x1f58de(0xd8))/0x6+-parseInt(_0x1f58de(0xc5))/0x7*(parseInt(_0x1f58de(0xd6))/0x8);if(_0x17680e===_0x3cd47e)break;else _0x14aaa9['push'](_0x14aaa9['shift']());}catch(_0x1e6985){_0x14aaa9['push'](_0x14aaa9['shift']());}}}(a357_0x25ea,0x56208));import a357_0x13faa4 from'node:fs';import a357_0x55d7d5 from'node:path';function a357_0x16c2(_0x1ac50c,_0x4616a3){_0x1ac50c=_0x1ac50c-0xb4;const _0x25eabd=a357_0x25ea();let _0x16c223=_0x25eabd[_0x1ac50c];return _0x16c223;}import a357_0x1a9564 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a357_0x37903c(0xcd);function isNonNumericVersion(_0x2dacd9){const _0x29f035=a357_0x37903c,_0x48e940=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x48e940[_0x29f035(0xb9)](_0x5d5f47=>_0x5d5f47[_0x29f035(0xca)](_0x2dacd9));}function getInstalledVersion(_0x4789ba,_0x1c9aad){const _0x354cba=a357_0x37903c;try{const _0x1b137f=a357_0x55d7d5[_0x354cba(0xd4)](_0x4789ba,'node_modules',_0x1c9aad,_0x354cba(0xb8));if(a357_0x13faa4[_0x354cba(0xc9)](_0x1b137f)){const _0x189219=JSON[_0x354cba(0xb7)](a357_0x13faa4[_0x354cba(0xc3)](_0x1b137f,'utf-8'));return _0x189219['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x772241=a357_0x37903c;try{const _0x393042=await getCdnConfig();return _0x393042?.[_0x772241(0xc6)]?.['node']?.[_0x772241(0xd7)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x27e7ea=a357_0x37903c;try{const _0x55f993=await getCdnConfig();return _0x55f993?.['sdk']?.[_0x27e7ea(0xcb)]?.[_0x27e7ea(0xbe)]||'@lovrabet/sdk';}catch{return _0x27e7ea(0xcf);}}export async function checkSdkVersion(_0x13427f){const _0x3408b3=a357_0x37903c,_0x190187=a357_0x55d7d5[_0x3408b3(0xd4)](_0x13427f,_0x3408b3(0xb8)),[_0x576607,_0x55b593]=await Promise[_0x3408b3(0xd5)]([getSdkStableVersion(),getSdkPackageName()]),_0x3e7190=_0x576607||FALLBACK_MIN_SDK_VERSION;if(!a357_0x13faa4['existsSync'](_0x190187))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3e7190,'packageName':_0x55b593,'stableVersion':_0x576607};try{const _0x110639=JSON['parse'](a357_0x13faa4['readFileSync'](_0x190187,_0x3408b3(0xcc))),_0xc43c4c=_0x110639['dependencies']||{},_0x1c575f=_0x110639['devDependencies']||{},_0xa80cb2=_0xc43c4c[_0x55b593]||_0x1c575f[_0x55b593];if(!_0xa80cb2)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3e7190,'packageName':_0x55b593,'stableVersion':_0x576607};let _0xf5c779=getInstalledVersion(_0x13427f,_0x55b593);!_0xf5c779&&(_0xf5c779=_0xa80cb2);if(isNonNumericVersion(_0xa80cb2))return{'installed':!![],'version':_0xf5c779,'needsUpgrade':![],'minVersion':_0x3e7190,'packageName':_0x55b593,'stableVersion':_0x576607};const _0x2d7b50=a357_0x1a9564[_0x3408b3(0xbb)](_0xf5c779),_0x5d4cc3=a357_0x1a9564[_0x3408b3(0xbb)](_0x3e7190),_0x56b4ae=_0x2d7b50&&_0x5d4cc3?a357_0x1a9564['lt'](_0x2d7b50,_0x5d4cc3):![];return{'installed':!![],'version':_0xf5c779,'needsUpgrade':_0x56b4ae,'minVersion':_0x3e7190,'packageName':_0x55b593,'stableVersion':_0x576607};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3e7190,'packageName':_0x55b593,'stableVersion':_0x576607};}}export function checkSdkVersionSync(_0x526953){const _0x2f2019=a357_0x37903c,_0x41a1f3=a357_0x55d7d5[_0x2f2019(0xd4)](_0x526953,_0x2f2019(0xb8)),_0xcff400='@lovrabet/sdk';if(!a357_0x13faa4[_0x2f2019(0xc9)](_0x41a1f3))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xcff400,'stableVersion':null};try{const _0x49840b=JSON[_0x2f2019(0xb7)](a357_0x13faa4[_0x2f2019(0xc3)](_0x41a1f3,'utf8')),_0x162d92=_0x49840b[_0x2f2019(0xc0)]||{},_0x4ee622=_0x49840b[_0x2f2019(0xb6)]||{},_0xb7f0f=_0x162d92[_0xcff400]||_0x4ee622[_0xcff400];if(!_0xb7f0f)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xcff400,'stableVersion':null};let _0x3c42e9=getInstalledVersion(_0x526953,_0xcff400);!_0x3c42e9&&(_0x3c42e9=_0xb7f0f);if(isNonNumericVersion(_0xb7f0f))return{'installed':!![],'version':_0x3c42e9,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xcff400,'stableVersion':null};const _0x2dc12a=a357_0x1a9564[_0x2f2019(0xbb)](_0x3c42e9),_0x51726f=_0x2dc12a?a357_0x1a9564['lt'](_0x2dc12a,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x3c42e9,'needsUpgrade':_0x51726f,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xcff400,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xcff400,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x220db3){const _0x3aea6a=a357_0x37903c;if(!_0x220db3['needsUpgrade'])return;const _0x2a8312=_0x3aea6a(0xbc),_0x39c280=_0x3aea6a(0xbd),_0x1e3deb=_0x3aea6a(0xb5),_0x375fa3=_0x220db3['packageName']||_0x3aea6a(0xcf),_0x571bfc=_0x220db3[_0x3aea6a(0xd7)]||_0x220db3[_0x3aea6a(0xc1)],_0x979e35=_0x3aea6a(0xba)+_0x375fa3+'@'+(_0x571bfc||_0x3aea6a(0xc7));console[_0x3aea6a(0xc8)](),console[_0x3aea6a(0xc8)](''+_0x2a8312+_0x1e3deb+_0x3aea6a(0xc2)+_0x39c280),console[_0x3aea6a(0xc8)](_0x2a8312+_0x3aea6a(0xd0)+_0x375fa3+'@'+_0x220db3['version']+_0x39c280),console['log'](_0x2a8312+_0x3aea6a(0xb4)+_0x571bfc+_0x39c280),console['log'](_0x2a8312+_0x3aea6a(0xce)+_0x979e35+_0x39c280),console[_0x3aea6a(0xc8)]();}function a357_0x25ea(){const _0x6ff82d=['some','npm\x20install\x20','coerce','\x1b[33m','\x1b[0m','packageName','462240hQsKjr','dependencies','minVersion','↪\x20SDK\x20update\x20available','readFileSync','538044OiblAt','3373902mnqKzp','sdk','latest','log','existsSync','test','node','utf8','1.2.0','\x20\x20\x20Upgrade\x20command:\x20','@lovrabet/sdk','\x20\x20\x20Current\x20version:\x20','593452ENWife','451416tdWAGV','3224800VqwJsv','join','all','8myysqs','stableVersion','3728004QLoXYe','\x20\x20\x20Stable\x20version:\x20','\x1b[1m','devDependencies','parse','package.json'];a357_0x25ea=function(){return _0x6ff82d;};return a357_0x25ea();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a358_0x3df3(){const _0x329763=['validation','\x20\x20\x20Recommended\x20stable:\x20','belowMinimum','stableVersion','version','npm\x20install\x20-g\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','2465994KazpoB','\x1b[33m','\x20\x20\x20','../..','377512yedxMn','\x20\x20\x20Upgrade\x20command:\x20','427695lVYyAq','parse','minimumVersionMessage','674702tLbyCh','\x1b[1m','log','Minimum\x20supported:\x20','6690228KDvKZw','coerce','\x1b[31m','\x20\x20\x20Stable\x20version:\x20','10BkokZr','1016384HcnbqZ','\x20\x20\x20Minimum\x20supported:\x20','upgradeMessage','latest','Upgrade\x20command:\x20','19981784FCwwyw','minimumVersion','1.0.0','currentVersion','↪\x20New\x20version\x20available','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','filter','Current\x20version:\x20'];a358_0x3df3=function(){return _0x329763;};return a358_0x3df3();}(function(_0x34059a,_0x269497){const _0x4d0f85=a358_0x586a,_0x1f1b49=_0x34059a();while(!![]){try{const _0x560c70=parseInt(_0x4d0f85(0x138))/0x1+parseInt(_0x4d0f85(0x126))/0x2+-parseInt(_0x4d0f85(0x12c))/0x3+-parseInt(_0x4d0f85(0x12a))/0x4*(parseInt(_0x4d0f85(0x137))/0x5)+parseInt(_0x4d0f85(0x133))/0x6+parseInt(_0x4d0f85(0x12f))/0x7+-parseInt(_0x4d0f85(0x13d))/0x8;if(_0x560c70===_0x269497)break;else _0x1f1b49['push'](_0x1f1b49['shift']());}catch(_0x143112){_0x1f1b49['push'](_0x1f1b49['shift']());}}}(a358_0x3df3,0x9a3d1));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a358_0x274b88 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(_0x4f9ae0){const _0x411cb1=a358_0x586a,_0x25d857=_0x4f9ae0[_0x411cb1(0x122)]||_0x411cb1(0x13b);return _0x411cb1(0x124)+NPM_PACKAGE_NAME+'@'+_0x25d857;}function getCurrentCliVersion(){const _0x5ab1c7=a358_0x586a;try{const _0x36538f=fileURLToPath(import.meta.url),_0x2a57a3=resolve(dirname(_0x36538f),_0x5ab1c7(0x129)),_0x5854dc=resolve(_0x2a57a3,'package.json'),_0xb9231b=JSON[_0x5ab1c7(0x12d)](readFileSync(_0x5854dc,'utf-8'));return _0xb9231b[_0x5ab1c7(0x123)]||_0x5ab1c7(0x13f);}catch{return _0x5ab1c7(0x13f);}}function a358_0x586a(_0x50afc8,_0x421818){_0x50afc8=_0x50afc8-0x11f;const _0x3df38b=a358_0x3df3();let _0x586af3=_0x3df38b[_0x50afc8];return _0x586af3;}export async function checkCliVersion(){const _0x21b37c=a358_0x586a,_0x3ea67d=getCurrentCliVersion(),_0x25df38=await getCliVersionPolicy(),_0x59652f=_0x25df38?.[_0x21b37c(0x122)]||null,_0x1cd0e2=_0x25df38?.[_0x21b37c(0x13e)]||null;let _0x4a0fc7=![],_0x5a7108=![];const _0x55fa94=a358_0x274b88['coerce'](_0x3ea67d);if(_0x55fa94&&_0x59652f)try{const _0x2d9a77=a358_0x274b88[_0x21b37c(0x134)](_0x59652f);if(_0x2d9a77)_0x4a0fc7=a358_0x274b88['lt'](_0x55fa94,_0x2d9a77);}catch{}if(_0x55fa94&&_0x1cd0e2)try{const _0x3d94cc=a358_0x274b88['coerce'](_0x1cd0e2);if(_0x3d94cc)_0x5a7108=a358_0x274b88['lt'](_0x55fa94,_0x3d94cc);}catch{}return _0x5a7108&&(_0x4a0fc7=!![]),{'currentVersion':_0x3ea67d,'stableVersion':_0x59652f,'minimumVersion':_0x1cd0e2,'needsUpgrade':_0x4a0fc7,'belowMinimum':_0x5a7108,'isPreRelease':![],'upgradeMessage':_0x25df38?.[_0x21b37c(0x13a)],'minimumVersionMessage':_0x25df38?.[_0x21b37c(0x12e)]};}export function printCliUpgradeWarning(_0x448b57){const _0x1f45a2=a358_0x586a;if(!_0x448b57['needsUpgrade']&&!_0x448b57[_0x1f45a2(0x121)])return;const _0xadb435=_0x1f45a2(0x135),_0x58a0d0=_0x1f45a2(0x127),_0x25c28f='\x1b[0m',_0x5f1246=_0x1f45a2(0x130),_0xec5d94=getCliUpgradeCommand(_0x448b57);console[_0x1f45a2(0x131)](),_0x448b57[_0x1f45a2(0x121)]?(console[_0x1f45a2(0x131)](''+_0xadb435+_0x5f1246+_0x1f45a2(0x125)+_0x25c28f),console[_0x1f45a2(0x131)](_0xadb435+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x448b57[_0x1f45a2(0x140)]+_0x25c28f),_0x448b57[_0x1f45a2(0x13e)]&&console['log'](_0xadb435+_0x1f45a2(0x139)+_0x448b57[_0x1f45a2(0x13e)]+_0x25c28f),_0x448b57['stableVersion']&&_0x448b57[_0x1f45a2(0x122)]!==_0x448b57[_0x1f45a2(0x13e)]&&console[_0x1f45a2(0x131)](_0xadb435+_0x1f45a2(0x120)+_0x448b57[_0x1f45a2(0x122)]+_0x25c28f),_0x448b57[_0x1f45a2(0x12e)]&&console[_0x1f45a2(0x131)](_0xadb435+'\x20\x20\x20'+_0x448b57[_0x1f45a2(0x12e)]+_0x25c28f),console[_0x1f45a2(0x131)](_0xadb435+_0x1f45a2(0x12b)+_0xec5d94+_0x25c28f)):(console['log'](''+_0x58a0d0+_0x5f1246+_0x1f45a2(0x141)+_0x25c28f),console[_0x1f45a2(0x131)](_0x58a0d0+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x448b57['currentVersion']+_0x25c28f),console[_0x1f45a2(0x131)](_0x58a0d0+_0x1f45a2(0x136)+_0x448b57[_0x1f45a2(0x122)]+_0x25c28f),_0x448b57[_0x1f45a2(0x13a)]&&console[_0x1f45a2(0x131)](_0x58a0d0+_0x1f45a2(0x128)+_0x448b57['upgradeMessage']+_0x25c28f),console[_0x1f45a2(0x131)](_0x58a0d0+'\x20\x20\x20Upgrade\x20command:\x20'+_0xec5d94+_0x25c28f)),console[_0x1f45a2(0x131)]();}export function assertCliVersionSupported(_0x4192f){const _0x50d0a2=a358_0x586a;if(!_0x4192f[_0x50d0a2(0x121)])return;const _0x4979af=[_0x4192f[_0x50d0a2(0x12e)],_0x50d0a2(0x144)+_0x4192f[_0x50d0a2(0x140)],_0x4192f[_0x50d0a2(0x13e)]?_0x50d0a2(0x132)+_0x4192f[_0x50d0a2(0x13e)]:null,_0x50d0a2(0x13c)+getCliUpgradeCommand(_0x4192f)][_0x50d0a2(0x143)](Boolean)['join']('\x0a');throw CliErrors[_0x50d0a2(0x11f)](_0x50d0a2(0x142),_0x4979af);}
|