@lovrabet/rabetbase-cli 2.5.3 → 2.5.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.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/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.d.ts +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/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/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/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.d.ts +2 -0
- 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/service.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/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/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.d.ts +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.d.ts +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.d.ts +4 -0
- 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.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- 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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +11 -10
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -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.d.ts +5 -2
- 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.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- 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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +5 -0
- 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 +31 -17
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +33 -11
- package/skills/rabetbase/guides/best-practices.md +1 -1
- package/skills/rabetbase/guides/conflict-detection.md +44 -92
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +642 -0
- package/skills/rabetbase/guides/custom-page-flow-timeline-display.md +289 -0
- package/skills/rabetbase/guides/custom-page-workflow.md +12 -3
- package/skills/rabetbase/guides/sql-creation-workflow.md +44 -26
- package/skills/rabetbase/guides/sql-mybatis.md +18 -49
- package/skills/rabetbase/guides/typescript-sdk.md +18 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +22 -6
- package/skills/rabetbase/knowledge/components.md +34 -28
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +8 -4
- package/skills/rabetbase/references/rabetbase-flow-resources.md +3 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +2 -0
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +14 -4
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +5 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +12 -6
- package/skills/rabetbase.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a322_0x3390b6=a322_0x3745;function a322_0x2e2d(){const _0x15d5c0=['missing','unknown','home','5660544cBfHrJ','absent','skillVersion','length','version','1127626WdvEzX','digest','skills','error','rabetbase\x20cli-skill\x20install','57609kIumZk','every','message','68eHwYiN','rabetbase','update','packageRoot','2956401OgZKCx','7zafESR','schemaVersion','isSymbolicLink','hex','utf8','split',':\x5cs*(.+)$','root','name','current','flatMap','package.json','SKILL.md','2470LABzFS','trim','SOURCE_INVALID','installedPath','manifest','isDirectory','present','files','join','status','path','Symbolic\x20link\x20is\x20not\x20allowed:\x20','reason','state','version_mismatch','unverifiable','skipped','286155BFrwOA','content_mismatch','Installed\x20Skill\x20state\x20is\x20','Unsupported\x20Skill\x20entry:\x20','rabetbase.manifest.json','sort','2217040rxHBfd','VERIFY_FAILED','skills@latest\x20exited\x20','match','isFile','2697432vkudHS','packageVersion'];a322_0x2e2d=function(){return _0x15d5c0;};return a322_0x2e2d();}(function(_0x161685,_0x48d0d6){const _0x2dfe76=a322_0x3745,_0x5024fe=_0x161685();while(!![]){try{const _0x1b796f=-parseInt(_0x2dfe76(0xa4))/0x1+parseInt(_0x2dfe76(0xd5))/0x2+parseInt(_0x2dfe76(0xb0))/0x3+parseInt(_0x2dfe76(0xac))/0x4*(parseInt(_0x2dfe76(0xcf))/0x5)+-parseInt(_0x2dfe76(0x9a))/0x6*(parseInt(_0x2dfe76(0xb1))/0x7)+parseInt(_0x2dfe76(0x9f))/0x8+-parseInt(_0x2dfe76(0xa9))/0x9*(parseInt(_0x2dfe76(0xbe))/0xa);if(_0x1b796f===_0x48d0d6)break;else _0x5024fe['push'](_0x5024fe['shift']());}catch(_0x181ba2){_0x5024fe['push'](_0x5024fe['shift']());}}}(a322_0x2e2d,0x9672d));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{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=a322_0x3390b6(0xa8),SKILL_NAME=a322_0x3390b6(0xad);function a322_0x3745(_0x42cbea,_0x593172){_0x42cbea=_0x42cbea-0x99;const _0x2e2d97=a322_0x2e2d();let _0x37458b=_0x2e2d97[_0x42cbea];return _0x37458b;}function frontmatterValue(_0x3955e4,_0x8d2a88){const _0x11ad17=a322_0x3390b6;return _0x3955e4[_0x11ad17(0xd8)](new RegExp('^'+_0x8d2a88+_0x11ad17(0xb7),'m'))?.[0x1]?.[_0x11ad17(0xbf)]()??'';}function listFiles(_0x3ac96f,_0x1a5c49=_0x3ac96f){const _0x173385=a322_0x3390b6;return readdirSync(_0x1a5c49,{'withFileTypes':!![]})[_0x173385(0xbb)](_0x1c4c4b=>{const _0x20193f=_0x173385,_0x1a23d6=join(_0x1a5c49,_0x1c4c4b[_0x20193f(0xb9)]),_0x547433=lstatSync(_0x1a23d6);if(_0x547433[_0x20193f(0xb3)]())throw new Error(_0x20193f(0xc9)+_0x1a23d6);if(_0x547433[_0x20193f(0xc3)]())return listFiles(_0x3ac96f,_0x1a23d6);if(!_0x547433[_0x20193f(0x99)]())throw new Error(_0x20193f(0xd2)+_0x1a23d6);return[relative(_0x3ac96f,_0x1a23d6)[_0x20193f(0xb6)](sep)[_0x20193f(0xc6)]('/')];})[_0x173385(0xd4)]((_0x2db42c,_0x5e13b3)=>_0x2db42c<_0x5e13b3?-0x1:_0x2db42c>_0x5e13b3?0x1:0x0);}function digestFiles(_0x54121a,_0x23d1bb){const _0x4d56f3=a322_0x3390b6,_0x1db641=createHash('sha256');for(const _0x3e5835 of _0x23d1bb){if(_0x3e5835['startsWith']('/')||_0x3e5835[_0x4d56f3(0xb6)]('/')['includes']('..')||_0x3e5835['includes']('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x3e5835);_0x1db641[_0x4d56f3(0xae)](_0x3e5835),_0x1db641[_0x4d56f3(0xae)]('\x00'),_0x1db641['update'](readFileSync(join(_0x54121a,..._0x3e5835['split']('/')))),_0x1db641[_0x4d56f3(0xae)]('\x00');}return _0x1db641[_0x4d56f3(0xa5)](_0x4d56f3(0xb4));}function sameFiles(_0x4a2d73,_0x2eef7f){const _0x24fe1a=a322_0x3390b6;return _0x4a2d73['length']===_0x2eef7f[_0x24fe1a(0xa2)]&&_0x4a2d73[_0x24fe1a(0xaa)]((_0x1e4ffc,_0x3c5af1)=>_0x1e4ffc===_0x2eef7f[_0x3c5af1]);}function readSource(_0x35dc5a){const _0x1f26bc=a322_0x3390b6,_0x20c3c2=JSON['parse'](readFileSync(join(_0x35dc5a,_0x1f26bc(0xbc)),_0x1f26bc(0xb5))),_0x252d96=JSON['parse'](readFileSync(join(_0x35dc5a,_0x1f26bc(0xa6),_0x1f26bc(0xd3)),_0x1f26bc(0xb5))),_0x2d2400=join(_0x35dc5a,_0x1f26bc(0xa6),SKILL_NAME),_0x5e95ae=frontmatterValue(readFileSync(join(_0x2d2400,_0x1f26bc(0xbd)),_0x1f26bc(0xb5)),_0x1f26bc(0xa3)),_0x6517cb=listFiles(_0x2d2400);if(_0x252d96[_0x1f26bc(0xb2)]!==0x1||_0x252d96[_0x1f26bc(0xb9)]!==SKILL_NAME||!_0x20c3c2[_0x1f26bc(0xa3)]||_0x252d96[_0x1f26bc(0x9b)]!==_0x20c3c2[_0x1f26bc(0xa3)]||_0x252d96['skillVersion']!==_0x20c3c2[_0x1f26bc(0xa3)]||_0x5e95ae!==_0x20c3c2[_0x1f26bc(0xa3)]||!sameFiles(_0x6517cb,_0x252d96[_0x1f26bc(0xc5)])||digestFiles(_0x2d2400,_0x6517cb)!==_0x252d96[_0x1f26bc(0xa5)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x20c3c2[_0x1f26bc(0xa3)],'skillVersion':_0x5e95ae,'root':_0x2d2400,'manifest':_0x252d96};}function installedSkillPath(_0x559799){const _0x4d61f9=a322_0x3390b6,_0x379f00=resolveInstalledSkill(SKILL_NAME,{'home':_0x559799});if(_0x379f00['state']===_0x4d61f9(0xc4))return{'state':_0x4d61f9(0xc4),'path':dirname(_0x379f00[_0x4d61f9(0xc8)])};if(_0x379f00['state']===_0x4d61f9(0xa0))return{'state':_0x4d61f9(0x9c)};return{'state':_0x4d61f9(0xcd),'reason':_0x379f00[_0x4d61f9(0xca)]};}export function inspectInstalledBuiltinSkillVersion(_0x23b20d,_0xae70d8={}){const _0x5065cc=a322_0x3390b6,_0x560a59=installedSkillPath(_0xae70d8[_0x5065cc(0x9e)]??homedir());if(_0x560a59[_0x5065cc(0xcb)]===_0x5065cc(0x9c))return{'state':_0x5065cc(0x9c),'expectedVersion':_0x23b20d,'repairCommand':REPAIR_COMMAND};if(_0x560a59[_0x5065cc(0xcb)]===_0x5065cc(0xcd))return{'state':_0x5065cc(0xcd),'expectedVersion':_0x23b20d,'reason':_0x560a59[_0x5065cc(0xca)],'repairCommand':REPAIR_COMMAND};try{const _0x528e12=frontmatterValue(readFileSync(join(_0x560a59[_0x5065cc(0xc8)],_0x5065cc(0xbd)),'utf8'),_0x5065cc(0xa3));return{'state':_0x528e12===_0x23b20d?_0x5065cc(0xba):_0x5065cc(0xcc),'expectedVersion':_0x23b20d,'skillVersion':_0x528e12,'installedPath':_0x560a59['path'],'repairCommand':REPAIR_COMMAND};}catch(_0x956021){return{'state':_0x5065cc(0xcd),'expectedVersion':_0x23b20d,'installedPath':_0x560a59['path'],'reason':_0x956021 instanceof Error?_0x956021[_0x5065cc(0xab)]:String(_0x956021),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x228428={}){const _0x3be9a5=a322_0x3390b6,_0x38f7f8=_0x228428[_0x3be9a5(0xaf)]??DEFAULT_PACKAGE_ROOT;let _0x23e0fd;try{_0x23e0fd=readSource(_0x38f7f8);}catch(_0x1f9a0a){return{'state':'unverifiable','packageVersion':_0x3be9a5(0x9d),'reason':_0x1f9a0a instanceof Error?_0x1f9a0a[_0x3be9a5(0xab)]:String(_0x1f9a0a),'repairCommand':REPAIR_COMMAND};}const _0x466f36=installedSkillPath(_0x228428[_0x3be9a5(0x9e)]??homedir());if(_0x466f36[_0x3be9a5(0xcb)]===_0x3be9a5(0x9c))return{'state':_0x3be9a5(0x9c),'packageVersion':_0x23e0fd[_0x3be9a5(0x9b)],'repairCommand':REPAIR_COMMAND};if(_0x466f36[_0x3be9a5(0xcb)]===_0x3be9a5(0xcd))return{'state':_0x3be9a5(0xcd),'packageVersion':_0x23e0fd[_0x3be9a5(0x9b)],'reason':_0x466f36[_0x3be9a5(0xca)],'repairCommand':REPAIR_COMMAND};try{const _0x27eda1=frontmatterValue(readFileSync(join(_0x466f36['path'],_0x3be9a5(0xbd)),'utf8'),_0x3be9a5(0xa3));if(_0x27eda1!==_0x23e0fd['skillVersion'])return{'state':'version_mismatch','packageVersion':_0x23e0fd[_0x3be9a5(0x9b)],'skillVersion':_0x27eda1,'installedPath':_0x466f36[_0x3be9a5(0xc8)],'repairCommand':REPAIR_COMMAND};const _0x12137=listFiles(_0x466f36[_0x3be9a5(0xc8)]),_0x178033=digestFiles(_0x466f36[_0x3be9a5(0xc8)],_0x12137);return{'state':sameFiles(_0x12137,_0x23e0fd['manifest'][_0x3be9a5(0xc5)])&&_0x178033===_0x23e0fd[_0x3be9a5(0xc2)][_0x3be9a5(0xa5)]?_0x3be9a5(0xba):_0x3be9a5(0xd0),'packageVersion':_0x23e0fd[_0x3be9a5(0x9b)],'skillVersion':_0x27eda1,'installedPath':_0x466f36[_0x3be9a5(0xc8)],'digest':_0x178033,'repairCommand':REPAIR_COMMAND};}catch(_0x5764bf){return{'state':_0x3be9a5(0xcd),'packageVersion':_0x23e0fd['packageVersion'],'installedPath':_0x466f36['path'],'reason':_0x5764bf instanceof Error?_0x5764bf[_0x3be9a5(0xab)]:String(_0x5764bf),'repairCommand':REPAIR_COMMAND};}}function failure(_0x2fb83e,_0x551f29,_0xea7700,_0x26b21e){const _0xb01fd2=a322_0x3390b6;return{'ok':![],'code':_0x2fb83e,'packageVersion':_0x551f29[_0xb01fd2(0x9b)],'skillVersion':_0x551f29[_0xb01fd2(0xa1)],'installedPath':_0x26b21e,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0xea7700 instanceof Error?_0xea7700[_0xb01fd2(0xab)]:String(_0xea7700)};}export function installBuiltinSkill(_0x35d5d6={}){const _0x36b719=a322_0x3390b6,_0x1f2d39=_0x35d5d6['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x1fb282=_0x35d5d6['home']??homedir();let _0x2d3d42;try{_0x2d3d42=readSource(_0x1f2d39);}catch(_0xf2f368){return failure(_0x36b719(0xc0),{'packageVersion':'unknown','skillVersion':_0x36b719(0x9d)},_0xf2f368);}const _0x30eb99=inspectBuiltinSkill({'packageRoot':_0x1f2d39,'home':_0x1fb282}),_0x3098c0=runNpxSkillsAddGlobal(_0x1f2d39,_0x2d3d42[_0x36b719(0xb8)],{'stdio':_0x35d5d6['stdio']??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x1fb282}});if(_0x3098c0[_0x36b719(0xce)])return{'ok':!![],'packageVersion':_0x2d3d42['packageVersion'],'skillVersion':_0x2d3d42[_0x36b719(0xa1)],'installedPath':_0x30eb99[_0x36b719(0xc1)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3098c0['ok'])return failure('INSTALL_FAILED',_0x2d3d42,_0x3098c0[_0x36b719(0xa7)]??_0x36b719(0xd7)+_0x3098c0[_0x36b719(0xc7)]);const _0x470a97=inspectBuiltinSkill({'packageRoot':_0x1f2d39,'home':_0x1fb282});if(_0x470a97[_0x36b719(0xcb)]!==_0x36b719(0xba))return failure(_0x36b719(0xd6),_0x2d3d42,_0x470a97['reason']??_0x36b719(0xd1)+_0x470a97[_0x36b719(0xcb)],_0x470a97[_0x36b719(0xc1)]);return{'ok':!![],'packageVersion':_0x2d3d42['packageVersion'],'skillVersion':_0x2d3d42[_0x36b719(0xa1)],'installedPath':_0x470a97[_0x36b719(0xc1)],'changed':_0x30eb99[_0x36b719(0xcb)]!==_0x36b719(0xba),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a322_0x136cdc=a322_0x4c44;(function(_0xf423bd,_0x50fa56){const _0x5cc27a=a322_0x4c44,_0x15fc49=_0xf423bd();while(!![]){try{const _0x45d02c=-parseInt(_0x5cc27a(0x1dc))/0x1+parseInt(_0x5cc27a(0x1b3))/0x2+-parseInt(_0x5cc27a(0x1b0))/0x3+parseInt(_0x5cc27a(0x1ac))/0x4+-parseInt(_0x5cc27a(0x1a3))/0x5*(parseInt(_0x5cc27a(0x1c8))/0x6)+parseInt(_0x5cc27a(0x1b6))/0x7*(parseInt(_0x5cc27a(0x1ce))/0x8)+parseInt(_0x5cc27a(0x1a7))/0x9*(parseInt(_0x5cc27a(0x1a4))/0xa);if(_0x45d02c===_0x50fa56)break;else _0x15fc49['push'](_0x15fc49['shift']());}catch(_0x588bed){_0x15fc49['push'](_0x15fc49['shift']());}}}(a322_0x4990,0x39e6d));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';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a322_0x136cdc(0x1e2),SKILL_NAME=a322_0x136cdc(0x1c9),debug=debuglog(a322_0x136cdc(0x1e7));function frontmatterValue(_0x293df9,_0x4348a5){const _0x229b18=a322_0x136cdc;return _0x293df9['match'](new RegExp('^'+_0x4348a5+_0x229b18(0x1be),'m'))?.[0x1]?.[_0x229b18(0x1c2)]()??'';}function listFiles(_0x433487,_0x15135c=_0x433487){const _0x24dbc9=a322_0x136cdc;return readdirSync(_0x15135c,{'withFileTypes':!![]})[_0x24dbc9(0x1c4)](_0xa3c2bb=>{const _0xc75865=_0x24dbc9,_0x5cb35a=join(_0x15135c,_0xa3c2bb[_0xc75865(0x1e5)]),_0x352540=lstatSync(_0x5cb35a);if(_0x352540['isSymbolicLink']())throw new Error(_0xc75865(0x1d2)+_0x5cb35a);if(_0x352540['isDirectory']())return listFiles(_0x433487,_0x5cb35a);if(!_0x352540[_0xc75865(0x1cf)]())throw new Error(_0xc75865(0x1cc)+_0x5cb35a);return[relative(_0x433487,_0x5cb35a)['split'](sep)[_0xc75865(0x1bd)]('/')];})[_0x24dbc9(0x1d1)]((_0x3e6def,_0x530a0d)=>_0x3e6def<_0x530a0d?-0x1:_0x3e6def>_0x530a0d?0x1:0x0);}function digestFiles(_0xb52023,_0x4afb91){const _0x50cc73=a322_0x136cdc,_0x361f62=createHash(_0x50cc73(0x1db));for(const _0x37dbed of _0x4afb91){if(_0x37dbed[_0x50cc73(0x1da)]('/')||_0x37dbed[_0x50cc73(0x1bb)]('/')['includes']('..')||_0x37dbed[_0x50cc73(0x1a0)]('\x5c'))throw new Error(_0x50cc73(0x1b1)+_0x37dbed);_0x361f62[_0x50cc73(0x1a8)](_0x37dbed),_0x361f62[_0x50cc73(0x1a8)]('\x00'),_0x361f62[_0x50cc73(0x1a8)](readFileSync(join(_0xb52023,..._0x37dbed['split']('/')))),_0x361f62[_0x50cc73(0x1a8)]('\x00');}return _0x361f62['digest']('hex');}function sameFiles(_0x75b41f,_0x32ba90){const _0x476473=a322_0x136cdc;return _0x75b41f[_0x476473(0x1b7)]===_0x32ba90[_0x476473(0x1b7)]&&_0x75b41f['every']((_0x508bb9,_0x1d64b6)=>_0x508bb9===_0x32ba90[_0x1d64b6]);}function readSource(_0x16befb){const _0x4e5bea=a322_0x136cdc,_0x501380=JSON[_0x4e5bea(0x1b4)](readFileSync(join(_0x16befb,_0x4e5bea(0x1d9)),_0x4e5bea(0x1e9))),_0x329f65=JSON['parse'](readFileSync(join(_0x16befb,_0x4e5bea(0x1ca),'rabetbase.manifest.json'),'utf8')),_0x47612b=join(_0x16befb,_0x4e5bea(0x1ca),SKILL_NAME),_0x5df50d=frontmatterValue(readFileSync(join(_0x47612b,_0x4e5bea(0x1a1)),_0x4e5bea(0x1e9)),'version'),_0x58d3af=listFiles(_0x47612b);if(_0x329f65[_0x4e5bea(0x1b5)]!==0x1||_0x329f65['name']!==SKILL_NAME||!_0x501380[_0x4e5bea(0x1aa)]||_0x329f65[_0x4e5bea(0x1de)]!==_0x501380[_0x4e5bea(0x1aa)]||_0x329f65[_0x4e5bea(0x1ae)]!==_0x501380[_0x4e5bea(0x1aa)]||_0x5df50d!==_0x501380[_0x4e5bea(0x1aa)]||!sameFiles(_0x58d3af,_0x329f65['files'])||digestFiles(_0x47612b,_0x58d3af)!==_0x329f65['digest'])throw new Error(_0x4e5bea(0x1df));return{'packageVersion':_0x501380['version'],'skillVersion':_0x5df50d,'root':_0x47612b,'manifest':_0x329f65};}function installedSkillPath(_0x511d1e){const _0x50b366=a322_0x136cdc,_0x2fd63f=resolveInstalledSkill(SKILL_NAME,{'home':_0x511d1e});if(_0x2fd63f[_0x50b366(0x1d7)]===_0x50b366(0x1e1))return{'state':_0x50b366(0x1e1),'path':dirname(_0x2fd63f['path'])};if(_0x2fd63f[_0x50b366(0x1d7)]===_0x50b366(0x1bf))return{'state':'missing'};return{'state':_0x50b366(0x1d3),'reason':_0x2fd63f[_0x50b366(0x1ad)]};}export function inspectInstalledBuiltinSkillVersion(_0x3b2e1a,_0x4e9599={}){const _0x49a614=a322_0x136cdc,_0x333d20=installedSkillPath(_0x4e9599[_0x49a614(0x1e3)]??homedir());if(_0x333d20[_0x49a614(0x1d7)]==='missing')return{'state':_0x49a614(0x1b2),'expectedVersion':_0x3b2e1a,'repairCommand':REPAIR_COMMAND};if(_0x333d20[_0x49a614(0x1d7)]===_0x49a614(0x1d3))return{'state':_0x49a614(0x1d3),'expectedVersion':_0x3b2e1a,'reason':_0x333d20['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x1932a3=frontmatterValue(readFileSync(join(_0x333d20['path'],_0x49a614(0x1a1)),_0x49a614(0x1e9)),_0x49a614(0x1aa));return{'state':_0x1932a3===_0x3b2e1a?_0x49a614(0x1c7):_0x49a614(0x1c0),'expectedVersion':_0x3b2e1a,'skillVersion':_0x1932a3,'installedPath':_0x333d20[_0x49a614(0x1c5)],'repairCommand':REPAIR_COMMAND};}catch(_0x53b1d1){return{'state':_0x49a614(0x1d3),'expectedVersion':_0x3b2e1a,'installedPath':_0x333d20[_0x49a614(0x1c5)],'reason':_0x53b1d1 instanceof Error?_0x53b1d1['message']:String(_0x53b1d1),'repairCommand':REPAIR_COMMAND};}}function a322_0x4990(){const _0xbe1730=['pipe','15WCbDXv','51620PTSSzr','error','count','279aAhbIE','update','unknown','version','status','953044znbxEv','reason','skillVersion','message','1203579cJHKNu','Unsafe\x20manifest\x20path:\x20','missing','370504SkohzF','parse','schemaVersion','2953517fkcHFb','length','CLI\x20Built-in\x20Skill\x20','\x20verified;\x20','SOURCE_INVALID','split','partialFailure','join',':\x5cs*(.+)$','absent','version_mismatch','files','trim','VERIFY_FAILED','flatMap','path','skipped','current','53796VyhOGd','rabetbase','skills','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','Unsupported\x20Skill\x20entry:\x20','manifest','8YRLoZI','isFile','digest','sort','Symbolic\x20link\x20is\x20not\x20allowed:\x20','unverifiable','packageRoot','content_mismatch','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','state','Installed\x20Skill\x20state\x20is\x20','package.json','startsWith','sha256','340210ZRmVQa','root','packageVersion','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','output','present','rabetbase\x20cli-skill\x20install','home','INSTALL_FAILED','name','installedPath','rabetbase-skills','log','utf8','includes','SKILL.md'];a322_0x4990=function(){return _0xbe1730;};return a322_0x4990();}export function inspectBuiltinSkill(_0x5bfe34={}){const _0x201755=a322_0x136cdc,_0x2e4249=_0x5bfe34[_0x201755(0x1d4)]??DEFAULT_PACKAGE_ROOT;let _0x6293c7;try{_0x6293c7=readSource(_0x2e4249);}catch(_0x156739){return{'state':_0x201755(0x1d3),'packageVersion':'unknown','reason':_0x156739 instanceof Error?_0x156739['message']:String(_0x156739),'repairCommand':REPAIR_COMMAND};}const _0x3f387e=installedSkillPath(_0x5bfe34[_0x201755(0x1e3)]??homedir());if(_0x3f387e[_0x201755(0x1d7)]===_0x201755(0x1b2))return{'state':_0x201755(0x1b2),'packageVersion':_0x6293c7[_0x201755(0x1de)],'repairCommand':REPAIR_COMMAND};if(_0x3f387e['state']===_0x201755(0x1d3))return{'state':_0x201755(0x1d3),'packageVersion':_0x6293c7[_0x201755(0x1de)],'reason':_0x3f387e[_0x201755(0x1ad)],'repairCommand':REPAIR_COMMAND};try{const _0x36434d=frontmatterValue(readFileSync(join(_0x3f387e['path'],'SKILL.md'),_0x201755(0x1e9)),_0x201755(0x1aa));if(_0x36434d!==_0x6293c7['skillVersion'])return{'state':_0x201755(0x1c0),'packageVersion':_0x6293c7[_0x201755(0x1de)],'skillVersion':_0x36434d,'installedPath':_0x3f387e['path'],'repairCommand':REPAIR_COMMAND};const _0x5e08cc=listFiles(_0x3f387e[_0x201755(0x1c5)]),_0x4d8f74=digestFiles(_0x3f387e['path'],_0x5e08cc);return{'state':sameFiles(_0x5e08cc,_0x6293c7[_0x201755(0x1cd)][_0x201755(0x1c1)])&&_0x4d8f74===_0x6293c7[_0x201755(0x1cd)][_0x201755(0x1d0)]?_0x201755(0x1c7):_0x201755(0x1d5),'packageVersion':_0x6293c7[_0x201755(0x1de)],'skillVersion':_0x36434d,'installedPath':_0x3f387e['path'],'digest':_0x4d8f74,'repairCommand':REPAIR_COMMAND};}catch(_0x558203){return{'state':'unverifiable','packageVersion':_0x6293c7[_0x201755(0x1de)],'installedPath':_0x3f387e[_0x201755(0x1c5)],'reason':_0x558203 instanceof Error?_0x558203['message']:String(_0x558203),'repairCommand':REPAIR_COMMAND};}}function a322_0x4c44(_0x27667f,_0x3644c9){_0x27667f=_0x27667f-0x1a0;const _0x49907d=a322_0x4990();let _0x4c4447=_0x49907d[_0x27667f];return _0x4c4447;}function failure(_0x41a57a,_0x321ef4,_0x1966f0,_0x164f5b){const _0x370049=a322_0x136cdc;return{'ok':![],'code':_0x41a57a,'packageVersion':_0x321ef4[_0x370049(0x1de)],'skillVersion':_0x321ef4[_0x370049(0x1ae)],'installedPath':_0x164f5b,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x1966f0 instanceof Error?_0x1966f0[_0x370049(0x1af)]:String(_0x1966f0)};}export function installBuiltinSkill(_0x4c0bec={}){const _0x4e32cf=a322_0x136cdc,_0x3746ed=_0x4c0bec[_0x4e32cf(0x1d4)]??DEFAULT_PACKAGE_ROOT,_0x1ed05d=_0x4c0bec[_0x4e32cf(0x1e3)]??homedir();let _0x1dcecf;try{_0x1dcecf=readSource(_0x3746ed);}catch(_0x24926){return failure(_0x4e32cf(0x1ba),{'packageVersion':_0x4e32cf(0x1a9),'skillVersion':_0x4e32cf(0x1a9)},_0x24926);}const _0x470750=inspectBuiltinSkill({'packageRoot':_0x3746ed,'home':_0x1ed05d}),_0x38f78f=runNpxSkillsAddGlobal(_0x3746ed,_0x1dcecf[_0x4e32cf(0x1dd)],{'stdio':_0x4c0bec['stdio']??_0x4e32cf(0x1a2),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x1ed05d}});if(_0x38f78f[_0x4e32cf(0x1c6)])return{'ok':!![],'packageVersion':_0x1dcecf[_0x4e32cf(0x1de)],'skillVersion':_0x1dcecf['skillVersion'],'installedPath':_0x470750[_0x4e32cf(0x1e6)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x38f78f['ok'])return failure(_0x4e32cf(0x1e4),_0x1dcecf,_0x38f78f[_0x4e32cf(0x1a5)]??'skills@latest\x20exited\x20'+_0x38f78f[_0x4e32cf(0x1ab)]);const _0x11c78f=inspectBuiltinSkill({'packageRoot':_0x3746ed,'home':_0x1ed05d});if(_0x11c78f[_0x4e32cf(0x1d7)]!==_0x4e32cf(0x1c7)){const _0x3ab1c1=_0x11c78f[_0x4e32cf(0x1ad)]??_0x4e32cf(0x1d8)+_0x11c78f['state'];return failure(_0x4e32cf(0x1c3),_0x1dcecf,_0x38f78f[_0x4e32cf(0x1bc)]?_0x3ab1c1+'\x0a'+_0x38f78f[_0x4e32cf(0x1bc)][_0x4e32cf(0x1e0)]:_0x3ab1c1,_0x11c78f['installedPath']);}return _0x38f78f[_0x4e32cf(0x1bc)]&&(debug(_0x4e32cf(0x1d6),_0x38f78f[_0x4e32cf(0x1bc)][_0x4e32cf(0x1e0)]),console[_0x4e32cf(0x1e8)](_0x4e32cf(0x1b8)+_0x1dcecf[_0x4e32cf(0x1ae)]+_0x4e32cf(0x1b9)+_0x38f78f[_0x4e32cf(0x1bc)][_0x4e32cf(0x1a6)]+_0x4e32cf(0x1cb))),{'ok':!![],'packageVersion':_0x1dcecf[_0x4e32cf(0x1de)],'skillVersion':_0x1dcecf[_0x4e32cf(0x1ae)],'installedPath':_0x11c78f[_0x4e32cf(0x1e6)],'changed':_0x470750[_0x4e32cf(0x1d7)]!==_0x4e32cf(0x1c7),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1355ed,_0x351998){const _0x2c98f5=a323_0x43e0,_0x4ca2a8=_0x1355ed();while(!![]){try{const _0x469329=-parseInt(_0x2c98f5(0x1ca))/0x1*(parseInt(_0x2c98f5(0x1d3))/0x2)+parseInt(_0x2c98f5(0x1ec))/0x3*(parseInt(_0x2c98f5(0x1e1))/0x4)+parseInt(_0x2c98f5(0x1c9))/0x5*(parseInt(_0x2c98f5(0x1d0))/0x6)+-parseInt(_0x2c98f5(0x1de))/0x7+parseInt(_0x2c98f5(0x1d8))/0x8+parseInt(_0x2c98f5(0x1cf))/0x9*(-parseInt(_0x2c98f5(0x1ce))/0xa)+parseInt(_0x2c98f5(0x1df))/0xb*(parseInt(_0x2c98f5(0x1e8))/0xc);if(_0x469329===_0x351998)break;else _0x4ca2a8['push'](_0x4ca2a8['shift']());}catch(_0x59f6cd){_0x4ca2a8['push'](_0x4ca2a8['shift']());}}}(a323_0x31f5,0x8f006));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x37d8b6){const _0x2489cb=a323_0x43e0,_0x293dcc=[];for(const [_0x178a8e,_0x4a1f8a]of Object[_0x2489cb(0x1e2)](_0x37d8b6)){if(_0x4a1f8a===!![]){const _0x4c467c=_0x178a8e['replace'](/([A-Z])/g,'-$1')[_0x2489cb(0x1db)]();_0x293dcc[_0x2489cb(0x1d2)](_0x4c467c);}}return _0x293dcc;}export function parseDynamicFlags(){const _0x111571=a323_0x43e0,_0x3e8401=[];for(let _0x2a86c2=0x3;_0x2a86c2<process['argv'][_0x111571(0x1c8)];_0x2a86c2++){const _0x2cba1e=process[_0x111571(0x1cc)][_0x2a86c2];if(_0x2cba1e&&_0x2cba1e[_0x111571(0x1e5)]('--')){const _0x2c16b4=_0x2cba1e[_0x111571(0x1da)](0x2);_0x2c16b4&&!_0x2c16b4[_0x111571(0x1dd)]('=')&&_0x3e8401['push'](_0x2c16b4);}}return _0x3e8401;}export function getAllProvidedFlags(_0x1edec6){const _0x24d7ac=a323_0x43e0,_0x4d6f40=camelCaseFlagsToKebab(_0x1edec6),_0xf6d657=parseDynamicFlags(),_0x2c2d0e=new Set([..._0x4d6f40,..._0xf6d657]);return Array[_0x24d7ac(0x1e6)](_0x2c2d0e);}function a323_0x31f5(){const _0x32b1f2=['\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','dangerously-bff-save','has','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','3330240fYVwGv','cwd','slice','toLowerCase','--help','includes','1670634ZNoIWe','293557lYdoHi','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','130220RrBfoi','entries','Error:\x20Unsupported\x20command:\x20','Unsupported\x20command:\x20','startsWith','from','help','216dZXxqX','setLogPath','(empty)','\x0aAvailable\x20commands:','39bRiNNt','length','35YpPtIV','5946KwaNdz','log','argv','exit','280ttqxix','50238dJZGgN','514542FnUUVm','Public\x20Open\x20Skill\x20source:\x20','push','316hRAtZc'];a323_0x31f5=function(){return _0x32b1f2;};return a323_0x31f5();}export function normalizeLegacyBffSaveFlags(_0x131ccc){const _0x4a0cf8=a323_0x43e0,_0x1d00aa=new Set(_0x131ccc);return _0x1d00aa[_0x4a0cf8(0x1d6)](_0x4a0cf8(0x1d5))&&_0x1d00aa['add']('enable-bff-save'),Array[_0x4a0cf8(0x1e6)](_0x1d00aa);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a323_0x43e0(_0x4e08a7,_0x5c0ebb){_0x4e08a7=_0x4e08a7-0x1c8;const _0x31f5b7=a323_0x31f5();let _0x43e0e8=_0x31f5b7[_0x4e08a7];return _0x43e0e8;}export async function skillsCommand(_0x3c19ed,_0x285638,_0x2f598){const _0x42788a=a323_0x43e0;logger[_0x42788a(0x1e9)](process[_0x42788a(0x1d9)]());if(_0x2f598?.[_0x42788a(0x1e7)]||_0x3c19ed===_0x42788a(0x1dc)){showHelp();return;}console['error'](_0x42788a(0x1e3)+(_0x3c19ed||_0x42788a(0x1ea))),console['log'](_0x42788a(0x1eb)),console[_0x42788a(0x1cb)]('\x20\x20'+CLI_BIN_NAME+_0x42788a(0x1d7)),console[_0x42788a(0x1cb)](''),console[_0x42788a(0x1cb)](_0x42788a(0x1d1)+SKILLS_INSTALL_COMMAND_LINE),logger['error']('skill',_0x42788a(0x1e4)+_0x3c19ed),process[_0x42788a(0x1cd)](0x1);}function showHelp(){const _0x4d77e1=a323_0x43e0;console[_0x4d77e1(0x1cb)](_0x4d77e1(0x1d4)+CLI_BIN_NAME+'\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20'+SKILLS_INSTALL_COMMAND_LINE+_0x4d77e1(0x1e0));}
|
|
@@ -51,6 +51,11 @@ export interface RunNpxSkillsAddResult {
|
|
|
51
51
|
status: number | null;
|
|
52
52
|
code?: NpxSkillsErrorCode;
|
|
53
53
|
error?: string;
|
|
54
|
+
/** 自动目标部分失败但产物存在;调用方完成内容校验后再决定最终展示。 */
|
|
55
|
+
partialFailure?: {
|
|
56
|
+
count: number;
|
|
57
|
+
output: string;
|
|
58
|
+
};
|
|
54
59
|
/** 未执行 npx(RABETBASE_SKIP_NPX_SKILLS=1),仅用于测试或离线假定已安装 */
|
|
55
60
|
skipped?: boolean;
|
|
56
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a324_0x48a031=a324_0x45c4;(function(_0x14fa9e,_0x4ce47e){const _0x22f183=a324_0x45c4,_0x412d86=_0x14fa9e();while(!![]){try{const _0x13f2cf=parseInt(_0x22f183(0x127))/0x1*(parseInt(_0x22f183(0x11d))/0x2)+parseInt(_0x22f183(0x13b))/0x3*(parseInt(_0x22f183(0x136))/0x4)+parseInt(_0x22f183(0x13c))/0x5*(-parseInt(_0x22f183(0x110))/0x6)+parseInt(_0x22f183(0x11f))/0x7*(-parseInt(_0x22f183(0x142))/0x8)+-parseInt(_0x22f183(0x12a))/0x9*(-parseInt(_0x22f183(0x114))/0xa)+-parseInt(_0x22f183(0x130))/0xb+parseInt(_0x22f183(0x12e))/0xc;if(_0x13f2cf===_0x4ce47e)break;else _0x412d86['push'](_0x412d86['shift']());}catch(_0x225951){_0x412d86['push'](_0x412d86['shift']());}}}(a324_0x31f7,0xd105e));import{execaSync}from'execa';import{resolveInstalledSkill}from'../skills/skill-presence.js';function a324_0x45c4(_0x173d33,_0x1202ac){_0x173d33=_0x173d33-0x10f;const _0x31f790=a324_0x31f7();let _0x45c47c=_0x31f790[_0x173d33];return _0x45c47c;}export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a324_0x48a031(0x12b);export const NPX_SKILLS_SUBCOMMAND_ADD=a324_0x48a031(0x111);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a324_0x48a031(0x145);export const RABETBASE_GLOBAL_SKILL_NAME=a324_0x48a031(0x134);function a324_0x31f7(){const _0x24729c=['state','signal','presence','1682958jmvaEI','unverifiable','747145qeAxnc','stdout','INSTALL_PARTIAL','warn','push','pipe','ENOENT','message','1hLnhnj','PERMISSION_DENIED','CHILD_EXIT_NONZERO','1908ByKfCH','skills@latest','unknown','EPERM','8380416NVEncL','code','10004005qyhvoZ','log','present','npx','rabetbase','filter','1215176RIQvZu','partialFailure','exit\x20','join','CHILD_TERMINATED','15NsaGTz','1159825BvQHjV','exitCode','npm_config_global','failed','Installer\x20reported\x20','SKILL_NOT_INSTALLED','80PCkpPk','match','SPAWN_FAILED','lovrabet/rabetbase','expectedSkillName','12HJEBiO','add','stdio','npx\x20failed\x20to\x20start','11230ethQCP','shortMessage','trim','inherit','NPX_NOT_FOUND','skill'];a324_0x31f7=function(){return _0x24729c;};return a324_0x31f7();}export const RABETBASE_SKILL_GIT_SOURCE='git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git';export function resolveGlobalSkillName(_0x461da8){switch(_0x461da8['trim']()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x1d087b){const _0x3752e5=a324_0x48a031,_0xd2c18f=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x1d087b&&_0xd2c18f[_0x3752e5(0x123)](NPX_SKILLS_FLAG_SKILL,_0x1d087b),_0xd2c18f;}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()][a324_0x48a031(0x139)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a324_0x48a031(0x133),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a324_0x48a031(0x139)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x50fddd,_0x2e676c,_0xc352e6){return{'ok':![],'status':_0x2e676c,'code':_0x50fddd,'error':'['+_0x50fddd+']\x20'+_0xc352e6};}function execaOptions(_0xc78c0e,_0x2ad897){const _0x541ab8=a324_0x48a031,_0x3ddd76={...process.env};return delete _0x3ddd76[_0x541ab8(0x13e)],delete _0x3ddd76['NPM_CONFIG_GLOBAL'],{'cwd':_0xc78c0e,'stdio':_0x2ad897,'env':_0x3ddd76,'extendEnv':![],'shell':![],'reject':![],..._0x2ad897===_0x541ab8(0x124)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x3464a1,_0x24e233,_0x57afad){const _0x401a15=a324_0x48a031,_0x59d291=[_0x3464a1['stdout']?String(_0x3464a1[_0x401a15(0x120)]):'',_0x3464a1['stderr']?String(_0x3464a1['stderr']):'']['filter'](Boolean)['join']('\x0a')[_0x401a15(0x116)](),_0x2f51bd=_0x3464a1[_0x401a15(0x13d)]??null;if(_0x3464a1[_0x401a15(0x12f)]){const _0x820ef7=_0x3464a1[_0x401a15(0x12f)]===_0x401a15(0x125)?_0x401a15(0x118):_0x3464a1[_0x401a15(0x12f)]===_0x401a15(0x12d)||_0x3464a1[_0x401a15(0x12f)]==='EACCES'?_0x401a15(0x128):'SPAWN_FAILED';return failure(_0x820ef7,_0x2f51bd,_0x3464a1[_0x401a15(0x115)]??_0x3464a1[_0x401a15(0x126)]??_0x3464a1[_0x401a15(0x12f)]);}if(_0x3464a1[_0x401a15(0x11b)])return failure(_0x401a15(0x13a),_0x2f51bd,'npx\x20terminated\x20by\x20signal\x20'+_0x3464a1[_0x401a15(0x11b)]);if(_0x3464a1[_0x401a15(0x13f)]&&_0x2f51bd===null)return failure(_0x401a15(0x144),_0x2f51bd,_0x3464a1['shortMessage']??_0x3464a1[_0x401a15(0x126)]??_0x401a15(0x113));if(_0x2f51bd!==0x0)return failure(_0x401a15(0x129),_0x2f51bd,_0x59d291||_0x3464a1[_0x401a15(0x115)]||_0x401a15(0x138)+(_0x2f51bd??_0x401a15(0x12c)));const _0x44fd4f=_0x24e233?resolveInstalledSkill(_0x24e233,_0x57afad):undefined,_0x398aed=_0x59d291[_0x401a15(0x143)](/Failed to install\s+(\d+)/i);if(_0x398aed&&Number(_0x398aed[0x1])>0x0){const _0x552dd4=_0x401a15(0x140)+_0x398aed[0x1]+'\x20failed\x20target(s)'+(_0x59d291?':\x0a'+_0x59d291:'');if(_0x44fd4f?.[_0x401a15(0x11a)]===_0x401a15(0x132))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x398aed[0x1]),'output':_0x59d291}};return failure(_0x401a15(0x121),0x0,_0x552dd4);}if(_0x44fd4f){if(_0x44fd4f[_0x401a15(0x11a)]==='absent')return failure(_0x401a15(0x141),0x0,'Skill\x20\x22'+_0x24e233+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x44fd4f['checked'][_0x401a15(0x139)](',\x20')+')');_0x44fd4f['state']===_0x401a15(0x11e)&&console[_0x401a15(0x122)]('!\x20Could\x20not\x20verify\x20\x22'+_0x24e233+'\x22\x20install\x20state:\x20'+_0x44fd4f['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x331f3c,_0x2aa4c7){const _0x579579=a324_0x48a031;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3581ac=_0x2aa4c7?.[_0x579579(0x112)]??_0x579579(0x117),_0x5b06e0=buildNpxSkillsAddArgv(_0x2aa4c7?.[_0x579579(0x119)]),_0x5c78cc=[_0x579579(0x133),..._0x5b06e0][_0x579579(0x139)]('\x20');console[_0x579579(0x131)]('*\x20'+_0x5c78cc);const _0x5a2058=execaSync(_0x579579(0x133),_0x5b06e0,execaOptions(_0x331f3c,_0x3581ac));return normalizeExecaResult(_0x5a2058);}export function runNpxSkillsAddGlobal(_0x472042,_0x32b672,_0x29ee56){const _0x14b9c1=a324_0x48a031;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x248961=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x32b672,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x151cc5=[_0x14b9c1(0x133),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x32b672,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x14b9c1(0x139)]('\x20');console[_0x14b9c1(0x131)]('*\x20'+_0x151cc5);const _0x232b77=execaSync(_0x14b9c1(0x133),_0x248961,execaOptions(_0x472042,_0x14b9c1(0x124))),_0x28d6f1=normalizeExecaResult(_0x232b77,_0x29ee56?.[_0x14b9c1(0x10f)]??resolveGlobalSkillName(_0x32b672),_0x29ee56?.[_0x14b9c1(0x11c)]);if(_0x29ee56?.[_0x14b9c1(0x112)]!=='pipe'&&!_0x28d6f1[_0x14b9c1(0x137)]){const _0x5a9a91=[_0x232b77[_0x14b9c1(0x120)],_0x232b77['stderr']][_0x14b9c1(0x135)](Boolean)[_0x14b9c1(0x139)]('\x0a')[_0x14b9c1(0x116)]();if(_0x5a9a91)console[_0x14b9c1(0x131)](_0x5a9a91);}return _0x28d6f1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a325_0x2dc0b2=a325_0x2a1f;(function(_0x4603e8,_0x225f1e){const _0x5eb849=a325_0x2a1f,_0x23dec3=_0x4603e8();while(!![]){try{const _0x37dbd9=parseInt(_0x5eb849(0xb1))/0x1+-parseInt(_0x5eb849(0xa3))/0x2*(-parseInt(_0x5eb849(0x9e))/0x3)+parseInt(_0x5eb849(0xa7))/0x4*(parseInt(_0x5eb849(0xa9))/0x5)+parseInt(_0x5eb849(0xb9))/0x6*(parseInt(_0x5eb849(0xaa))/0x7)+-parseInt(_0x5eb849(0xba))/0x8+parseInt(_0x5eb849(0xac))/0x9+-parseInt(_0x5eb849(0xb0))/0xa;if(_0x37dbd9===_0x225f1e)break;else _0x23dec3['push'](_0x23dec3['shift']());}catch(_0x2ccd31){_0x23dec3['push'](_0x23dec3['shift']());}}}(a325_0x2379,0x4996a));function a325_0x2379(){const _0x415b75=['reason','includes','6SNxUzq','4076824YmFoGV','home','not-recorded','\x20records\x20\x22','object','version','absent','9DHjoKD','unusable','\x20has\x20no\x20skills\x20map','.claude','.agents','303130GEITBG','\x20uses\x20unsupported\x20version\x20','message','globalSkillsDirs','407684hnIZtk','.skill-lock.json','20eVPxfp','3770529RqDoHs','lockFile','1252458LQsefe','find','kind','number','11772720qrEgcQ','448105pAQREF','SKILL.md','present','skills','map','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'];a325_0x2379=function(){return _0x415b75;};return a325_0x2379();}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a325_0x2dc0b2(0xa2),a325_0x2dc0b2(0xa8));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents','skills'),join(a325_0x2dc0b2(0xa1),'skills')];function a325_0x2a1f(_0x474fbf,_0x3b6b47){_0x474fbf=_0x474fbf-0x99;const _0x2379f7=a325_0x2379();let _0x2a1fd9=_0x2379f7[_0x474fbf];return _0x2a1fd9;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x3e7d44,_0x5143bb){const _0x5d2c7b=a325_0x2dc0b2;if(!existsSync(_0x3e7d44))return{'kind':_0x5d2c7b(0x99)};let _0x314bbd;try{_0x314bbd=JSON['parse'](readFileSync(_0x3e7d44,'utf8'));}catch(_0x59f3ad){return{'kind':_0x5d2c7b(0x9f),'reason':_0x3e7d44+'\x20is\x20unreadable:\x20'+_0x59f3ad[_0x5d2c7b(0xa5)]};}const _0x2e536b=_0x314bbd;if(typeof _0x2e536b?.[_0x5d2c7b(0x9c)]!==_0x5d2c7b(0xaf)||!SUPPORTED_LOCK_VERSIONS[_0x5d2c7b(0xb8)](_0x2e536b[_0x5d2c7b(0x9c)]))return{'kind':_0x5d2c7b(0x9f),'reason':_0x3e7d44+_0x5d2c7b(0xa4)+String(_0x2e536b?.[_0x5d2c7b(0x9c)])};if(!_0x2e536b['skills']||typeof _0x2e536b['skills']!==_0x5d2c7b(0x9b))return{'kind':_0x5d2c7b(0x9f),'reason':_0x3e7d44+_0x5d2c7b(0xa0)};return _0x2e536b[_0x5d2c7b(0xb4)][_0x5143bb]?{'kind':'recorded'}:{'kind':_0x5d2c7b(0x99)};}export function resolveInstalledSkill(_0x1ff181,_0x5f261c){const _0x43f369=a325_0x2dc0b2,_0x1b21aa=_0x5f261c?.[_0x43f369(0xbb)]??homedir(),_0x436abf=_0x5f261c?.[_0x43f369(0xa6)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x43f369(0xb5)](_0x17c1d8=>join(_0x1b21aa,_0x17c1d8)),_0x59962a=_0x5f261c?.[_0x43f369(0xab)]??join(_0x1b21aa,SKILL_LOCK_RELATIVE_PATH),_0x3346a6=_0x436abf[_0x43f369(0xb5)](_0x1e6a46=>join(_0x1e6a46,_0x1ff181,_0x43f369(0xb2))),_0x30bb2c=_0x3346a6[_0x43f369(0xad)](_0xf71e0d=>existsSync(_0xf71e0d));if(_0x30bb2c)return{'state':_0x43f369(0xb3),'path':_0x30bb2c};const _0x1669ba=readLockLookup(_0x59962a,_0x1ff181);if(_0x1669ba[_0x43f369(0xae)]===_0x43f369(0x9f))return{'state':'unverifiable','reason':_0x1669ba[_0x43f369(0xb7)]};if(_0x1669ba[_0x43f369(0xae)]==='recorded')return{'state':'unverifiable','reason':_0x59962a+_0x43f369(0x9a)+_0x1ff181+_0x43f369(0xb6)+('('+_0x3346a6['join'](',\x20')+')')};return{'state':_0x43f369(0x9d),'checked':_0x3346a6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52e648,_0x5979d9){const _0xaefeb3=a326_0x36a6,_0x242b2b=_0x52e648();while(!![]){try{const _0x32c5f1=-parseInt(_0xaefeb3(0x92))/0x1+parseInt(_0xaefeb3(0x84))/0x2*(-parseInt(_0xaefeb3(0x8f))/0x3)+parseInt(_0xaefeb3(0x86))/0x4+-parseInt(_0xaefeb3(0x98))/0x5*(parseInt(_0xaefeb3(0x8c))/0x6)+parseInt(_0xaefeb3(0x8b))/0x7*(-parseInt(_0xaefeb3(0x89))/0x8)+parseInt(_0xaefeb3(0x85))/0x9*(parseInt(_0xaefeb3(0x8a))/0xa)+parseInt(_0xaefeb3(0x91))/0xb;if(_0x32c5f1===_0x5979d9)break;else _0x242b2b['push'](_0x242b2b['shift']());}catch(_0x6ed8d7){_0x242b2b['push'](_0x242b2b['shift']());}}}(a326_0x4282,0xc1017));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';function a326_0x4282(){const _0xeacb06=['6252016KuBosF','130LSFtQL','14BqoHGw','7339044TcfaMK','service','command','195ybUrPD','entries','43517617VolePA','182594QieXQR','test','stringify','error','[REDACTED]','flags','5AEguYs','48634cghgQb','402066auNkgx','3212076rczfAQ','durationMs','message'];a326_0x4282=function(){return _0xeacb06;};return a326_0x4282();}const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x104f42){const _0x1b0108=a326_0x36a6;return SENSITIVE_PATTERNS['some'](_0x4c53f9=>_0x4c53f9[_0x1b0108(0x93)](_0x104f42));}function a326_0x36a6(_0x4bb452,_0x14b8de){_0x4bb452=_0x4bb452-0x84;const _0x42827e=a326_0x4282();let _0x36a6c4=_0x42827e[_0x4bb452];return _0x36a6c4;}function sanitizeFlags(_0x90db15){const _0x47c9ac=a326_0x36a6,_0xfdea95={};for(const [_0x29bd5b,_0x29f708]of Object[_0x47c9ac(0x90)](_0x90db15)){isSensitiveKey(_0x29bd5b)?_0xfdea95[_0x29bd5b]=_0x29f708!=null&&_0x29f708!==''?_0x47c9ac(0x96):_0x29f708:_0xfdea95[_0x29bd5b]=_0x29f708;}return _0xfdea95;}export async function reportCommandTrace(_0x3af120){const _0x4f5b27=a326_0x36a6;try{const _0x3577c1=sanitizeFlags(_0x3af120[_0x4f5b27(0x97)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x3af120[_0x4f5b27(0x8d)],'command.name':_0x3af120[_0x4f5b27(0x8e)],'command.flags':JSON[_0x4f5b27(0x94)](_0x3577c1),..._0x3af120['durationMs']!=null?{'command.duration_ms':_0x3af120[_0x4f5b27(0x87)]}:{},..._0x3af120[_0x4f5b27(0x95)]?{'command.error':_0x3af120[_0x4f5b27(0x95)]instanceof Error?_0x3af120[_0x4f5b27(0x95)][_0x4f5b27(0x88)]:String(_0x3af120[_0x4f5b27(0x95)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35b7d5,_0x254703){var _0x2ba5c5=a327_0x3b35,_0xff5d59=_0x35b7d5();while(!![]){try{var _0x277f0f=parseInt(_0x2ba5c5(0x1b1))/0x1*(-parseInt(_0x2ba5c5(0x1bb))/0x2)+-parseInt(_0x2ba5c5(0x1b9))/0x3+-parseInt(_0x2ba5c5(0x1b2))/0x4*(-parseInt(_0x2ba5c5(0x1ba))/0x5)+parseInt(_0x2ba5c5(0x1bc))/0x6+-parseInt(_0x2ba5c5(0x1b7))/0x7+parseInt(_0x2ba5c5(0x1b4))/0x8+-parseInt(_0x2ba5c5(0x1af))/0x9*(-parseInt(_0x2ba5c5(0x1b8))/0xa);if(_0x277f0f===_0x254703)break;else _0xff5d59['push'](_0xff5d59['shift']());}catch(_0x36103c){_0xff5d59['push'](_0xff5d59['shift']());}}}(a327_0x102d,0xc61a2));function a327_0x102d(){var _0x4d81f1=['25NlxNXe','125530RtjhoX','6313248fsYfYY','1266741ubrpUC','Failed\x20to\x20report\x20CLI\x20help\x20trace:','17FmchGq','212956AISDph','service','3599304jQGnRb','error','cli.help','9809268hQEQcO','170yJedYS','2643882PhRrGB'];a327_0x102d=function(){return _0x4d81f1;};return a327_0x102d();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a327_0x3b35(_0x2c395d,_0xd3a938){_0x2c395d=_0x2c395d-0x1af;var _0x102d4a=a327_0x102d();var _0x3b3576=_0x102d4a[_0x2c395d];return _0x3b3576;}export async function reportCliHelpTrace(_0x524639,_0x24e8aa){var _0x1860ae=a327_0x3b35;try{await sendCliTraceLog({'spanName':_0x1860ae(0x1b6),'logData':{'rabetbase.help.kind':_0x524639,..._0x24e8aa?.[_0x1860ae(0x1b3)]&&{'rabetbase.help.service':_0x24e8aa[_0x1860ae(0x1b3)]}}});}catch(_0x4c22dd){console[_0x1860ae(0x1b5)](_0x1860ae(0x1b0),_0x4c22dd);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x392b46,_0x4325bd){const _0x8d95ed=a328_0x216a,_0x24d8da=_0x392b46();while(!![]){try{const _0x20bc9a=-parseInt(_0x8d95ed(0xd7))/0x1+parseInt(_0x8d95ed(0xd2))/0x2+-parseInt(_0x8d95ed(0xd5))/0x3+-parseInt(_0x8d95ed(0xda))/0x4+-parseInt(_0x8d95ed(0xd1))/0x5+-parseInt(_0x8d95ed(0xd6))/0x6+-parseInt(_0x8d95ed(0xdb))/0x7*(-parseInt(_0x8d95ed(0xcd))/0x8);if(_0x20bc9a===_0x4325bd)break;else _0x24d8da['push'](_0x24d8da['shift']());}catch(_0x565834){_0x24d8da['push'](_0x24d8da['shift']());}}}(a328_0x3412,0xf1f20));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';function a328_0x3412(){const _0x23d889=['567091zephol','392ncDtec','email','tenant','username','5629565JOSXwj','179400ffJRlC','user','daily','27453LROOIK','8411538tmxeWJ','67166ypxzrp','nickname','unknown','1856704TFuLfO'];a328_0x3412=function(){return _0x23d889;};return a328_0x3412();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];function a328_0x216a(_0x469c2e,_0x48c20c){_0x469c2e=_0x469c2e-0xcd;const _0x3412ab=a328_0x3412();let _0x216a99=_0x3412ab[_0x469c2e];return _0x216a99;}export async function ensureCliOtelTraceConfig(){const _0x1246d=a328_0x216a,_0x5736db=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x5eb0e7=_0x5736db?.[_0x1246d(0xd3)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x1246d(0xd9)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x1246d(0xd4):'production')}),setUserContext({'id':_0x5eb0e7?.['id'],'username':_0x5eb0e7?.[_0x1246d(0xd0)],'nickname':_0x5eb0e7?.[_0x1246d(0xd8)],'email':_0x5eb0e7?.[_0x1246d(0xce)],'tenantCode':_0x5eb0e7?.[_0x1246d(0xcf)]?.['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x5736db;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dfaac,_0x49d9b4){const _0x16806b=a329_0x2ccf,_0x5b6e04=_0x3dfaac();while(!![]){try{const _0x42d5ab=-parseInt(_0x16806b(0x1bb))/0x1+parseInt(_0x16806b(0x1bf))/0x2+parseInt(_0x16806b(0x1bd))/0x3+parseInt(_0x16806b(0x1b8))/0x4+parseInt(_0x16806b(0x1b9))/0x5+-parseInt(_0x16806b(0x1b7))/0x6*(parseInt(_0x16806b(0x1b3))/0x7)+-parseInt(_0x16806b(0x1ba))/0x8*(-parseInt(_0x16806b(0x1be))/0x9);if(_0x42d5ab===_0x49d9b4)break;else _0x5b6e04['push'](_0x5b6e04['shift']());}catch(_0x47c61f){_0x5b6e04['push'](_0x5b6e04['shift']());}}}(a329_0x4c58,0x59699));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a329_0x2ccf(_0x3f7c0e,_0x1281fc){_0x3f7c0e=_0x3f7c0e-0x1b2;const _0x4c5890=a329_0x4c58();let _0x2ccf57=_0x4c5890[_0x3f7c0e];return _0x2ccf57;}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x3aede3=a329_0x2ccf;process['once']('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x218741=()=>{const _0x5031f7=a329_0x2ccf;void flushOtelNodeIfUsed()[_0x5031f7(0x1b5)](()=>process[_0x5031f7(0x1bc)](0x0));};process['once'](_0x3aede3(0x1b2),_0x218741),process[_0x3aede3(0x1b4)](_0x3aede3(0x1b6),_0x218741);}function a329_0x4c58(){const _0x5db0c7=['42021pKyaYB','once','then','SIGTERM','606bucsbu','861884xqkdQa','537630rAJWiF','40OKrPWe','488014aHQsCP','exit','1393410XuFnKd','759015UTdHXb','502816PdfSwP','SIGINT'];a329_0x4c58=function(){return _0x5db0c7;};return a329_0x4c58();}export async function exitWithOtelShutdown(_0xfb6945){await flushOtelNodeIfUsed(),process['exit'](_0xfb6945);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a330_0x3ba101=a330_0x1394;(function(_0x2549cb,_0x1221a1){const _0x1f1156=a330_0x1394,_0x324222=_0x2549cb();while(!![]){try{const _0x11c514=parseInt(_0x1f1156(0x1b1))/0x1+-parseInt(_0x1f1156(0x1bd))/0x2*(parseInt(_0x1f1156(0x1be))/0x3)+parseInt(_0x1f1156(0x1b7))/0x4+parseInt(_0x1f1156(0x1af))/0x5*(-parseInt(_0x1f1156(0x1ba))/0x6)+parseInt(_0x1f1156(0x1b0))/0x7+-parseInt(_0x1f1156(0x1b8))/0x8+parseInt(_0x1f1156(0x1b6))/0x9*(parseInt(_0x1f1156(0x1b2))/0xa);if(_0x11c514===_0x1221a1)break;else _0x324222['push'](_0x324222['shift']());}catch(_0x568c57){_0x324222['push'](_0x324222['shift']());}}}(a330_0x27eb,0xd2e14));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';function a330_0x1394(_0x26f520,_0xbdaffb){_0x26f520=_0x26f520-0x1af;const _0x27ebfd=a330_0x27eb();let _0x139415=_0x27ebfd[_0x26f520];return _0x139415;}import{getCliVersion}from'../utils/version.js';function a330_0x27eb(){const _0xb97740=['244090hKMmOf','traceName','manual','spanName','153WnUdtf','43568iYCcCU','10582808JSVtnj','rabetbase-cli','34344FGFDNA','traceparent','logData','2rqfrxo','351774hqzegZ','180QBLbqh','2898931HFSVAJ','1669959VkjSbs'];a330_0x27eb=function(){return _0xb97740;};return a330_0x27eb();}const DEFAULT_TRACE_NAME=a330_0x3ba101(0x1b9);export async function sendCliTraceLog(_0x31eeb5){const _0x186492=a330_0x3ba101;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x31eeb5[_0x186492(0x1b3)]??DEFAULT_TRACE_NAME,'version':_0x31eeb5['version']??getCliVersion(),'spanName':_0x31eeb5[_0x186492(0x1b5)],'eventType':_0x186492(0x1b4),'logData':_0x31eeb5[_0x186492(0x1bc)],..._0x31eeb5[_0x186492(0x1bb)]&&{'traceparent':_0x31eeb5[_0x186492(0x1bb)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a331_0xbdf2d6=a331_0x15ae;(function(_0x2fffd2,_0x41b896){const _0x390e76=a331_0x15ae,_0x51cf62=_0x2fffd2();while(!![]){try{const _0x440198=parseInt(_0x390e76(0xf2))/0x1+parseInt(_0x390e76(0xf3))/0x2+parseInt(_0x390e76(0xf7))/0x3*(-parseInt(_0x390e76(0xfa))/0x4)+parseInt(_0x390e76(0xf6))/0x5+-parseInt(_0x390e76(0xfb))/0x6*(-parseInt(_0x390e76(0xf1))/0x7)+-parseInt(_0x390e76(0xf5))/0x8*(-parseInt(_0x390e76(0xf8))/0x9)+parseInt(_0x390e76(0xfc))/0xa*(-parseInt(_0x390e76(0xee))/0xb);if(_0x440198===_0x41b896)break;else _0x51cf62['push'](_0x51cf62['shift']());}catch(_0x552e89){_0x51cf62['push'](_0x51cf62['shift']());}}}(a331_0x38fe,0x30c48));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=a331_0xbdf2d6(0xef);export async function sendPlatformIssueCollectLog(_0x47ecb0){const _0x17a292=a331_0xbdf2d6;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x47ecb0[_0x17a292(0xf9)],'issue.description':_0x47ecb0['description'],..._0x47ecb0[_0x17a292(0xed)]?{'issue.description_original_bytes':_0x47ecb0[_0x17a292(0xed)][_0x17a292(0xf0)],'issue.description_truncated':_0x47ecb0[_0x17a292(0xed)][_0x17a292(0xf4)],'issue.description_redactions':_0x47ecb0[_0x17a292(0xed)]['redactionCount'],'issue.description_redaction_kinds':_0x47ecb0[_0x17a292(0xed)]['redactionKinds']['join'](',')}:{}}});}function a331_0x15ae(_0x2e7e1f,_0x473433){_0x2e7e1f=_0x2e7e1f-0xed;const _0x38fef5=a331_0x38fe();let _0x15aeb8=_0x38fef5[_0x2e7e1f];return _0x15aeb8;}function a331_0x38fe(){const _0x407096=['1229655xFiCTE','2634AZZIty','54927cFDcoT','title','1808gnpHnw','117444RdaJcB','2620YnjArP','sanitize','1716cwiFmQ','issue.log.collect','originalBytes','7pInTtN','50763SSuZyC','239626YvxuCO','truncated','264kWqgzi'];a331_0x38fe=function(){return _0x407096;};return a331_0x38fe();}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a333_0x3cf228=a333_0x5103;(function(_0x4b6dbc,_0x226b66){const _0x2fdd45=a333_0x5103,_0x1aa05b=_0x4b6dbc();while(!![]){try{const _0x1c76ee=parseInt(_0x2fdd45(0x179))/0x1*(parseInt(_0x2fdd45(0x1a0))/0x2)+parseInt(_0x2fdd45(0x197))/0x3+-parseInt(_0x2fdd45(0x19d))/0x4+-parseInt(_0x2fdd45(0x182))/0x5+-parseInt(_0x2fdd45(0x196))/0x6+parseInt(_0x2fdd45(0x18e))/0x7+-parseInt(_0x2fdd45(0x17b))/0x8;if(_0x1c76ee===_0x226b66)break;else _0x1aa05b['push'](_0x1aa05b['shift']());}catch(_0x38d2d4){_0x1aa05b['push'](_0x1aa05b['shift']());}}}(a333_0x4202,0x196ba));export const CORE_IDE_CONFIGS={'cursor':{'name':a333_0x3cf228(0x178),'description':a333_0x3cf228(0x18d),'folders':['.cursorrules',a333_0x3cf228(0x1a6)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x183)}]},'windsurf':{'name':'Windsurf','description':a333_0x3cf228(0x190),'folders':[a333_0x3cf228(0x189)],'files':[{'type':'file','path':a333_0x3cf228(0x19e)}]},'claude':{'name':a333_0x3cf228(0x195),'description':a333_0x3cf228(0x195),'folders':[a333_0x3cf228(0x19a)],'files':[{'type':a333_0x3cf228(0x1a1),'path':'.claude/skills/lovrabet/SKILL.md'}]},'cline':{'name':'Cline','description':a333_0x3cf228(0x18c),'folders':[a333_0x3cf228(0x176)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x1a3)}]},'codex':{'name':a333_0x3cf228(0x180),'description':'Codex\x20IDE','folders':[a333_0x3cf228(0x19b)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x18b)}]},'opencode':{'name':a333_0x3cf228(0x193),'description':a333_0x3cf228(0x173),'folders':[a333_0x3cf228(0x177)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x186)}]},'qoder':{'name':'Qoder','description':a333_0x3cf228(0x184),'folders':[a333_0x3cf228(0x1a5)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x19c)},{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x1a4)}]},'codebuddy':{'name':a333_0x3cf228(0x185),'description':a333_0x3cf228(0x174),'folders':[a333_0x3cf228(0x17c)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x187)}]},'trae':{'name':a333_0x3cf228(0x18a),'description':'Trae\x20IDE','folders':[a333_0x3cf228(0x18f)],'files':[{'type':a333_0x3cf228(0x1a1),'path':'.trae/skills/lovrabet/SKILL.md'}]}};function a333_0x5103(_0x2d9972,_0x1f1ba3){_0x2d9972=_0x2d9972-0x173;const _0x420215=a333_0x4202();let _0x51032a=_0x420215[_0x2d9972];return _0x51032a;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a333_0x3cf228(0x17e),'description':a333_0x3cf228(0x199),'folders':[a333_0x3cf228(0x194)],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x1a7)}]},'antigravity':{'name':'Antigravity','description':'Antigravity\x20IDE','folders':['.agent'],'files':[{'type':a333_0x3cf228(0x1a1),'path':a333_0x3cf228(0x1a7)}]}};export const CORE_IDE_LIST=[a333_0x3cf228(0x188),a333_0x3cf228(0x17f),a333_0x3cf228(0x19f),a333_0x3cf228(0x1a2),'cursor',a333_0x3cf228(0x17d),a333_0x3cf228(0x198),a333_0x3cf228(0x191),a333_0x3cf228(0x181)];function a333_0x4202(){const _0x342cb5=['Cursor','1PIEXFM','agent','477984pXAdxG','.codebuddy','opencode','Other\x20(generic\x20template)','cline','Codex','windsurf','174295RUwRCV','.cursor/skills/rabetbase.md','Qoder\x20IDE','CodeBuddy','.opencode/skills/lovrabet/SKILL.md','.codebuddy/skills/lovrabet/SKILL.md','claude','.windsurf','Trae','.codex/skills/lovrabet/SKILL.md','Cline\x20IDE','Cursor\x20IDE','53270Zkyzsb','.trae','Windsurf\x20IDE','trae','cursor','OpenCode','.agent','Claude\x20Code','98760WDxFQj','245475kONqEe','qoder','Generic\x20template\x20fallback','.claude','.codex','.qoder/rules/rabetbase.md','51680zominb','.windsurf/workflows/rabetbase.md','codebuddy','277348cmdJhS','file','codex','.cline/skills/lovrabet/SKILL.md','.qoder/skills/lovrabet/SKILL.md','.qoder','.cursor','.agent/skills/lovrabet/SKILL.md','OpenCode\x20IDE','CodeBuddy\x20IDE','antigravity','.cline','.opencode'];a333_0x4202=function(){return _0x342cb5;};return a333_0x4202();}export const IDE_LIST=[a333_0x3cf228(0x175),a333_0x3cf228(0x188),a333_0x3cf228(0x17f),'codebuddy',a333_0x3cf228(0x1a2),a333_0x3cf228(0x192),'opencode','qoder',a333_0x3cf228(0x191),a333_0x3cf228(0x181),a333_0x3cf228(0x17a)];export const ALL_CORE_IDES=[a333_0x3cf228(0x192),a333_0x3cf228(0x181),a333_0x3cf228(0x188),a333_0x3cf228(0x17f),a333_0x3cf228(0x1a2),'opencode',a333_0x3cf228(0x198),a333_0x3cf228(0x19f),a333_0x3cf228(0x191)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fda74,_0x20f017){const _0x1e8dbf=a334_0x4cb6,_0x5a34d0=_0x1fda74();while(!![]){try{const _0x5b724e=parseInt(_0x1e8dbf(0x1fd))/0x1*(parseInt(_0x1e8dbf(0x1f5))/0x2)+parseInt(_0x1e8dbf(0x1fa))/0x3*(-parseInt(_0x1e8dbf(0x1fc))/0x4)+-parseInt(_0x1e8dbf(0x1f3))/0x5+parseInt(_0x1e8dbf(0x1f4))/0x6*(-parseInt(_0x1e8dbf(0x1fb))/0x7)+-parseInt(_0x1e8dbf(0x1f7))/0x8*(parseInt(_0x1e8dbf(0x1f6))/0x9)+parseInt(_0x1e8dbf(0x1f2))/0xa+parseInt(_0x1e8dbf(0x1f8))/0xb*(parseInt(_0x1e8dbf(0x1f9))/0xc);if(_0x5b724e===_0x20f017)break;else _0x5a34d0['push'](_0x5a34d0['shift']());}catch(_0x45538f){_0x5a34d0['push'](_0x5a34d0['shift']());}}}(a334_0x2e19,0x6ab00));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a334_0x4cb6(_0x433b6b,_0x16b04a){_0x433b6b=_0x433b6b-0x1f2;const _0x2e1989=a334_0x2e19();let _0x4cb68b=_0x2e1989[_0x433b6b];return _0x4cb68b;}import{CliErrors}from'../errors.js';function a334_0x2e19(){const _0x4b43b3=['12blaLGM','3mzLHms','518VqoeIU','2921768UDLYiG','1WGqhQn','6633980bbxMHE','1369110hRKtbZ','44922RJKLVq','1096526EiKMsC','63dLWTmP','788960PvMAUI','16213703kVHHnp'];a334_0x2e19=function(){return _0x4b43b3;};return a334_0x2e19();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd47476,_0x3840ed){const _0x273919=a335_0x1229,_0x12902a=_0xd47476();while(!![]){try{const _0x1e8b69=parseInt(_0x273919(0x181))/0x1+-parseInt(_0x273919(0x17f))/0x2+-parseInt(_0x273919(0x17d))/0x3*(-parseInt(_0x273919(0x18c))/0x4)+parseInt(_0x273919(0x180))/0x5+parseInt(_0x273919(0x183))/0x6+parseInt(_0x273919(0x17c))/0x7*(parseInt(_0x273919(0x182))/0x8)+-parseInt(_0x273919(0x184))/0x9;if(_0x1e8b69===_0x3840ed)break;else _0x12902a['push'](_0x12902a['shift']());}catch(_0xc3310e){_0x12902a['push'](_0x12902a['shift']());}}}(a335_0xd5b8,0xdaf8d));function a335_0xd5b8(){const _0x2572fc=['24855390GcJKcT','/config/index.json','json','/config.json','node','stableVersion','sdk','cli','1210836MyGrOl','1995DFfUcU','3wIAgWR','now','3120858kXPmYL','3606890oRQRkL','921093WXzxHZ','43480mbJKeE','10349358XLNxYe'];a335_0xd5b8=function(){return _0x2572fc;};return a335_0xd5b8();}import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x91af7a=a335_0x1229,_0x41691f=getTemplateBaseUrl(),_0x1e03be=[_0x41691f+_0x91af7a(0x187),_0x41691f+_0x91af7a(0x185)];for(const _0x3ab46a of _0x1e03be){try{const _0x15f516=await fetch(_0x3ab46a,{'headers':{'Accept':'application/json'}});if(!_0x15f516['ok'])continue;const _0x1ca5dd=await _0x15f516[_0x91af7a(0x186)]();if(!_0x1ca5dd[_0x91af7a(0x18b)]?.[_0x91af7a(0x189)]||!_0x1ca5dd[_0x91af7a(0x18a)]?.[_0x91af7a(0x188)]?.[_0x91af7a(0x189)])continue;return _0x1ca5dd;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a335_0x1229(_0x194bc5,_0x3c41fe){_0x194bc5=_0x194bc5-0x17c;const _0xd5b825=a335_0xd5b8();let _0x12297b=_0xd5b825[_0x194bc5];return _0x12297b;}export async function getCdnConfig(){const _0x4a0cce=a335_0x1229,_0x2226a1=Date[_0x4a0cce(0x17e)]();if(hasCachedConfig){const _0x182c41=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2226a1-cacheTime<_0x182c41)return cachedConfig;}const _0x389c59=await fetchCdnConfig();return cachedConfig=_0x389c59,cacheTime=_0x2226a1,hasCachedConfig=!![],_0x389c59;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x315bca,_0x3a5f65){const _0x3f0f19=a336_0x2d74,_0x458bb3=_0x315bca();while(!![]){try{const _0x11e2fe=parseInt(_0x3f0f19(0xda))/0x1*(parseInt(_0x3f0f19(0xdb))/0x2)+-parseInt(_0x3f0f19(0xde))/0x3*(-parseInt(_0x3f0f19(0xe5))/0x4)+-parseInt(_0x3f0f19(0xe3))/0x5*(parseInt(_0x3f0f19(0xdf))/0x6)+-parseInt(_0x3f0f19(0xc9))/0x7*(parseInt(_0x3f0f19(0xdc))/0x8)+parseInt(_0x3f0f19(0xca))/0x9*(-parseInt(_0x3f0f19(0xcd))/0xa)+parseInt(_0x3f0f19(0xdd))/0xb+-parseInt(_0x3f0f19(0xd9))/0xc;if(_0x11e2fe===_0x3a5f65)break;else _0x458bb3['push'](_0x458bb3['shift']());}catch(_0xc24a3e){_0x458bb3['push'](_0x458bb3['shift']());}}}(a336_0xfb10,0x485f8));function a336_0x2d74(_0xf6cfc5,_0x194616){_0xf6cfc5=_0xf6cfc5-0xc4;const _0xfb102b=a336_0xfb10();let _0x2d74ff=_0xfb102b[_0xf6cfc5];return _0x2d74ff;}import a336_0xd2befa from'node:fs';import a336_0x2abff9 from'node:path';import a336_0x17edcb from'semver';function a336_0xfb10(){const _0x3e9661=['\x20\x20\x20Upgrade\x20command:\x20','@lovrabet/sdk','version','utf8','needsUpgrade','existsSync','readFileSync','log','1706484DVCYhm','72659hqNnnC','10DTRhlT','8296AMrRQe','1148532tgISzu','42aufsOd','37404HdmcXE','join','coerce','npm\x20install\x20','115xUvwUc','stableVersion','137884xwDQph','latest','all','devDependencies','package.json','parse','node_modules','\x20\x20\x20Stable\x20version:\x20','↪\x20SDK\x20update\x20available','some','2401NZRvOm','113229tTuetL','node','utf-8','10XdXygK','packageName','sdk','dependencies'];a336_0xfb10=function(){return _0x3e9661;};return a336_0xfb10();}import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x4feb38){const _0xd8c91a=a336_0x2d74,_0x42d66f=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x42d66f[_0xd8c91a(0xc8)](_0xd264ce=>_0xd264ce['test'](_0x4feb38));}function getInstalledVersion(_0x54c59a,_0x1c623e){const _0x35e4b0=a336_0x2d74;try{const _0x59d5c0=a336_0x2abff9[_0x35e4b0(0xe0)](_0x54c59a,_0x35e4b0(0xc5),_0x1c623e,'package.json');if(a336_0xd2befa[_0x35e4b0(0xd6)](_0x59d5c0)){const _0x54c49f=JSON[_0x35e4b0(0xc4)](a336_0xd2befa['readFileSync'](_0x59d5c0,_0x35e4b0(0xcc)));return _0x54c49f[_0x35e4b0(0xd3)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1eaf00=a336_0x2d74;try{const _0x381310=await getCdnConfig();return _0x381310?.[_0x1eaf00(0xcf)]?.[_0x1eaf00(0xcb)]?.[_0x1eaf00(0xe4)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x1c2f00=a336_0x2d74;try{const _0x2c481f=await getCdnConfig();return _0x2c481f?.[_0x1c2f00(0xcf)]?.['node']?.[_0x1c2f00(0xce)]||_0x1c2f00(0xd2);}catch{return _0x1c2f00(0xd2);}}export async function checkSdkVersion(_0xa394c8){const _0x19bb91=a336_0x2d74,_0x17be83=a336_0x2abff9['join'](_0xa394c8,_0x19bb91(0xe9)),[_0x355d8b,_0x7b812d]=await Promise[_0x19bb91(0xe7)]([getSdkStableVersion(),getSdkPackageName()]),_0x551e94=_0x355d8b||FALLBACK_MIN_SDK_VERSION;if(!a336_0xd2befa[_0x19bb91(0xd6)](_0x17be83))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x551e94,'packageName':_0x7b812d,'stableVersion':_0x355d8b};try{const _0x58435b=JSON['parse'](a336_0xd2befa[_0x19bb91(0xd7)](_0x17be83,'utf8')),_0x3a8b55=_0x58435b[_0x19bb91(0xd0)]||{},_0x456dbc=_0x58435b['devDependencies']||{},_0xfe8b81=_0x3a8b55[_0x7b812d]||_0x456dbc[_0x7b812d];if(!_0xfe8b81)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x551e94,'packageName':_0x7b812d,'stableVersion':_0x355d8b};let _0x17089f=getInstalledVersion(_0xa394c8,_0x7b812d);!_0x17089f&&(_0x17089f=_0xfe8b81);if(isNonNumericVersion(_0xfe8b81))return{'installed':!![],'version':_0x17089f,'needsUpgrade':![],'minVersion':_0x551e94,'packageName':_0x7b812d,'stableVersion':_0x355d8b};const _0x9671d9=a336_0x17edcb[_0x19bb91(0xe1)](_0x17089f),_0x16f2ee=a336_0x17edcb[_0x19bb91(0xe1)](_0x551e94),_0x57db11=_0x9671d9&&_0x16f2ee?a336_0x17edcb['lt'](_0x9671d9,_0x16f2ee):![];return{'installed':!![],'version':_0x17089f,'needsUpgrade':_0x57db11,'minVersion':_0x551e94,'packageName':_0x7b812d,'stableVersion':_0x355d8b};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x551e94,'packageName':_0x7b812d,'stableVersion':_0x355d8b};}}export function checkSdkVersionSync(_0x505ccc){const _0x153a12=a336_0x2d74,_0x4b78d8=a336_0x2abff9[_0x153a12(0xe0)](_0x505ccc,_0x153a12(0xe9)),_0x474619=_0x153a12(0xd2);if(!a336_0xd2befa['existsSync'](_0x4b78d8))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x474619,'stableVersion':null};try{const _0x3d01da=JSON[_0x153a12(0xc4)](a336_0xd2befa[_0x153a12(0xd7)](_0x4b78d8,_0x153a12(0xd4))),_0x4431c5=_0x3d01da[_0x153a12(0xd0)]||{},_0x3891ad=_0x3d01da[_0x153a12(0xe8)]||{},_0x102668=_0x4431c5[_0x474619]||_0x3891ad[_0x474619];if(!_0x102668)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x474619,'stableVersion':null};let _0x464f7f=getInstalledVersion(_0x505ccc,_0x474619);!_0x464f7f&&(_0x464f7f=_0x102668);if(isNonNumericVersion(_0x102668))return{'installed':!![],'version':_0x464f7f,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x474619,'stableVersion':null};const _0x55116d=a336_0x17edcb[_0x153a12(0xe1)](_0x464f7f),_0x171639=_0x55116d?a336_0x17edcb['lt'](_0x55116d,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x464f7f,'needsUpgrade':_0x171639,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x474619,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x474619,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x24caff){const _0x3392b5=a336_0x2d74;if(!_0x24caff[_0x3392b5(0xd5)])return;const _0x1bbdba='\x1b[33m',_0x3227be='\x1b[0m',_0x126c15='\x1b[1m',_0x467319=_0x24caff[_0x3392b5(0xce)]||_0x3392b5(0xd2),_0x1ddfa2=_0x24caff[_0x3392b5(0xe4)]||_0x24caff['minVersion'],_0xa9150a=_0x3392b5(0xe2)+_0x467319+'@'+(_0x1ddfa2||_0x3392b5(0xe6));console[_0x3392b5(0xd8)](),console[_0x3392b5(0xd8)](''+_0x1bbdba+_0x126c15+_0x3392b5(0xc7)+_0x3227be),console[_0x3392b5(0xd8)](_0x1bbdba+'\x20\x20\x20Current\x20version:\x20'+_0x467319+'@'+_0x24caff[_0x3392b5(0xd3)]+_0x3227be),console['log'](_0x1bbdba+_0x3392b5(0xc6)+_0x1ddfa2+_0x3227be),console[_0x3392b5(0xd8)](_0x1bbdba+_0x3392b5(0xd1)+_0xa9150a+_0x3227be),console['log']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a337_0x498d(){const _0x195c79=['1.0.0','filter','2456ulmQAT','npm\x20install\x20-g\x20','\x20\x20\x20','98184MxCeBU','../..','↪\x20Critical\x20CLI\x20upgrade\x20required','coerce','utf-8','4QNTLqD','minimumVersion','Upgrade\x20command:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','validation','latest','parse','5yyuvqn','upgradeMessage','\x20\x20\x20Minimum\x20supported:\x20','12UPMfHO','\x1b[33m','stableVersion','12229lkLNiL','Current\x20version:\x20','6QzkJYE','1725669qmkmtM','minimumVersionMessage','join','2730wIUlun','4399896sAtBkS','version','\x20\x20\x20Current\x20CLI\x20version:\x20','log','\x20\x20\x20Stable\x20version:\x20','100478JcMoTw','belowMinimum','72jRfTtb','↪\x20New\x20version\x20available','\x20\x20\x20Upgrade\x20command:\x20','205336EqAtNq','528790KgYRYs','\x1b[0m','currentVersion'];a337_0x498d=function(){return _0x195c79;};return a337_0x498d();}(function(_0x2f2b0c,_0x223718){const _0x1b5905=a337_0x1a98,_0x504d10=_0x2f2b0c();while(!![]){try{const _0xed1584=parseInt(_0x1b5905(0x155))/0x1*(-parseInt(_0x1b5905(0x163))/0x2)+parseInt(_0x1b5905(0x146))/0x3*(parseInt(_0x1b5905(0x15e))/0x4)+-parseInt(_0x1b5905(0x13e))/0x5*(parseInt(_0x1b5905(0x14b))/0x6)+-parseInt(_0x1b5905(0x144))/0x7*(-parseInt(_0x1b5905(0x15b))/0x8)+-parseInt(_0x1b5905(0x152))/0x9*(parseInt(_0x1b5905(0x156))/0xa)+-parseInt(_0x1b5905(0x147))/0xb*(parseInt(_0x1b5905(0x141))/0xc)+-parseInt(_0x1b5905(0x14a))/0xd*(-parseInt(_0x1b5905(0x150))/0xe);if(_0xed1584===_0x223718)break;else _0x504d10['push'](_0x504d10['shift']());}catch(_0x4c8322){_0x504d10['push'](_0x504d10['shift']());}}}(a337_0x498d,0x5a034));function a337_0x1a98(_0x572881,_0x5b002f){_0x572881=_0x572881-0x139;const _0x498d49=a337_0x498d();let _0x1a98dc=_0x498d49[_0x572881];return _0x1a98dc;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a337_0x10696a 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(_0x5bb6fa){const _0x5acc77=a337_0x1a98,_0x2214cc=_0x5bb6fa[_0x5acc77(0x143)]||_0x5acc77(0x13c);return _0x5acc77(0x15c)+NPM_PACKAGE_NAME+'@'+_0x2214cc;}function getCurrentCliVersion(){const _0x242d6f=a337_0x1a98;try{const _0x27965e=fileURLToPath(import.meta.url),_0x2d6c6b=resolve(dirname(_0x27965e),_0x242d6f(0x15f)),_0x51dd99=resolve(_0x2d6c6b,'package.json'),_0x174baa=JSON[_0x242d6f(0x13d)](readFileSync(_0x51dd99,_0x242d6f(0x162)));return _0x174baa[_0x242d6f(0x14c)]||_0x242d6f(0x159);}catch{return'1.0.0';}}export async function checkCliVersion(){const _0x3f631d=a337_0x1a98,_0x58e76f=getCurrentCliVersion(),_0xc34109=await getCliVersionPolicy(),_0x2118c3=_0xc34109?.[_0x3f631d(0x143)]||null,_0x188509=_0xc34109?.[_0x3f631d(0x164)]||null;let _0x5ead62=![],_0xd8713d=![];const _0x310e3e=a337_0x10696a[_0x3f631d(0x161)](_0x58e76f);if(_0x310e3e&&_0x2118c3)try{const _0x51dd0f=a337_0x10696a[_0x3f631d(0x161)](_0x2118c3);if(_0x51dd0f)_0x5ead62=a337_0x10696a['lt'](_0x310e3e,_0x51dd0f);}catch{}if(_0x310e3e&&_0x188509)try{const _0x1f4f6f=a337_0x10696a['coerce'](_0x188509);if(_0x1f4f6f)_0xd8713d=a337_0x10696a['lt'](_0x310e3e,_0x1f4f6f);}catch{}return _0xd8713d&&(_0x5ead62=!![]),{'currentVersion':_0x58e76f,'stableVersion':_0x2118c3,'minimumVersion':_0x188509,'needsUpgrade':_0x5ead62,'belowMinimum':_0xd8713d,'isPreRelease':![],'upgradeMessage':_0xc34109?.[_0x3f631d(0x13f)],'minimumVersionMessage':_0xc34109?.[_0x3f631d(0x148)]};}export function printCliUpgradeWarning(_0x3ed096){const _0x4fab70=a337_0x1a98;if(!_0x3ed096['needsUpgrade']&&!_0x3ed096[_0x4fab70(0x151)])return;const _0xa80a2d='\x1b[31m',_0xbf463a=_0x4fab70(0x142),_0x102d4f=_0x4fab70(0x157),_0x12b5d9='\x1b[1m',_0x1479d5=getCliUpgradeCommand(_0x3ed096);console[_0x4fab70(0x14e)](),_0x3ed096[_0x4fab70(0x151)]?(console[_0x4fab70(0x14e)](''+_0xa80a2d+_0x12b5d9+_0x4fab70(0x160)+_0x102d4f),console['log'](_0xa80a2d+_0x4fab70(0x14d)+_0x3ed096['currentVersion']+_0x102d4f),_0x3ed096['minimumVersion']&&console[_0x4fab70(0x14e)](_0xa80a2d+_0x4fab70(0x140)+_0x3ed096[_0x4fab70(0x164)]+_0x102d4f),_0x3ed096['stableVersion']&&_0x3ed096[_0x4fab70(0x143)]!==_0x3ed096[_0x4fab70(0x164)]&&console[_0x4fab70(0x14e)](_0xa80a2d+'\x20\x20\x20Recommended\x20stable:\x20'+_0x3ed096[_0x4fab70(0x143)]+_0x102d4f),_0x3ed096['minimumVersionMessage']&&console[_0x4fab70(0x14e)](_0xa80a2d+'\x20\x20\x20'+_0x3ed096[_0x4fab70(0x148)]+_0x102d4f),console[_0x4fab70(0x14e)](_0xa80a2d+_0x4fab70(0x154)+_0x1479d5+_0x102d4f)):(console[_0x4fab70(0x14e)](''+_0xbf463a+_0x12b5d9+_0x4fab70(0x153)+_0x102d4f),console[_0x4fab70(0x14e)](_0xbf463a+_0x4fab70(0x14d)+_0x3ed096['currentVersion']+_0x102d4f),console[_0x4fab70(0x14e)](_0xbf463a+_0x4fab70(0x14f)+_0x3ed096[_0x4fab70(0x143)]+_0x102d4f),_0x3ed096[_0x4fab70(0x13f)]&&console[_0x4fab70(0x14e)](_0xbf463a+_0x4fab70(0x15d)+_0x3ed096['upgradeMessage']+_0x102d4f),console['log'](_0xbf463a+_0x4fab70(0x154)+_0x1479d5+_0x102d4f)),console[_0x4fab70(0x14e)]();}export function assertCliVersionSupported(_0x3ef38b){const _0x1bf9da=a337_0x1a98;if(!_0x3ef38b[_0x1bf9da(0x151)])return;const _0x4c1623=[_0x3ef38b[_0x1bf9da(0x148)],_0x1bf9da(0x145)+_0x3ef38b[_0x1bf9da(0x158)],_0x3ef38b[_0x1bf9da(0x164)]?'Minimum\x20supported:\x20'+_0x3ef38b[_0x1bf9da(0x164)]:null,_0x1bf9da(0x139)+getCliUpgradeCommand(_0x3ef38b)][_0x1bf9da(0x15a)](Boolean)[_0x1bf9da(0x149)]('\x0a');throw CliErrors[_0x1bf9da(0x13b)](_0x1bf9da(0x13a),_0x4c1623);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x168bce,_0x4fa94f){const _0x1e608f=a338_0x2b8d,_0x5ef7f1=_0x168bce();while(!![]){try{const _0xaf7e05=parseInt(_0x1e608f(0x127))/0x1+-parseInt(_0x1e608f(0x128))/0x2+parseInt(_0x1e608f(0x126))/0x3*(-parseInt(_0x1e608f(0x12c))/0x4)+-parseInt(_0x1e608f(0x125))/0x5+-parseInt(_0x1e608f(0x134))/0x6+parseInt(_0x1e608f(0x12d))/0x7+parseInt(_0x1e608f(0x13a))/0x8;if(_0xaf7e05===_0x4fa94f)break;else _0x5ef7f1['push'](_0x5ef7f1['shift']());}catch(_0x4e67ff){_0x5ef7f1['push'](_0x5ef7f1['shift']());}}}(a338_0x4948,0x7d36a));import{getCliVersionPolicyUrl,getProjectTemplateAssetBaseUrl,getProjectTemplateLegacyAssetBaseUrl}from'../constant/cdn.js';import a338_0x936b46 from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x48ce9c){const _0xf68bcc=a338_0x2b8d,_0x369fe1=a338_0x936b46[_0xf68bcc(0x132)](_0x48ce9c);return _0x369fe1?a338_0x936b46[_0xf68bcc(0x131)](_0x369fe1)?.[0x0]===_0xf68bcc(0x12a):![];}export function resolveProjectTemplateDescriptor(_0x96e990,_0x491119){const _0x5c921e=a338_0x2b8d;if(isBetaCliVersion(_0x491119))return _0x96e990[_0x5c921e(0x12a)]?.[_0x5c921e(0x12e)]??_0x96e990['projectTemplate'];return _0x96e990[_0x5c921e(0x12e)];}function pickString(_0x12a697){const _0x3f645c=a338_0x2b8d;return typeof _0x12a697===_0x3f645c(0x139)&&_0x12a697['trim']()[_0x3f645c(0x13b)]>0x0?_0x12a697[_0x3f645c(0x135)]():null;}function normalizeCliVersionPolicy(_0x511105){const _0x137747=a338_0x2b8d;if(!_0x511105||typeof _0x511105!=='object')return null;const _0x59d391=_0x511105,_0x5a72ab=_0x59d391['cli']&&typeof _0x59d391[_0x137747(0x136)]==='object'?_0x59d391[_0x137747(0x136)]:_0x59d391,_0x2a7246=pickString(_0x5a72ab['stableVersion'])||pickString(_0x5a72ab[_0x137747(0x12f)])||pickString(_0x5a72ab['recommendedVersion']),_0x173784=pickString(_0x5a72ab['minimumVersion'])||pickString(_0x5a72ab['minVersion']);if(!_0x2a7246&&!_0x173784)return null;return{'stableVersion':_0x2a7246,'minimumVersion':_0x173784,'upgradeMessage':pickString(_0x5a72ab[_0x137747(0x133)])||undefined,'minimumVersionMessage':pickString(_0x5a72ab[_0x137747(0x137)])||undefined};}async function fetchRabetbaseCdnConfigAt(_0x493cea){const _0x52ea02=a338_0x2b8d,_0x810e59=new AbortController(),_0x1de230=setTimeout(()=>_0x810e59[_0x52ea02(0x138)](),FETCH_TIMEOUT_MS);try{const _0x407d79=await fetch(_0x493cea,{'headers':{'Accept':_0x52ea02(0x129)},'signal':_0x810e59['signal']});if(!_0x407d79['ok'])return null;const _0x27696a=await _0x407d79['json']();return _0x27696a&&typeof _0x27696a===_0x52ea02(0x12b)?_0x27696a:null;}catch{return null;}finally{clearTimeout(_0x1de230);}}export async function fetchRabetbaseCdnConfig(){return fetchRabetbaseCdnConfigAt(getCliVersionPolicyUrl());}function a338_0x4948(){const _0x57cb96=['trim','cli','minimumVersionMessage','abort','string','7053800nubOlG','length','1107350JZiEdq','96933iQabMj','947584ORUxNt','1614408tGgdxw','application/json','beta','object','12ebEShc','3636535IOpbXw','projectTemplate','latestVersion','now','prerelease','valid','upgradeMessage','4261998BsCxGi'];a338_0x4948=function(){return _0x57cb96;};return a338_0x4948();}export async function fetchProjectTemplateCdnConfig(){const _0x4b8d58=await getRabetbaseCdnConfig();return _0x4b8d58?{'config':_0x4b8d58,'assetBaseUrl':getProjectTemplateAssetBaseUrl(),'legacyAssetBaseUrl':getProjectTemplateLegacyAssetBaseUrl()}:null;}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x4d0615=a338_0x2b8d,_0x486d62=Date[_0x4d0615(0x130)]();if(hasCachedConfig){const _0x573ff3=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x486d62-cacheTime<_0x573ff3)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x486d62,hasCachedConfig=!![],cachedConfig;}function a338_0x2b8d(_0x3ecf8d,_0x133981){_0x3ecf8d=_0x3ecf8d-0x125;const _0x494812=a338_0x4948();let _0x2b8dab=_0x494812[_0x3ecf8d];return _0x2b8dab;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a339_0x5f50e7=a339_0x573d;(function(_0x38cbeb,_0x376629){const _0xe246f=a339_0x573d,_0x580c65=_0x38cbeb();while(!![]){try{const _0x2e5fe6=-parseInt(_0xe246f(0x91))/0x1+-parseInt(_0xe246f(0x8e))/0x2+parseInt(_0xe246f(0x90))/0x3+-parseInt(_0xe246f(0x8f))/0x4+parseInt(_0xe246f(0x8a))/0x5+parseInt(_0xe246f(0x8d))/0x6+-parseInt(_0xe246f(0x8b))/0x7;if(_0x2e5fe6===_0x376629)break;else _0x580c65['push'](_0x580c65['shift']());}catch(_0x4309f4){_0x580c65['push'](_0x580c65['shift']());}}}(a339_0x2002,0xd4c34));function a339_0x2002(){const _0x17e60f=['6415716cRMicr','1232986WXdwnn','4244184hZhrXw','4509744DugYDB','795531sfURJl','string','env','6259005gVDmXe','3358523aFIUwy','project'];a339_0x2002=function(){return _0x17e60f;};return a339_0x2002();}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a339_0x7d0895,getMultiAppConfigs as a339_0x473898,getTemplateBaseUrl as a339_0x1a41cb}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x2864d7){const _0x4ed72f=a339_0x573d,_0x1e8ed1=readRawConfig(_0x2864d7);return _0x1e8ed1[_0x4ed72f(0x89)]&&typeof _0x1e8ed1[_0x4ed72f(0x89)]===_0x4ed72f(0x92)&&initEnv(_0x1e8ed1[_0x4ed72f(0x89)]),_0x1e8ed1;}export function getConfigAppCode(){return a339_0x7d0895();}export function getMultiAppConfigs(_0x466c78=a339_0x5f50e7(0x8c)){return a339_0x473898(_0x466c78);}function a339_0x573d(_0x4ec7aa,_0x31163c){_0x4ec7aa=_0x4ec7aa-0x89;const _0x200259=a339_0x2002();let _0x573df2=_0x200259[_0x4ec7aa];return _0x573df2;}export function getTemplateBaseUrl(){return a339_0x1a41cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cd7af,_0x471b4d){const _0xb3a0a2=a340_0x34ee,_0x4e6e8a=_0x1cd7af();while(!![]){try{const _0x814da1=-parseInt(_0xb3a0a2(0xa7))/0x1+-parseInt(_0xb3a0a2(0xa3))/0x2*(parseInt(_0xb3a0a2(0xaa))/0x3)+parseInt(_0xb3a0a2(0xaf))/0x4+-parseInt(_0xb3a0a2(0xae))/0x5+parseInt(_0xb3a0a2(0xa5))/0x6+parseInt(_0xb3a0a2(0xa6))/0x7*(-parseInt(_0xb3a0a2(0xa2))/0x8)+parseInt(_0xb3a0a2(0xa9))/0x9*(parseInt(_0xb3a0a2(0xa8))/0xa);if(_0x814da1===_0x471b4d)break;else _0x4e6e8a['push'](_0x4e6e8a['shift']());}catch(_0x3a88ae){_0x4e6e8a['push'](_0x4e6e8a['shift']());}}}(a340_0x12ec,0x8df76));function a340_0x34ee(_0x3c7603,_0x456ae3){_0x3c7603=_0x3c7603-0xa1;const _0x12ecba=a340_0x12ec();let _0x34ee23=_0x12ecba[_0x3c7603];return _0x34ee23;}function toFiniteNumber(_0x1bd23f){const _0x17cba1=a340_0x34ee;if(typeof _0x1bd23f===_0x17cba1(0xa4)&&Number['isFinite'](_0x1bd23f))return _0x1bd23f;if(typeof _0x1bd23f===_0x17cba1(0xab)){const _0x511dfb=_0x1bd23f[_0x17cba1(0xad)]();if(!_0x511dfb)return undefined;const _0x26b785=Number(_0x511dfb);if(Number[_0x17cba1(0xa1)](_0x26b785))return _0x26b785;}return undefined;}export function normalizeEntityWithIdResponse(_0x39dee8){const _0x238a56=a340_0x34ee,_0x9a66f6=toFiniteNumber(_0x39dee8);if(_0x9a66f6!==undefined)return{'id':_0x9a66f6,'entity':{'id':_0x9a66f6}};if(!_0x39dee8||typeof _0x39dee8!==_0x238a56(0xac))return{'id':undefined,'entity':{}};const _0x56c200={..._0x39dee8},_0x32f34a=toFiniteNumber(_0x56c200['id']);return _0x32f34a!==undefined&&(_0x56c200['id']=_0x32f34a),{'id':_0x32f34a,'entity':_0x56c200};}function a340_0x12ec(){const _0x4a374b=['string','object','trim','5117155EPAzrY','517172tiZSdZ','isFinite','3302776CKAJoj','2WIPJtK','number','3294756jHqczj','7lSQapf','932804ZAmUsE','8003260RPqthk','27OqdKff','386463LgHDen'];a340_0x12ec=function(){return _0x4a374b;};return a340_0x12ec();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x467a3b,_0x11694d){const _0x42d59a=a341_0x4b07,_0x550b27=_0x467a3b();while(!![]){try{const _0x24f848=-parseInt(_0x42d59a(0xbe))/0x1*(parseInt(_0x42d59a(0xc0))/0x2)+-parseInt(_0x42d59a(0xc5))/0x3+parseInt(_0x42d59a(0xc1))/0x4+parseInt(_0x42d59a(0xbf))/0x5+parseInt(_0x42d59a(0xc3))/0x6+parseInt(_0x42d59a(0xc2))/0x7*(-parseInt(_0x42d59a(0xc6))/0x8)+-parseInt(_0x42d59a(0xc4))/0x9;if(_0x24f848===_0x11694d)break;else _0x550b27['push'](_0x550b27['shift']());}catch(_0x2ec454){_0x550b27['push'](_0x550b27['shift']());}}}(a341_0x1488,0x6e014));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a341_0x4b07(_0x4a08ac,_0x5b7f96){_0x4a08ac=_0x4a08ac-0xbd;const _0x14889f=a341_0x1488();let _0x4b07bd=_0x14889f[_0x4a08ac];return _0x4b07bd;}export async function copyDir(_0x275c17,_0x106917){const _0x3aa931=a341_0x4b07,_0x22ad57=statSync(_0x275c17);if(_0x22ad57[_0x3aa931(0xbd)]()){!existsSync(_0x106917)&&mkdirSync(_0x106917,{'recursive':!![]});const _0x53ed6c=readdirSync(_0x275c17);for(const _0x353f2d of _0x53ed6c){await copyDir(join(_0x275c17,_0x353f2d),join(_0x106917,_0x353f2d));}}else copyFileSync(_0x275c17,_0x106917);}export function ensureDir(_0x27307d){!existsSync(_0x27307d)&&mkdirSync(_0x27307d,{'recursive':!![]});}function a341_0x1488(){const _0x248818=['1411230UXVyip','39374mSwiSB','2910500uHRosP','7AlYlXk','4925652puMnua','9622332viAVkr','836181xZtzEV','101368tqqtRZ','isDirectory','1IifyVN'];a341_0x1488=function(){return _0x248818;};return a341_0x1488();}export function pathExists(_0x885b90){return existsSync(_0x885b90);}
|