Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade @eclipse-che/che-devworkspace-generator and @devfile/api #1278

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .deps/EXCLUDED/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ This file lists dependencies that do not need CQs or auto-detection does not wor

| Packages | Resolved CQs |
| --- | --- |
| `@devfile/[email protected]` | N/A |
| `@fastify/[email protected]` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@fastify/cors/9.0.1) |
| `@fastify/[email protected]` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@fastify/swagger-ui/4.2.0) |
| `@hapi/[email protected]` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@hapi/hoek/10.0.1) |
Expand Down
8 changes: 4 additions & 4 deletions .deps/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
| [`@codemirror/[email protected]`](https://github.com/codemirror/language.git) | MIT | clearlydefined |
| [`@codemirror/[email protected]`](https://github.com/codemirror/state.git) | MIT | clearlydefined |
| [`@codemirror/[email protected]`](https://github.com/codemirror/view.git) | MIT | clearlydefined |
| [`@devfile/[email protected]1721400636`](https://github.com/GIT_USER_ID/GIT_REPO_ID.git) | Apache-2.0 | clearlydefined |
| [`@eclipse-che/che-devworkspace-generator@7.90.0-next-4510df7`](git+https://github.com/devfile/devworkspace-generator.git) | EPL-2.0 | ecd.che |
| [`@devfile/[email protected]1733171449`](https://github.com/GIT_USER_ID/GIT_REPO_ID.git) | Apache-2.0 | |
| [`@eclipse-che/che-devworkspace-generator@7.96.0-next-da9f364`](git+https://github.com/devfile/devworkspace-generator.git) | EPL-2.0 | ecd.che |
| [`@fastify/[email protected]`](git+https://github.com/fastify/accept-negotiator.git) | MIT | clearlydefined |
| [`@fastify/[email protected]`](git+https://github.com/fastify/ajv-compiler.git) | MIT | clearlydefined |
| [`@fastify/[email protected]`](https://github.com/fastify/busboy.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -78,7 +78,7 @@
| [`[email protected]`](https://github.com/npm/abbrev-js.git) | ISC | clearlydefined |
| [`[email protected]`](git+https://github.com/mysticatea/abort-controller.git) | MIT | #7592 |
| [`[email protected]`](git+https://github.com/jsumners/abstract-logging.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/TooTallNate/proxy-agents.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/TooTallNate/proxy-agents.git) | MIT | #17896 |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](git+https://github.com/ajv-validator/ajv-formats.git) | MIT | clearlydefined |
| [`[email protected]`](git+https://github.com/ajv-validator/ajv-formats.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -253,7 +253,7 @@
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/TooTallNate/proxy-agents.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/joyent/node-http-signature.git) | MIT | #2732 |
| [`[email protected]`](https://github.com/TooTallNate/proxy-agents.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/TooTallNate/proxy-agents.git) | MIT | #17900 |
| `[email protected]` | ISC | clearlydefined |
| [`[email protected]`](git://github.com/ashtuchkin/iconv-lite.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/feross/ieee754.git) | BSD-3-Clause | clearlydefined |
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "yarn test --watch"
},
"devDependencies": {
"@devfile/api": "2.3.0-1721400636",
"@devfile/api": "2.3.0-1733171449",
"@kubernetes/client-node": "^0.22.1",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.3.0",
Expand Down
7 changes: 0 additions & 7 deletions packages/dashboard-backend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ module.exports = {
moduleNameMapper: {
// mapping for absolute imports (see tsconfig.json)
'^@/(.*)$': '<rootDir>/src/$1',

// not everything we need is exported from the package
// so we need to alias the rest
'@devfile/api/(.*)$': '<rootDir>/../../node_modules/@devfile/api/$1.ts',
},
transformIgnorePatterns: [
'node_modules/(?!@devfile/api)',
],
collectCoverageFrom: [
...base.collectCoverageFrom,

Expand Down
4 changes: 2 additions & 2 deletions packages/dashboard-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
],
"license": "EPL-2.0",
"dependencies": {
"@devfile/api": "2.3.0-1721400636",
"@eclipse-che/che-devworkspace-generator": "7.90.0-next-4510df7",
"@devfile/api": "2.3.0-1733171449",
"@eclipse-che/che-devworkspace-generator": "7.96.0-next-da9f364",
"@fastify/cors": "^9.0.1",
"@fastify/error": "^3.4.1",
"@fastify/http-proxy": "^9.5.0",
Expand Down
19 changes: 19 additions & 0 deletions packages/dashboard-backend/src/constants/devfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2018-2024 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/

export const devworkspaceGroup = 'workspace.devfile.io';
export const devworkspacePlural = 'devworkspaces';
export const devworkspaceLatestVersion = 'v1alpha2';

export const devworkspacetemplateGroup = 'workspace.devfile.io';
export const devworkspacetemplatePlural = 'devworkspacetemplates';
export const devworkspacetemplateLatestVersion = 'v1alpha2';
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
/* eslint-disable @typescript-eslint/no-unused-vars */

import { V1alpha2DevWorkspace } from '@devfile/api';
import { devworkspaceGroup, devworkspaceLatestVersion, devworkspacePlural } from '@devfile/api/api';
import { api } from '@eclipse-che/common';
import * as mockClient from '@kubernetes/client-node';
import { CustomObjectsApi } from '@kubernetes/client-node';
import { IncomingMessage } from 'http';

import {
devworkspaceGroup,
devworkspaceLatestVersion,
devworkspacePlural,
} from '@/constants/devfile';
import { DevWorkspaceApiService } from '@/devworkspaceClient/services/devWorkspaceApi';

const namespace = 'user-che';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
*/

import { V1alpha2DevWorkspace } from '@devfile/api';
import { devworkspaceGroup, devworkspaceLatestVersion, devworkspacePlural } from '@devfile/api/api';
import * as mockClient from '@kubernetes/client-node';
import { CustomObjectsApi } from '@kubernetes/client-node';

import {
devworkspaceGroup,
devworkspaceLatestVersion,
devworkspacePlural,
} from '@/constants/devfile';
import {
CheClusterCustomResource,
CustomResourceDefinitionList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
/* eslint-disable @typescript-eslint/no-unused-vars */

import { V1alpha2DevWorkspaceTemplate } from '@devfile/api';
import {
devworkspacetemplateGroup,
devworkspacetemplateLatestVersion,
devworkspacetemplatePlural,
} from '@devfile/api/api';
import { api } from '@eclipse-che/common';
import * as mockClient from '@kubernetes/client-node';
import { CustomObjectsApi } from '@kubernetes/client-node';

import {
devworkspacetemplateGroup,
devworkspacetemplateLatestVersion,
devworkspacetemplatePlural,
} from '@/constants/devfile';
import {
DevWorkspaceTemplateApiService,
DevWorkspaceTemplateList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
*/

import { V1alpha2DevWorkspace } from '@devfile/api';
import { devworkspaceGroup, devworkspaceLatestVersion, devworkspacePlural } from '@devfile/api/api';
import { api } from '@eclipse-che/common';
import * as k8s from '@kubernetes/client-node';
import { V1Status } from '@kubernetes/client-node';
import http, { IncomingHttpHeaders } from 'http';

import {
devworkspaceGroup,
devworkspaceLatestVersion,
devworkspacePlural,
} from '@/constants/devfile';
import { createError } from '@/devworkspaceClient/services/helpers/createError';
import {
CustomObjectAPI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
*/

import { V1alpha2DevWorkspace } from '@devfile/api';
import { devworkspaceGroup, devworkspaceLatestVersion, devworkspacePlural } from '@devfile/api/api';
import { api } from '@eclipse-che/common';
import * as k8s from '@kubernetes/client-node';
import { V1Status } from '@kubernetes/client-node';
import http from 'http';

import {
devworkspaceGroup,
devworkspaceLatestVersion,
devworkspacePlural,
} from '@/constants/devfile';
import { prepareCustomObjectWatch } from '@/devworkspaceClient/services/helpers/prepareCustomObjectWatch';
import { ServerConfigApiService } from '@/devworkspaceClient/services/serverConfigApi';
import { IDevWorkspaceClusterApi } from '@/devworkspaceClient/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
*/

import { V1alpha2DevWorkspaceTemplate } from '@devfile/api';
import { api } from '@eclipse-che/common';
import * as k8s from '@kubernetes/client-node';

import {
devworkspacetemplateGroup,
devworkspacetemplateLatestVersion,
devworkspacetemplatePlural,
} from '@devfile/api/api';
import { api } from '@eclipse-che/common';
import * as k8s from '@kubernetes/client-node';

} from '@/constants/devfile';
import { createError } from '@/devworkspaceClient/services/helpers/createError';
import {
CustomObjectAPI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export function registerDevworkspaceResourcesRoute(instance: FastifyInstance) {
{
devfileContent,
editorPath,
pluginRegistryUrl: undefined,
editorEntry: undefined,
editorContent,
projects: [],
},
Expand Down
4 changes: 0 additions & 4 deletions packages/dashboard-backend/webpack.config.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ module.exports = () => {
alias: {
// alias for absolute imports (see tsconfig.json)
'@': path.resolve(__dirname, 'src/'),

// not everything we need is exported from the package
// so we need to alias the rest
'@devfile/api/api': path.resolve(__dirname, '../../node_modules/@devfile/api/api.ts'),
},
},
resolveLoader: {},
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"sanitize-html": "^2.11.0"
},
"devDependencies": {
"@devfile/api": "2.3.0-1721400636",
"@devfile/api": "2.3.0-1733171449",
"@eclipse-che/api": "^7.86.0",
"@kubernetes/client-node": "^0.22.1",
"@react-mock/state": "^0.1.8",
Expand Down
1 change: 1 addition & 0 deletions scripts/yarn/old_version/.deps/EXCLUDED/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ This file lists dependencies that do not need CQs or auto-detection does not wor

| Packages | Resolved CQs |
| --- | --- |
| `@devfile/[email protected]` | N/A |
| `@fastify/[email protected]` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@fastify/cors/9.0.1) |
| `@fastify/[email protected]` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@fastify/swagger-ui/4.2.0) |
| `@hapi/[email protected]` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@hapi/hoek/10.0.1) |
Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -554,17 +554,17 @@ __metadata:
languageName: node
linkType: hard

"@devfile/api@npm:2.3.0-1721400636":
version: 2.3.0-1721400636
resolution: "@devfile/api@npm:2.3.0-1721400636"
"@devfile/api@npm:2.3.0-1733171449":
version: 2.3.0-1733171449
resolution: "@devfile/api@npm:2.3.0-1733171449"
dependencies:
"@types/node": "*"
"@types/node-fetch": ^2.5.7
es6-promise: ^4.2.4
form-data: ^2.5.0
node-fetch: ^2.6.0
url-parse: ^1.4.3
checksum: 98f5e2bc03e3b2d4ec649176aa57a5cf1538fa37a94d1dbe48ebfb4efbdf2d1ecbcf18a4f842f4be9f7bff9ace89fb5d6061d9eb7e24a1a7455ece67fbe36a14
checksum: 770f09371f97e2e694e1f9a3b5c72726f9e2107f040720a541330365625caa03879f4cced5baab15c55319bd863d6db8a2c9f2880bba8b2b41a3b08c0edd09d0
languageName: node
linkType: hard

Expand All @@ -582,12 +582,12 @@ __metadata:
languageName: node
linkType: hard

"@eclipse-che/che-devworkspace-generator@npm:7.90.0-next-4510df7":
version: 7.90.0-next-4510df7
resolution: "@eclipse-che/che-devworkspace-generator@npm:7.90.0-next-4510df7"
"@eclipse-che/che-devworkspace-generator@npm:7.96.0-next-da9f364":
version: 7.96.0-next-da9f364
resolution: "@eclipse-che/che-devworkspace-generator@npm:7.96.0-next-da9f364"
dependencies:
"@devfile/api": 2.3.0-1721400636
axios: ^1.7.0
"@devfile/api": 2.3.0-1733171449
axios: ^1.7.4
fs-extra: ^11.2.0
inversify: ^6.0.2
js-yaml: ^4.0.0
Expand All @@ -596,15 +596,15 @@ __metadata:
reflect-metadata: ^0.2.2
bin:
che-devworkspace-generator: lib/entrypoint.js
checksum: 6bceb055206cf7a7b0e78892705aa83b33ad910778f8e6cf4d5edf230054a5cdeb310ea3d908e9f4b78dfc3bb9d748c2872fcea178dd457b61ff33d690fce78f
checksum: 37806af3c7d6e511354409ac0e484c635235aa7b7b57fb5feeaf7f028860066d22f00c3e74f49f1a28df5914f5d4d429bd5f9efc0b717e08fcff8252ed86858e
languageName: node
linkType: hard

"@eclipse-che/common@workspace:packages/common":
version: 0.0.0-use.local
resolution: "@eclipse-che/common@workspace:packages/common"
dependencies:
"@devfile/api": 2.3.0-1721400636
"@devfile/api": 2.3.0-1733171449
"@kubernetes/client-node": ^0.22.1
"@types/jest": ^29.5.3
"@typescript-eslint/eslint-plugin": ^6.3.0
Expand All @@ -627,8 +627,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@eclipse-che/dashboard-backend@workspace:packages/dashboard-backend"
dependencies:
"@devfile/api": 2.3.0-1721400636
"@eclipse-che/che-devworkspace-generator": 7.90.0-next-4510df7
"@devfile/api": 2.3.0-1733171449
"@eclipse-che/che-devworkspace-generator": 7.96.0-next-da9f364
"@fastify/cors": ^9.0.1
"@fastify/error": ^3.4.1
"@fastify/http-proxy": ^9.5.0
Expand Down Expand Up @@ -691,7 +691,7 @@ __metadata:
"@codemirror/language": ^6.10.3
"@codemirror/state": ^6.4.1
"@codemirror/view": ^6.34.1
"@devfile/api": 2.3.0-1721400636
"@devfile/api": 2.3.0-1733171449
"@eclipse-che/api": ^7.86.0
"@kubernetes/client-node": ^0.22.1
"@lezer/highlight": ^1.2.1
Expand Down
Loading