diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 53f2654388..e2f8c22ba9 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -23,7 +23,11 @@ jobs: run: npm run docs - name: Deploy docs +<<<<<<< HEAD uses: JamesIves/github-pages-deploy-action@v4.7.4 +======= + uses: JamesIves/github-pages-deploy-action@v4.7.3 +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) with: branch: gh-pages # The branch the action should deploy to. folder: docs # The folder the action should deploy. diff --git a/package-lock.json b/package-lock.json index fbd6a1ffd5..845c300b91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,11 @@ "@types/mock-fs": "^4.13.1", "c8": "^10.0.0", "eslint": "^9.18.0", +<<<<<<< HEAD "eslint-plugin-erasable-syntax-only": "^0.4.0", +======= + "eslint-plugin-erasable-syntax-only": "^0.3.0", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "husky": "^9.0.6", "mock-fs": "^5.2.0", "nock": "^14.0.5", @@ -561,6 +565,7 @@ } }, "node_modules/@eslint/config-helpers": { +<<<<<<< HEAD "version": "0.4.2", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", @@ -568,15 +573,30 @@ "license": "Apache-2.0", "dependencies": { "@eslint/core": "^0.17.0" +======= + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.1.tgz", + "integrity": "sha512-csZAzkNhsgwb0I/UAV6/RGFTbiakPCf0ZrGmrIxQpYvGZ00PhTkSnyKNolphgIvmnJeGw6rcGVEXfTzUnFuEvw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0" +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { +<<<<<<< HEAD "version": "0.17.0", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", +======= + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "Apache-2.0", "dependencies": { @@ -635,9 +655,15 @@ } }, "node_modules/@eslint/js": { +<<<<<<< HEAD "version": "9.39.1", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", +======= + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", + "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "engines": { @@ -658,6 +684,7 @@ } }, "node_modules/@eslint/plugin-kit": { +<<<<<<< HEAD "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", @@ -665,6 +692,15 @@ "license": "Apache-2.0", "dependencies": { "@eslint/core": "^0.17.0", +======= + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", + "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "levn": "^0.4.1" }, "engines": { @@ -1030,12 +1066,21 @@ } }, "node_modules/@types/node": { +<<<<<<< HEAD "version": "24.10.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", "license": "MIT", "dependencies": { "undici-types": "~7.16.0" +======= + "version": "24.8.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.8.1.tgz", + "integrity": "sha512-alv65KGRadQVfVcG69MuB4IzdYVpRwMG/mq8KWOaoOdyY617P5ivaDiMCGOFDWD2sAn5Q0mR3mRtUOgm99hL9Q==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.14.0" +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) } }, "node_modules/@types/node-fetch": { @@ -1049,9 +1094,15 @@ } }, "node_modules/@types/stream-buffers": { +<<<<<<< HEAD "version": "3.0.8", "resolved": "https://registry.npmjs.org/@types/stream-buffers/-/stream-buffers-3.0.8.tgz", "integrity": "sha512-J+7VaHKNvlNPJPEJXX/fKa9DZtR/xPMwuIbe+yNOwp1YB+ApUOBv2aUpEoBJEi8nJgbgs1x8e73ttg0r1rSUdw==", +======= + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/stream-buffers/-/stream-buffers-3.0.7.tgz", + "integrity": "sha512-azOCy05sXVXrO+qklf0c/B07H/oHaIuDDAiHPVwlk3A9Ek+ksHyTeMajLZl3r76FxpPpxem//4Te61G1iW3Giw==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "license": "MIT", "dependencies": { "@types/node": "*" @@ -1065,17 +1116,30 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.3.tgz", "integrity": "sha512-sbaQ27XBUopBkRiuY/P9sWGOWUW4rl8fDoHIUmLpZd8uldsTyB4/Zg6bWTegPoTLnKj9Hqgn3QD6cjPNB32Odw==", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.1.tgz", + "integrity": "sha512-rUsLh8PXmBjdiPY+Emjz9NX2yHvhS11v0SR6xNJkm5GM1MO9ea/1GoDKlHHZGrOJclL/cZ2i/vRUYVtjRhrHVQ==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", +<<<<<<< HEAD "@typescript-eslint/scope-manager": "8.46.3", "@typescript-eslint/type-utils": "8.46.3", "@typescript-eslint/utils": "8.46.3", "@typescript-eslint/visitor-keys": "8.46.3", +======= + "@typescript-eslint/scope-manager": "8.46.1", + "@typescript-eslint/type-utils": "8.46.1", + "@typescript-eslint/utils": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1089,7 +1153,11 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { +<<<<<<< HEAD "@typescript-eslint/parser": "^8.46.3", +======= + "@typescript-eslint/parser": "^8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -1105,6 +1173,7 @@ } }, "node_modules/@typescript-eslint/parser": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.3.tgz", "integrity": "sha512-6m1I5RmHBGTnUGS113G04DMu3CpSdxCAU/UvtjNWL4Nuf3MW9tQhiJqRlHzChIkhy6kZSAQmc+I1bcGjE3yNKg==", @@ -1115,6 +1184,18 @@ "@typescript-eslint/types": "8.46.3", "@typescript-eslint/typescript-estree": "8.46.3", "@typescript-eslint/visitor-keys": "8.46.3", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.1.tgz", + "integrity": "sha512-6JSSaBZmsKvEkbRUkf7Zj7dru/8ZCrJxAqArcLaVMee5907JdtEbKGsZ7zNiIm/UAkpGUkaSMZEXShnN2D1HZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.46.1", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "debug": "^4.3.4" }, "engines": { @@ -1130,6 +1211,7 @@ } }, "node_modules/@typescript-eslint/project-service": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.3.tgz", "integrity": "sha512-Fz8yFXsp2wDFeUElO88S9n4w1I4CWDTXDqDr9gYvZgUpwXQqmZBr9+NTTql5R3J7+hrJZPdpiWaB9VNhAKYLuQ==", @@ -1138,6 +1220,16 @@ "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.46.3", "@typescript-eslint/types": "^8.46.3", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.1.tgz", + "integrity": "sha512-FOIaFVMHzRskXr5J4Jp8lFVV0gz5ngv3RHmn+E4HYxSJ3DgDzU7fVI1/M7Ijh1zf6S7HIoaIOtln1H5y8V+9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.1", + "@typescript-eslint/types": "^8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "debug": "^4.3.4" }, "engines": { @@ -1152,6 +1244,7 @@ } }, "node_modules/@typescript-eslint/scope-manager": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.3.tgz", "integrity": "sha512-FCi7Y1zgrmxp3DfWfr+3m9ansUUFoy8dkEdeQSgA9gbm8DaHYvZCdkFRQrtKiedFf3Ha6VmoqoAaP68+i+22kg==", @@ -1160,6 +1253,16 @@ "dependencies": { "@typescript-eslint/types": "8.46.3", "@typescript-eslint/visitor-keys": "8.46.3" +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.1.tgz", + "integrity": "sha512-weL9Gg3/5F0pVQKiF8eOXFZp8emqWzZsOJuWRUNtHT+UNV2xSJegmpCNQHy37aEQIbToTq7RHKhWvOsmbM680A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1" +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1170,9 +1273,15 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.3.tgz", "integrity": "sha512-GLupljMniHNIROP0zE7nCcybptolcH8QZfXOpCfhQDAdwJ/ZTlcaBOYebSOZotpti/3HrHSw7D3PZm75gYFsOA==", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.1.tgz", + "integrity": "sha512-X88+J/CwFvlJB+mK09VFqx5FE4H5cXD+H/Bdza2aEWkSb8hnWIQorNcscRl4IEo1Cz9VI/+/r/jnGWkbWPx54g==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "engines": { @@ -1187,6 +1296,7 @@ } }, "node_modules/@typescript-eslint/type-utils": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.3.tgz", "integrity": "sha512-ZPCADbr+qfz3aiTTYNNkCbUt+cjNwI/5McyANNrFBpVxPt7GqpEYz5ZfdwuFyGUnJ9FdDXbGODUu6iRCI6XRXw==", @@ -1196,6 +1306,17 @@ "@typescript-eslint/types": "8.46.3", "@typescript-eslint/typescript-estree": "8.46.3", "@typescript-eslint/utils": "8.46.3", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.1.tgz", + "integrity": "sha512-+BlmiHIiqufBxkVnOtFwjah/vrkF4MtKKvpXrKSPLCkCtAp8H01/VV43sfqA98Od7nJpDcFnkwgyfQbOG0AMvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1", + "@typescript-eslint/utils": "8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1212,9 +1333,15 @@ } }, "node_modules/@typescript-eslint/types": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.3.tgz", "integrity": "sha512-G7Ok9WN/ggW7e/tOf8TQYMaxgID3Iujn231hfi0Pc7ZheztIJVpO44ekY00b7akqc6nZcvregk0Jpah3kep6hA==", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.1.tgz", + "integrity": "sha512-C+soprGBHwWBdkDpbaRC4paGBrkIXxVlNohadL5o0kfhsXqOC6GYH2S/Obmig+I0HTDl8wMaRySwrfrXVP8/pQ==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "engines": { @@ -1226,6 +1353,7 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.3.tgz", "integrity": "sha512-f/NvtRjOm80BtNM5OQtlaBdM5BRFUv7gf381j9wygDNL+qOYSNOgtQ/DCndiYi80iIOv76QqaTmp4fa9hwI0OA==", @@ -1236,6 +1364,18 @@ "@typescript-eslint/tsconfig-utils": "8.46.3", "@typescript-eslint/types": "8.46.3", "@typescript-eslint/visitor-keys": "8.46.3", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.1.tgz", + "integrity": "sha512-uIifjT4s8cQKFQ8ZBXXyoUODtRoAd7F7+G8MKmtzj17+1UbdzFl52AzRyZRyKqPHhgzvXunnSckVu36flGy8cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.1", + "@typescript-eslint/tsconfig-utils": "8.46.1", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1255,16 +1395,28 @@ } }, "node_modules/@typescript-eslint/utils": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.3.tgz", "integrity": "sha512-VXw7qmdkucEx9WkmR3ld/u6VhRyKeiF1uxWwCy/iuNfokjJ7VhsgLSOTjsol8BunSw190zABzpwdNsze2Kpo4g==", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.1.tgz", + "integrity": "sha512-vkYUy6LdZS7q1v/Gxb2Zs7zziuXN0wxqsetJdeZdRe/f5dwJFglmuvZBfTUivCtjH725C1jWCDfpadadD95EDQ==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", +<<<<<<< HEAD "@typescript-eslint/scope-manager": "8.46.3", "@typescript-eslint/types": "8.46.3", "@typescript-eslint/typescript-estree": "8.46.3" +======= + "@typescript-eslint/scope-manager": "8.46.1", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1" +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1279,6 +1431,7 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.3.tgz", "integrity": "sha512-uk574k8IU0rOF/AjniX8qbLSGURJVUCeM5e4MIMKBFFi8weeiLrG1fyQejyLXQpRZbU/1BuQasleV/RfHC3hHg==", @@ -1286,6 +1439,15 @@ "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.46.3", +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.1.tgz", + "integrity": "sha512-ptkmIf2iDkNUjdeu2bQqhFPV1m6qTnFFjg7PPDjxKWaMaP0Z6I9l30Jr3g5QqbZGdw8YdYvLp+XnqnWWZOg/NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.1", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -1909,20 +2071,34 @@ } }, "node_modules/eslint": { +<<<<<<< HEAD "version": "9.39.1", "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", +======= + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", + "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.1", +<<<<<<< HEAD "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.39.1", "@eslint/plugin-kit": "^0.4.1", +======= + "@eslint/config-helpers": "^0.4.1", + "@eslint/core": "^0.16.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.38.0", + "@eslint/plugin-kit": "^0.4.0", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -1969,9 +2145,15 @@ } }, "node_modules/eslint-plugin-erasable-syntax-only": { +<<<<<<< HEAD "version": "0.4.0", "resolved": "https://registry.npmjs.org/eslint-plugin-erasable-syntax-only/-/eslint-plugin-erasable-syntax-only-0.4.0.tgz", "integrity": "sha512-7dx2gpfVn0FFEGukLqsF/izW4hGvSaySNOkcuSCO4q6Khh0ecOGYlRhW9hhDUtNryuKc+cXd1WFiQdpae3xzaQ==", +======= + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-erasable-syntax-only/-/eslint-plugin-erasable-syntax-only-0.3.1.tgz", + "integrity": "sha512-f4Eo1LEZJfUP7/2PwNdFUcIUJlYAoCoie9BSoThQ4y4eO8bW+Sq38qC4IskYTu4+FW887mPW0wYuI9HU0nQnlg==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "dev": true, "license": "MIT", "dependencies": { @@ -3820,6 +4002,7 @@ } }, "node_modules/typescript-eslint": { +<<<<<<< HEAD "version": "8.46.3", "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.3.tgz", "integrity": "sha512-bAfgMavTuGo+8n6/QQDVQz4tZ4f7Soqg53RbrlZQEoAltYop/XR4RAts/I0BrO3TTClTSTFJ0wYbla+P8cEWJA==", @@ -3830,6 +4013,18 @@ "@typescript-eslint/parser": "8.46.3", "@typescript-eslint/typescript-estree": "8.46.3", "@typescript-eslint/utils": "8.46.3" +======= + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.1.tgz", + "integrity": "sha512-VHgijW803JafdSsDO8I761r3SHrgk4T00IdyQ+/UsthtgPRsBWQLqoSxOolxTpxRKi1kGXK0bSz4CoAc9ObqJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.46.1", + "@typescript-eslint/parser": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1", + "@typescript-eslint/utils": "8.46.1" +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3851,9 +4046,15 @@ "license": "MIT" }, "node_modules/undici-types": { +<<<<<<< HEAD "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", +======= + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz", + "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==", +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) "license": "MIT" }, "node_modules/uri-js": { diff --git a/src/util.ts b/src/util.ts index e502e600d9..fe6a0a3558 100644 --- a/src/util.ts +++ b/src/util.ts @@ -165,6 +165,45 @@ export function normalizeResponseHeaders(response: Response): { [key: string]: s return normalizedHeaders; } +/** + * Built-in Kubernetes API groups that have generated TypeScript models. + * Custom resources and third-party API groups (like Knative) are not included. + */ +const BUILT_IN_API_GROUPS = new Set([ + 'core', // maps to "" (empty string) for core resources like Pod, Service, etc. + 'admissionregistration.k8s.io', + 'apiextensions.k8s.io', + 'apiregistration.k8s.io', + 'apps', + 'authentication.k8s.io', + 'authorization.k8s.io', + 'autoscaling', + 'batch', + 'certificates.k8s.io', + 'coordination.k8s.io', + 'discovery.k8s.io', + 'events.k8s.io', + 'flowcontrol.apiserver.k8s.io', + 'internal.apiserver.k8s.io', + 'networking.k8s.io', + 'node.k8s.io', + 'policy', + 'rbac.authorization.k8s.io', + 'resource.k8s.io', + 'scheduling.k8s.io', + 'storage.k8s.io', + 'storagemigration.k8s.io', +]); + +/** + * Check if the given API group is a built-in Kubernetes API group. + * @param group - The API group to check (e.g., "apps", "serving.knative.dev", "core") + * @returns true if the group is a built-in Kubernetes API group, false otherwise + */ +function isBuiltInApiGroup(group: string): boolean { + return BUILT_IN_API_GROUPS.has(group); +} + export function getSerializationType(apiVersion?: string, kind?: string): string { if (apiVersion === undefined || kind === undefined) { return 'KubernetesObject'; @@ -172,6 +211,12 @@ export function getSerializationType(apiVersion?: string, kind?: string): string // Types are defined in src/gen/api/models with the format "". // Version and Kind are in PascalCase. const gv = groupVersion(apiVersion); + + // Only return a type name if this is a built-in Kubernetes API group + if (!isBuiltInApiGroup(gv.group)) { + return 'KubernetesObject'; + } + const version = gv.version.charAt(0).toUpperCase() + gv.version.slice(1); return `${version}${kind}`; } diff --git a/src/util_test.ts b/src/util_test.ts index 74a323a866..a932b7bbd0 100644 --- a/src/util_test.ts +++ b/src/util_test.ts @@ -147,6 +147,18 @@ describe('Utils', () => { it('should get the serialization type correctly', () => { strictEqual(getSerializationType('v1', 'Pod'), 'V1Pod'); strictEqual(getSerializationType('apps/v1', 'Deployment'), 'V1Deployment'); + // Built-in Kubernetes resources should return a type + strictEqual(getSerializationType('v1', 'Pod'), 'V1Pod'); + strictEqual(getSerializationType('apps/v1', 'Deployment'), 'V1Deployment'); + strictEqual(getSerializationType('v1', 'Service'), 'V1Service'); + strictEqual(getSerializationType('batch/v1', 'Job'), 'V1Job'); + + // Non-built-in resources should return 'KubernetesObject' + strictEqual(getSerializationType('serving.knative.dev/v1', 'Service'), 'KubernetesObject'); + strictEqual(getSerializationType('example.com/v1', 'MyCustomResource'), 'KubernetesObject'); + strictEqual(getSerializationType('custom.io/v1alpha1', 'CustomThing'), 'KubernetesObject'); + + // Undefined inputs should return 'KubernetesObject' strictEqual(getSerializationType(undefined, undefined), 'KubernetesObject'); }); }); diff --git a/src/watch_test.ts b/src/watch_test.ts index 7be5c1f6c0..58b9bc5a29 100644 --- a/src/watch_test.ts +++ b/src/watch_test.ts @@ -452,6 +452,7 @@ describe('Watch', () => { s.done(); }); +<<<<<<< HEAD it('should timeout when server takes too long to respond', async (t) => { const kc = await setupMockSystem(t, (_req: any, _res: any) => { // Don't respond - simulate a hanging server @@ -485,6 +486,8 @@ describe('Watch', () => { strictEqual(doneErr.name, 'AbortError'); }); +======= +>>>>>>> 8c293c32 (Fix Knative Service YAML parsing by checking API groups) it('should throw on empty config', async () => { const kc = new KubeConfig(); const watch = new Watch(kc); diff --git a/src/yaml_test.ts b/src/yaml_test.ts index 958f7ba45b..c08d1dd158 100644 --- a/src/yaml_test.ts +++ b/src/yaml_test.ts @@ -154,4 +154,54 @@ spec: // not using strict equality as types are not matching deepEqual(actual, expected); }); + + it('should load Knative Service correctly preserving spec', () => { + const yaml = `apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + name: hello-world +spec: + template: + spec: + containers: + - image: ghcr.io/knative/helloworld-go:latest + ports: + - containerPort: 8080 + env: + - name: TARGET + value: "World"`; + const knativeService = loadYaml(yaml); + + strictEqual(knativeService.apiVersion, 'serving.knative.dev/v1'); + strictEqual(knativeService.kind, 'Service'); + strictEqual(knativeService.metadata.name, 'hello-world'); + // Verify that the spec is preserved + strictEqual( + knativeService.spec.template.spec.containers[0].image, + 'ghcr.io/knative/helloworld-go:latest', + ); + strictEqual(knativeService.spec.template.spec.containers[0].ports[0].containerPort, 8080); + strictEqual(knativeService.spec.template.spec.containers[0].env[0].name, 'TARGET'); + strictEqual(knativeService.spec.template.spec.containers[0].env[0].value, 'World'); + }); + + it('should load custom resources correctly', () => { + const yaml = `apiVersion: example.com/v1 +kind: MyCustomResource +metadata: + name: my-resource +spec: + customField: customValue + nestedObject: + key1: value1 + key2: value2`; + const customResource = loadYaml(yaml); + + strictEqual(customResource.apiVersion, 'example.com/v1'); + strictEqual(customResource.kind, 'MyCustomResource'); + strictEqual(customResource.metadata.name, 'my-resource'); + strictEqual(customResource.spec.customField, 'customValue'); + strictEqual(customResource.spec.nestedObject.key1, 'value1'); + strictEqual(customResource.spec.nestedObject.key2, 'value2'); + }); });