mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-27 11:14:59 +00:00
Fix three blockers and one contract drift issue surfaced in code review: 1. API token policy: add skill:publish scope policy and authentication policy for /api/cli/v1/skills/*/publish/validate. Without these the AntPathMatcher pattern /publish would not cover /publish/validate, so Bearer-token requests would be rejected by the scope filter. 2. Warnings semantics: dry-run now treats warnings as making valid=false. The CLI publish flow uses confirmWarnings=false, so the real publish rejects any warnings; dry-run must mirror that to avoid false positives. 3. Visibility parameter: validate endpoint now accepts the same visibility multipart field as publish. The CLI forwards --visibility so invalid values are caught at dry-run time rather than at publish. 4. Schema drift: resolvedSlug and resolvedVersion are nullable in practice (returned as null when validation fails before resolution). Updated schema.d.ts to reflect string | null instead of optional string. Tests added: - RouteSecurityPolicyRegistryTest: validate endpoint scope check - CliDryRunValidateTest: custom + invalid visibility cases - publish-dry-run.test.ts: --visibility forwarded to server |
||
|---|---|---|
| .. | ||
| docker-entrypoint.d | ||
| e2e | ||
| public | ||
| src | ||
| .browserslistrc | ||
| .dockerignore | ||
| .eslintrc.cjs | ||
| components.json | ||
| Dockerfile | ||
| index.html | ||
| LANDING_PAGE_REDESIGN.md | ||
| nginx.conf.template | ||
| package.json | ||
| playwright.config.ts | ||
| playwright.smoke.config.ts | ||
| pnpm-lock.yaml | ||
| postcss.config.js | ||
| PREVIEW.md | ||
| runtime-config.js.template | ||
| tailwind.config.ts | ||
| TODO.md | ||
| tsconfig.json | ||
| vite.config.ts | ||