@eclipse-che/che-devworkspace-generator 7.88.0-next-9fad47a → 7.88.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-che/che-devworkspace-generator",
3
- "version": "7.88.0-next-9fad47a",
3
+ "version": "7.88.0",
4
4
  "private": false,
5
5
  "description": "Generates DevWorkspaces by transforming existing devfiles",
6
6
  "main": "lib/entrypoint.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
34
- "url": "git+https://github.com/eclipse-che/che-devfile-registry.git"
34
+ "url": "git+https://github.com/devfile/devworkspace-generator.git"
35
35
  },
36
36
  "author": "",
37
37
  "license": "EPL-2.0",
@@ -51,12 +51,12 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/jest": "^27.0.2",
54
- "eslint": "^8.1.0",
54
+ "eslint": "^9.5.0",
55
55
  "if-env": "^1.0.4",
56
56
  "jest": "^27.3.1",
57
- "prettier": "^2.4.1",
57
+ "prettier": "^3.3.2",
58
58
  "rimraf": "^5.0.7",
59
- "rollup": "^2.44.0",
59
+ "rollup": "^4.18.0",
60
60
  "ts-jest": "^27.0.7",
61
61
  "typescript": "^4.4.4"
62
62
  },
@@ -16,7 +16,7 @@ export class BitbucketUrl implements Url {
16
16
  constructor(
17
17
  private readonly workspaceId: string,
18
18
  private readonly repoName: string,
19
- private readonly branchName: string
19
+ private readonly branchName: string,
20
20
  ) {}
21
21
 
22
22
  getContentUrl(path: string): string {
@@ -17,7 +17,7 @@ export class BitbucketServerUrl implements Url {
17
17
  private readonly user: string | undefined,
18
18
  private readonly project: string | undefined,
19
19
  private readonly repo: string,
20
- private readonly branch: string | undefined
20
+ private readonly branch: string | undefined,
21
21
  ) {}
22
22
 
23
23
  getContentUrl(path: string): string {
@@ -24,7 +24,7 @@ export class DevContainerComponentFinder {
24
24
  async find(
25
25
  devfileContext: DevfileContext,
26
26
  injectDefaultComponent?: string,
27
- defaultComponentImage?: string
27
+ defaultComponentImage?: string,
28
28
  ): Promise<V1alpha2DevWorkspaceSpecTemplateComponents | undefined> {
29
29
  // if a devfile contains a parent, we should not add a default dev container
30
30
  if (devfileContext.devfile?.parent) {
@@ -35,7 +35,7 @@ export class DevContainerComponentFinder {
35
35
  ?.filter(component => component.container)
36
36
  .filter(
37
37
  // we should ignore component that do not mount the sources
38
- component => component.container && component.container.mountSources !== false
38
+ component => component.container && component.container.mountSources !== false,
39
39
  );
40
40
 
41
41
  if (!devComponents || devComponents.length === 0) {
@@ -53,8 +53,8 @@ export class DevContainerComponentFinder {
53
53
  } else {
54
54
  console.warn(
55
55
  `More than one dev container component has been potentially found, taking the first one of ${devComponents.map(
56
- component => component.name
57
- )}`
56
+ component => component.name,
57
+ )}`,
58
58
  );
59
59
  return devComponents[0];
60
60
  }
@@ -35,7 +35,7 @@ export class DevContainerComponentInserter {
35
35
 
36
36
  const devContainerImage = defaultComponentImage ? defaultComponentImage : this.DEFAULT_DEV_CONTAINER_IMAGE;
37
37
  console.log(
38
- `No container component has been found. A default container component with image ${devContainerImage} will be added.`
38
+ `No container component has been found. A default container component with image ${devContainerImage} will be added.`,
39
39
  );
40
40
  const devContainerComponent: V1alpha2DevWorkspaceSpecTemplateComponents = {
41
41
  name: this.DEFAULT_DEV_CONTAINER_NAME,
package/src/generate.ts CHANGED
@@ -39,13 +39,13 @@ export class Generate {
39
39
  editorContent: string,
40
40
  outputFile?: string,
41
41
  injectDefaultComponent?: string,
42
- defaultComponentImage?: string
42
+ defaultComponentImage?: string,
43
43
  ): Promise<DevfileContext> {
44
44
  const context = await this.generateContent(
45
45
  devfileContent,
46
46
  editorContent,
47
47
  injectDefaultComponent,
48
- defaultComponentImage
48
+ defaultComponentImage,
49
49
  );
50
50
 
51
51
  // write the result
@@ -67,7 +67,7 @@ export class Generate {
67
67
  devfileContent: string,
68
68
  editorContent: string,
69
69
  injectDefaultComponent?: string,
70
- defaultComponentImage?: string
70
+ defaultComponentImage?: string,
71
71
  ): Promise<DevfileContext> {
72
72
  const devfile = jsYaml.load(devfileContent);
73
73
 
@@ -17,7 +17,7 @@ export class GithubUrl implements Url {
17
17
  private readonly repoUser: string,
18
18
  private readonly repoName: string,
19
19
  private readonly branchName: string,
20
- private readonly subFolder: string
20
+ private readonly subFolder: string,
21
21
  ) {}
22
22
 
23
23
  /**
package/src/main.ts CHANGED
@@ -43,7 +43,7 @@ export class Main {
43
43
  injectDefaultComponent?: string;
44
44
  defaultComponentImage?: string;
45
45
  },
46
- axiosInstance: axios.AxiosInstance
46
+ axiosInstance: axios.AxiosInstance,
47
47
  ): Promise<DevfileContext> {
48
48
  if (!params.editorPath && !params.editorEntry && !params.editorContent) {
49
49
  throw new Error('missing editorPath or editorEntry or editorContent');
@@ -113,7 +113,7 @@ export class Main {
113
113
  console.log(`Validating devfile`);
114
114
  const validationResult: ValidatorResult = devfileSchemaValidator.validateDevfile(
115
115
  jsYamlDevfileContent,
116
- schemaVersion
116
+ schemaVersion,
117
117
  );
118
118
  if (!validationResult.valid) {
119
119
  throw new Error(`Devfile schema validation failed. Error: ${validationResult.toString()}`);
@@ -139,7 +139,7 @@ export class Main {
139
139
  editorContent,
140
140
  params.outputFile,
141
141
  params.injectDefaultComponent,
142
- params.defaultComponentImage
142
+ params.defaultComponentImage,
143
143
  );
144
144
  }
145
145
 
@@ -238,7 +238,7 @@ export class Main {
238
238
  injectDefaultComponent,
239
239
  defaultComponentImage,
240
240
  },
241
- axios.default
241
+ axios.default,
242
242
  );
243
243
  return true;
244
244
  } catch (error) {