@eclipse-che/che-devworkspace-generator 7.93.0 → 7.94.0-next-7fcbae4

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,9 +1,51 @@
1
1
  ## DevWorkspace Generator
2
- The library is used by Devfile registry component to generate the DevWorkspace components and DevWorkspace templates. It requires editor definitions from the
3
- [che-plugin-registry](https://github.com/eclipse-che/che-plugin-registry/).
2
+ [![Contribute](https://www.eclipse.org/che/contribute.svg)](https://workspaces.openshift.com#https://github.com/devfile/devworkspace-generator)
3
+ [![Contribute (nightly)](https://img.shields.io/static/v1?label=nightly%20Che&message=for%20maintainers&logo=eclipseche&color=FDB940&labelColor=525C86)](https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com#https://github.com/devfile/devworkspace-generator)
4
+
5
+ The library is used by Eclipse Che to generate DevWorkspace components and templates. It requires both the original devfile.yaml and the editor definitions.
6
+
7
+ ## Where is it Published?
8
+ This library is available on npm.
9
+
10
+ You can find the published package here: \
11
+ __npm:__ [@eclipse-che/che-devworkspace-generator](https://www.npmjs.com/package/@eclipse-che/che-devworkspace-generator)
12
+
13
+ ## Usage
14
+
15
+ ### Here’s an example of how to use the @eclipse-che/che-devworkspace-generator library to generate a DevWorkspace and DevWorkspaceTemplate:
16
+
17
+ ```typescript
18
+ import { Main as DevworkspaceGenerator } from '@eclipse-che/che-devworkspace-generator/lib/main';
19
+ import { V1alpha2DevWorkspaceTemplate } from '@devfile/api';
20
+ import { dump } from 'js-yaml';
21
+
22
+ // Initialize the DevWorkspace generator
23
+ const generator = new DevworkspaceGenerator();
24
+
25
+ // Example function to generate DevWorkspace resources
26
+ async function generateDevWorkspace(devfileContent: string, editorContent: string, axiosInstance: any) {
27
+ // Generate the Devfile context
28
+ const context = await generator.generateDevfileContext(
29
+ {
30
+ devfileContent,
31
+ editorContent,
32
+ projects: [],
33
+ },
34
+ axiosInstance,
35
+ );
36
+
37
+ // Convert templates and DevWorkspace to YAML
38
+ const allContentArray = context.devWorkspaceTemplates.map(
39
+ (template: V1alpha2DevWorkspaceTemplate) => dump(template),
40
+ );
41
+ allContentArray.push(dump(context.devWorkspace));
42
+
43
+ // Return the YAML content joined by "---"
44
+ return allContentArray.join('---\n');
45
+ }
46
+ ```
4
47
 
5
- ## How to use the library
6
- The library can be used as a standalone library.
48
+ ### The library can be used as a standalone library:
7
49
 
8
50
  ```
9
51
  USAGE
@@ -14,10 +56,11 @@ OPTIONS
14
56
  or
15
57
  --devfile-path: path to the devfile.yaml file
16
58
 
17
- --plugin-registry-url: URL to the plugin registry that contains editor definitions (devfile.yaml)
18
- --editor-entry: editor ID, found on the <plugin-registry-url>, to resolve the devfile.yaml
59
+ --editor-url: URL for the editor's definition, should be publicly accessible for download.
19
60
  or
20
61
  --editor-path: local file path of the editor devfile.yaml
62
+ or
63
+ --editor-content: content of the editor devfile.yaml
21
64
 
22
65
  --output-file: local file path for the generated devworkspace yaml
23
66
 
@@ -29,12 +72,11 @@ OPTIONS
29
72
 
30
73
  EXAMPLES
31
74
 
32
- # online example, using editor definition from https://che-plugin-registry-main.surge.sh/
75
+ # online example, using editor definition from https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-insiders.yaml
33
76
 
34
77
  $ node lib/entrypoint.js \
35
78
  --devfile-url:https://github.com/che-samples/java-spring-petclinic/tree/main \
36
- --plugin-registry-url:https://che-plugin-registry-main.surge.sh/v3/ \
37
- --editor-entry:che-incubator/che-code/latest \
79
+ --editor-url:https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-insiders.yaml \
38
80
  --output-file:/tmp/devworkspace-che-code-latest.yaml \
39
81
  --injectDefaultComponent:true \
40
82
  --defaultComponentImage:registry.access.redhat.com/ubi8/openjdk-11:latest
@@ -8,5 +8,5 @@
8
8
  * SPDX-License-Identifier: EPL-2.0
9
9
  ***********************************************************************/
10
10
  import { ContainerModule } from 'inversify';
11
- declare const pluginRegistryModule: ContainerModule;
12
- export { pluginRegistryModule };
11
+ declare const editorModule: ContainerModule;
12
+ export { editorModule };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pluginRegistryModule = void 0;
3
+ exports.editorModule = void 0;
4
4
  /**********************************************************************
5
5
  * Copyright (c) 2022-2024
6
6
  *
@@ -11,9 +11,9 @@ exports.pluginRegistryModule = void 0;
11
11
  * SPDX-License-Identifier: EPL-2.0
12
12
  ***********************************************************************/
13
13
  const inversify_1 = require("inversify");
14
- const plugin_registry_resolver_1 = require("./plugin-registry-resolver");
15
- const pluginRegistryModule = new inversify_1.ContainerModule((bind) => {
16
- bind(plugin_registry_resolver_1.PluginRegistryResolver).toSelf().inSingletonScope();
14
+ const editor_resolver_1 = require("./editor-resolver");
15
+ const editorModule = new inversify_1.ContainerModule((bind) => {
16
+ bind(editor_resolver_1.EditorResolver).toSelf().inSingletonScope();
17
17
  });
18
- exports.pluginRegistryModule = pluginRegistryModule;
19
- //# sourceMappingURL=plugin-registry-module.js.map
18
+ exports.editorModule = editorModule;
19
+ //# sourceMappingURL=editor-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-module.js","sourceRoot":"","sources":["../../src/editor/editor-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;yEAQyE;AACzE,yCAAwD;AAExD,uDAAmD;AAEnD,MAAM,YAAY,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAqB,EAAE,EAAE;IACjE,IAAI,CAAC,gCAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACnD,CAAC,CAAC,CAAC;AAEM,oCAAY"}
@@ -10,8 +10,7 @@
10
10
  /**
11
11
  * Resolve plug-ins by grabbing the definition from the plug-in registry.
12
12
  */
13
- export declare class PluginRegistryResolver {
14
- private pluginRegistryUrl;
13
+ export declare class EditorResolver {
15
14
  private urlFetcher;
16
- loadDevfilePlugin(devfileId: string): Promise<any>;
15
+ loadEditor(editorUrl: string): Promise<any>;
17
16
  }
@@ -38,33 +38,27 @@ var __importStar = (this && this.__importStar) || function (mod) {
38
38
  return result;
39
39
  };
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.PluginRegistryResolver = void 0;
41
+ exports.EditorResolver = void 0;
42
42
  const jsYaml = __importStar(require("js-yaml"));
43
43
  const inversify_1 = require("inversify");
44
44
  const url_fetcher_1 = require("../fetch/url-fetcher");
45
45
  /**
46
46
  * Resolve plug-ins by grabbing the definition from the plug-in registry.
47
47
  */
48
- let PluginRegistryResolver = class PluginRegistryResolver {
49
- pluginRegistryUrl;
48
+ let EditorResolver = class EditorResolver {
50
49
  urlFetcher;
51
- // FQN id (like che-incubator/che-code/next)
50
+ // Editor URL (like https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-latest.yaml)
52
51
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
- async loadDevfilePlugin(devfileId) {
54
- const devfileUrl = `${this.pluginRegistryUrl}/plugins/${devfileId}/devfile.yaml`;
55
- const devfileContent = await this.urlFetcher.fetchText(devfileUrl);
52
+ async loadEditor(editorUrl) {
53
+ const devfileContent = await this.urlFetcher.fetchText(editorUrl);
56
54
  return jsYaml.load(devfileContent);
57
55
  }
58
56
  };
59
- exports.PluginRegistryResolver = PluginRegistryResolver;
60
- __decorate([
61
- (0, inversify_1.inject)('string'),
62
- (0, inversify_1.named)('PLUGIN_REGISTRY_URL')
63
- ], PluginRegistryResolver.prototype, "pluginRegistryUrl", void 0);
57
+ exports.EditorResolver = EditorResolver;
64
58
  __decorate([
65
59
  (0, inversify_1.inject)(url_fetcher_1.UrlFetcher)
66
- ], PluginRegistryResolver.prototype, "urlFetcher", void 0);
67
- exports.PluginRegistryResolver = PluginRegistryResolver = __decorate([
60
+ ], EditorResolver.prototype, "urlFetcher", void 0);
61
+ exports.EditorResolver = EditorResolver = __decorate([
68
62
  (0, inversify_1.injectable)()
69
- ], PluginRegistryResolver);
70
- //# sourceMappingURL=plugin-registry-resolver.js.map
63
+ ], EditorResolver);
64
+ //# sourceMappingURL=editor-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-resolver.js","sourceRoot":"","sources":["../../src/editor/editor-resolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;yEAQyE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzE,gDAAkC;AAElC,yCAA+C;AAE/C,sDAAkD;AAElD;;GAEG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAc;IAEjB,UAAU,CAAa;IAE/B,wIAAwI;IACxI,8DAA8D;IAC9D,KAAK,CAAC,UAAU,CAAC,SAAiB;QAChC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;CACF,CAAA;AAVY,wCAAc;AAEjB;IADP,IAAA,kBAAM,EAAC,wBAAU,CAAC;kDACY;yBAFpB,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAU1B"}
@@ -21,6 +21,5 @@ export declare class InversifyBinding {
21
21
  * Options for inversify bindings
22
22
  */
23
23
  export interface InversifyBindingOptions {
24
- pluginRegistryUrl: string;
25
24
  axiosInstance: AxiosInstance;
26
25
  }
@@ -16,7 +16,7 @@ const devfile_module_1 = require("../devfile/devfile-module");
16
16
  const fetch_module_1 = require("../fetch/fetch-module");
17
17
  const github_module_1 = require("../github/github-module");
18
18
  const resolve_module_1 = require("../resolve/resolve-module");
19
- const plugin_registry_module_1 = require("../plugin-registry/plugin-registry-module");
19
+ const editor_module_1 = require("../editor/editor-module");
20
20
  const devfile_schema_module_1 = require("../devfile-schema/devfile-schema-module");
21
21
  const bitbucket_module_1 = require("../bitbucket/bitbucket-module");
22
22
  const bitbucket_server_module_1 = require("../bitbucket-server/bitbucket-server-module");
@@ -33,10 +33,9 @@ class InversifyBinding {
33
33
  this.container.load(bitbucket_module_1.bitbucketModule);
34
34
  this.container.load(bitbucket_server_module_1.bitbucketServerModule);
35
35
  this.container.load(resolve_module_1.resolveModule);
36
- this.container.load(plugin_registry_module_1.pluginRegistryModule);
36
+ this.container.load(editor_module_1.editorModule);
37
37
  this.container.load(devfile_schema_module_1.devfileSchemaModule);
38
38
  this.container.bind(Symbol.for('AxiosInstance')).toConstantValue(options.axiosInstance);
39
- this.container.bind('string').toConstantValue(options.pluginRegistryUrl).whenTargetNamed('PLUGIN_REGISTRY_URL');
40
39
  return this.container;
41
40
  }
42
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"inversify-binding.js","sourceRoot":"","sources":["../../src/inversify/inversify-binding.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;yEAQyE;AACzE,4BAA0B;AAG1B,yCAAsC;AACtC,8DAA0D;AAC1D,wDAAoD;AACpD,2DAAuD;AACvD,8DAA0D;AAC1D,sFAAiF;AACjF,mFAA8E;AAC9E,oEAAgE;AAChE,yFAAoF;AAEpF;;GAEG;AACH,MAAa,gBAAgB;IACnB,SAAS,CAAY;IAEtB,KAAK,CAAC,YAAY,CAAC,OAAgC;QACxD,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,8BAAa,CAAC,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,0BAAW,CAAC,CAAC;QACjC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,4BAAY,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,kCAAe,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,+CAAqB,CAAC,CAAC;QAC3C,IAAI,CA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IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,8BAAa,CAAC,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,4BAAY,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,2CAAmB,CAAC,CAAC;QAEzC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AAnBD,4CAmBC"}
package/lib/main.d.ts CHANGED
@@ -21,8 +21,7 @@ export declare class Main {
21
21
  outputFile?: string;
22
22
  editorPath?: string;
23
23
  editorContent?: string;
24
- editorEntry?: string;
25
- pluginRegistryUrl?: string;
24
+ editorUrl?: string;
26
25
  projects: {
27
26
  name: string;
28
27
  location: string;
package/lib/main.js CHANGED
@@ -40,7 +40,7 @@ const devfile_schema_validator_1 = require("./devfile-schema/devfile-schema-vali
40
40
  const jsYaml = __importStar(require("js-yaml"));
41
41
  const inversify_binding_1 = require("./inversify/inversify-binding");
42
42
  const url_fetcher_1 = require("./fetch/url-fetcher");
43
- const plugin_registry_resolver_1 = require("./plugin-registry/plugin-registry-resolver");
43
+ const editor_resolver_1 = require("./editor/editor-resolver");
44
44
  const git_url_resolver_1 = require("./resolve/git-url-resolver");
45
45
  class Main {
46
46
  /**
@@ -51,23 +51,14 @@ class Main {
51
51
  }
52
52
  // Generates a devfile context object based on params
53
53
  async generateDevfileContext(params, axiosInstance) {
54
- if (!params.editorPath && !params.editorEntry && !params.editorContent) {
55
- throw new Error('missing editorPath or editorEntry or editorContent');
54
+ if (!params.editorPath && !params.editorUrl && !params.editorContent) {
55
+ throw new Error('missing editorPath or editorUrl or editorContent');
56
56
  }
57
57
  if (!params.devfilePath && !params.devfileUrl && !params.devfileContent) {
58
58
  throw new Error('missing devfilePath or devfileUrl or devfileContent');
59
59
  }
60
- let pluginRegistryUrl;
61
- if (params.pluginRegistryUrl) {
62
- pluginRegistryUrl = params.pluginRegistryUrl;
63
- }
64
- else {
65
- pluginRegistryUrl = 'https://eclipse-che.github.io/che-plugin-registry/main/v3';
66
- console.log(`No plug-in registry url. Setting to ${pluginRegistryUrl}`);
67
- }
68
60
  const inversifyBinbding = new inversify_binding_1.InversifyBinding();
69
61
  const container = await inversifyBinbding.initBindings({
70
- pluginRegistryUrl,
71
62
  axiosInstance,
72
63
  });
73
64
  container.bind(generate_1.Generate).toSelf().inSingletonScope();
@@ -121,9 +112,9 @@ class Main {
121
112
  if (params.editorContent) {
122
113
  editorContent = params.editorContent;
123
114
  }
124
- else if (params.editorEntry) {
115
+ else if (params.editorUrl) {
125
116
  // devfile of the editor
126
- const editorDevfile = await container.get(plugin_registry_resolver_1.PluginRegistryResolver).loadDevfilePlugin(params.editorEntry);
117
+ const editorDevfile = await container.get(editor_resolver_1.EditorResolver).loadEditor(params.editorUrl);
127
118
  editorContent = jsYaml.dump(editorDevfile);
128
119
  }
129
120
  else {
@@ -163,8 +154,7 @@ class Main {
163
154
  let devfileUrl;
164
155
  let outputFile;
165
156
  let editorPath;
166
- let pluginRegistryUrl;
167
- let editorEntry;
157
+ let editorUrl;
168
158
  let injectDefaultComponent;
169
159
  let defaultComponentImage;
170
160
  const projects = [];
@@ -176,11 +166,8 @@ class Main {
176
166
  if (arg.startsWith('--devfile-url:')) {
177
167
  devfileUrl = arg.substring('--devfile-url:'.length);
178
168
  }
179
- if (arg.startsWith('--plugin-registry-url:')) {
180
- pluginRegistryUrl = arg.substring('--plugin-registry-url:'.length);
181
- }
182
- if (arg.startsWith('--editor-entry:')) {
183
- editorEntry = arg.substring('--editor-entry:'.length);
169
+ if (arg.startsWith('--editor-url:')) {
170
+ editorUrl = arg.substring('--editor-url:'.length);
184
171
  }
185
172
  if (arg.startsWith('--editor-path:')) {
186
173
  editorPath = arg.substring('--editor-path:'.length);
@@ -202,8 +189,8 @@ class Main {
202
189
  }
203
190
  });
204
191
  try {
205
- if (!editorPath && !editorEntry) {
206
- throw new Error('missing --editor-path: or --editor-entry: parameter');
192
+ if (!editorPath && !editorUrl) {
193
+ throw new Error('missing --editor-path: or --editor-url: parameter');
207
194
  }
208
195
  if (!devfilePath && !devfileUrl) {
209
196
  throw new Error('missing --devfile-path: or --devfile-url: parameter');
@@ -216,8 +203,7 @@ class Main {
216
203
  devfileUrl,
217
204
  editorPath,
218
205
  outputFile,
219
- pluginRegistryUrl,
220
- editorEntry,
206
+ editorUrl,
221
207
  projects,
222
208
  injectDefaultComponent,
223
209
  defaultComponentImage,
package/lib/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA;;;;;;;;yEAQyE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzE,6CAA+B;AAC/B,6CAA+B;AAC/B,yCAAsC;AACtC,wFAAmF;AACnF,gDAAkC;AAClC,qEAAiE;AACjE,qDAAiD;AACjD,yFAAoF;AAGpF,iEAA4D;AAG5D,MAAa,IAAI;IACf;;OAEG;IACH;QACE,QAAQ;IACV,CAAC;IACD,qDAAqD;IAC9C,KAAK,CAAC,sBAAsB,CACjC,MAYC,EACD,aAAkC;QAElC,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YACxE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,IAAI,iBAAyB,CAAC;QAE9B,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC7B,iBAAiB,GAAG,MAAM,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D,CAAC,CAAC;YACzE,CAAC;YACD,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;YACtD,CAAC;YACD,MAAM,IAAI,CAAC,sBAAsB,CAC/B;gBACE,WAAW;gBACX,UAAU;gBACV,UAAU;gBACV,UAAU;gBACV,SAAS;gBACT,QAAQ;gBACR,sBAAsB;gBACtB,qBAAqB;aACtB,EACD,KAAK,CAAC,OAAO,CACd,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;YACtC,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;YACxC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAlND,oBAkNC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-che/che-devworkspace-generator",
3
- "version": "7.93.0",
3
+ "version": "7.94.0-next-7fcbae4",
4
4
  "private": false,
5
5
  "description": "Generates DevWorkspaces by transforming existing devfiles",
6
6
  "main": "lib/entrypoint.js",
@@ -55,7 +55,7 @@
55
55
  "if-env": "^1.0.4",
56
56
  "jest": "^27.3.1",
57
57
  "prettier": "^3.3.2",
58
- "rimraf": "^5.0.7",
58
+ "rimraf": "^6.0.1",
59
59
  "rollup": "^4.18.0",
60
60
  "ts-jest": "^27.0.7",
61
61
  "typescript": "^5.6.2"
@@ -9,10 +9,10 @@
9
9
  ***********************************************************************/
10
10
  import { ContainerModule, interfaces } from 'inversify';
11
11
 
12
- import { PluginRegistryResolver } from './plugin-registry-resolver';
12
+ import { EditorResolver } from './editor-resolver';
13
13
 
14
- const pluginRegistryModule = new ContainerModule((bind: interfaces.Bind) => {
15
- bind(PluginRegistryResolver).toSelf().inSingletonScope();
14
+ const editorModule = new ContainerModule((bind: interfaces.Bind) => {
15
+ bind(EditorResolver).toSelf().inSingletonScope();
16
16
  });
17
17
 
18
- export { pluginRegistryModule };
18
+ export { editorModule };
@@ -10,7 +10,7 @@
10
10
 
11
11
  import * as jsYaml from 'js-yaml';
12
12
 
13
- import { inject, injectable, named } from 'inversify';
13
+ import { inject, injectable } from 'inversify';
14
14
 
15
15
  import { UrlFetcher } from '../fetch/url-fetcher';
16
16
 
@@ -18,19 +18,14 @@ import { UrlFetcher } from '../fetch/url-fetcher';
18
18
  * Resolve plug-ins by grabbing the definition from the plug-in registry.
19
19
  */
20
20
  @injectable()
21
- export class PluginRegistryResolver {
22
- @inject('string')
23
- @named('PLUGIN_REGISTRY_URL')
24
- private pluginRegistryUrl: string;
25
-
21
+ export class EditorResolver {
26
22
  @inject(UrlFetcher)
27
23
  private urlFetcher: UrlFetcher;
28
24
 
29
- // FQN id (like che-incubator/che-code/next)
25
+ // Editor URL (like https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-latest.yaml)
30
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- async loadDevfilePlugin(devfileId: string): Promise<any> {
32
- const devfileUrl = `${this.pluginRegistryUrl}/plugins/${devfileId}/devfile.yaml`;
33
- const devfileContent = await this.urlFetcher.fetchText(devfileUrl);
27
+ async loadEditor(editorUrl: string): Promise<any> {
28
+ const devfileContent = await this.urlFetcher.fetchText(editorUrl);
34
29
  return jsYaml.load(devfileContent);
35
30
  }
36
31
  }
@@ -15,7 +15,7 @@ import { devfileModule } from '../devfile/devfile-module';
15
15
  import { fetchModule } from '../fetch/fetch-module';
16
16
  import { githubModule } from '../github/github-module';
17
17
  import { resolveModule } from '../resolve/resolve-module';
18
- import { pluginRegistryModule } from '../plugin-registry/plugin-registry-module';
18
+ import { editorModule } from '../editor/editor-module';
19
19
  import { devfileSchemaModule } from '../devfile-schema/devfile-schema-module';
20
20
  import { bitbucketModule } from '../bitbucket/bitbucket-module';
21
21
  import { bitbucketServerModule } from '../bitbucket-server/bitbucket-server-module';
@@ -35,11 +35,10 @@ export class InversifyBinding {
35
35
  this.container.load(bitbucketModule);
36
36
  this.container.load(bitbucketServerModule);
37
37
  this.container.load(resolveModule);
38
- this.container.load(pluginRegistryModule);
38
+ this.container.load(editorModule);
39
39
  this.container.load(devfileSchemaModule);
40
40
 
41
41
  this.container.bind(Symbol.for('AxiosInstance')).toConstantValue(options.axiosInstance);
42
- this.container.bind('string').toConstantValue(options.pluginRegistryUrl).whenTargetNamed('PLUGIN_REGISTRY_URL');
43
42
 
44
43
  return this.container;
45
44
  }
@@ -49,6 +48,5 @@ export class InversifyBinding {
49
48
  * Options for inversify bindings
50
49
  */
51
50
  export interface InversifyBindingOptions {
52
- pluginRegistryUrl: string;
53
51
  axiosInstance: AxiosInstance;
54
52
  }
package/src/main.ts CHANGED
@@ -15,7 +15,7 @@ import { DevfileSchemaValidator } from './devfile-schema/devfile-schema-validato
15
15
  import * as jsYaml from 'js-yaml';
16
16
  import { InversifyBinding } from './inversify/inversify-binding';
17
17
  import { UrlFetcher } from './fetch/url-fetcher';
18
- import { PluginRegistryResolver } from './plugin-registry/plugin-registry-resolver';
18
+ import { EditorResolver } from './editor/editor-resolver';
19
19
  import { V1alpha2DevWorkspaceSpecTemplate } from '@devfile/api';
20
20
  import { DevfileContext } from './api/devfile-context';
21
21
  import { GitUrlResolver } from './resolve/git-url-resolver';
@@ -37,33 +37,22 @@ export class Main {
37
37
  outputFile?: string;
38
38
  editorPath?: string;
39
39
  editorContent?: string;
40
- editorEntry?: string;
41
- pluginRegistryUrl?: string;
40
+ editorUrl?: string;
42
41
  projects: { name: string; location: string }[];
43
42
  injectDefaultComponent?: string;
44
43
  defaultComponentImage?: string;
45
44
  },
46
45
  axiosInstance: axios.AxiosInstance,
47
46
  ): Promise<DevfileContext> {
48
- if (!params.editorPath && !params.editorEntry && !params.editorContent) {
49
- throw new Error('missing editorPath or editorEntry or editorContent');
47
+ if (!params.editorPath && !params.editorUrl && !params.editorContent) {
48
+ throw new Error('missing editorPath or editorUrl or editorContent');
50
49
  }
51
50
  if (!params.devfilePath && !params.devfileUrl && !params.devfileContent) {
52
51
  throw new Error('missing devfilePath or devfileUrl or devfileContent');
53
52
  }
54
53
 
55
- let pluginRegistryUrl: string;
56
-
57
- if (params.pluginRegistryUrl) {
58
- pluginRegistryUrl = params.pluginRegistryUrl;
59
- } else {
60
- pluginRegistryUrl = 'https://eclipse-che.github.io/che-plugin-registry/main/v3';
61
- console.log(`No plug-in registry url. Setting to ${pluginRegistryUrl}`);
62
- }
63
-
64
54
  const inversifyBinbding = new InversifyBinding();
65
55
  const container = await inversifyBinbding.initBindings({
66
- pluginRegistryUrl,
67
56
  axiosInstance,
68
57
  });
69
58
  container.bind(Generate).toSelf().inSingletonScope();
@@ -125,9 +114,9 @@ export class Main {
125
114
 
126
115
  if (params.editorContent) {
127
116
  editorContent = params.editorContent;
128
- } else if (params.editorEntry) {
117
+ } else if (params.editorUrl) {
129
118
  // devfile of the editor
130
- const editorDevfile = await container.get(PluginRegistryResolver).loadDevfilePlugin(params.editorEntry);
119
+ const editorDevfile = await container.get(EditorResolver).loadEditor(params.editorUrl);
131
120
  editorContent = jsYaml.dump(editorDevfile);
132
121
  } else {
133
122
  editorContent = await fs.readFile(params.editorPath);
@@ -175,8 +164,7 @@ export class Main {
175
164
  let devfileUrl: string | undefined;
176
165
  let outputFile: string | undefined;
177
166
  let editorPath: string | undefined;
178
- let pluginRegistryUrl: string | undefined;
179
- let editorEntry: string | undefined;
167
+ let editorUrl: string | undefined;
180
168
  let injectDefaultComponent: string | undefined;
181
169
  let defaultComponentImage: string | undefined;
182
170
  const projects: { name: string; location: string }[] = [];
@@ -189,11 +177,8 @@ export class Main {
189
177
  if (arg.startsWith('--devfile-url:')) {
190
178
  devfileUrl = arg.substring('--devfile-url:'.length);
191
179
  }
192
- if (arg.startsWith('--plugin-registry-url:')) {
193
- pluginRegistryUrl = arg.substring('--plugin-registry-url:'.length);
194
- }
195
- if (arg.startsWith('--editor-entry:')) {
196
- editorEntry = arg.substring('--editor-entry:'.length);
180
+ if (arg.startsWith('--editor-url:')) {
181
+ editorUrl = arg.substring('--editor-url:'.length);
197
182
  }
198
183
  if (arg.startsWith('--editor-path:')) {
199
184
  editorPath = arg.substring('--editor-path:'.length);
@@ -217,8 +202,8 @@ export class Main {
217
202
  });
218
203
 
219
204
  try {
220
- if (!editorPath && !editorEntry) {
221
- throw new Error('missing --editor-path: or --editor-entry: parameter');
205
+ if (!editorPath && !editorUrl) {
206
+ throw new Error('missing --editor-path: or --editor-url: parameter');
222
207
  }
223
208
  if (!devfilePath && !devfileUrl) {
224
209
  throw new Error('missing --devfile-path: or --devfile-url: parameter');
@@ -232,8 +217,7 @@ export class Main {
232
217
  devfileUrl,
233
218
  editorPath,
234
219
  outputFile,
235
- pluginRegistryUrl,
236
- editorEntry,
220
+ editorUrl,
237
221
  projects,
238
222
  injectDefaultComponent,
239
223
  defaultComponentImage,
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-registry-module.js","sourceRoot":"","sources":["../../src/plugin-registry/plugin-registry-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;yEAQyE;AACzE,yCAAwD;AAExD,yEAAoE;AAEpE,MAAM,oBAAoB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAqB,EAAE,EAAE;IACzE,IAAI,CAAC,iDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEM,oDAAoB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-registry-resolver.js","sourceRoot":"","sources":["../../src/plugin-registry/plugin-registry-resolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;yEAQyE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzE,gDAAkC;AAElC,yCAAsD;AAEtD,sDAAkD;AAElD;;GAEG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAGzB,iBAAiB,CAAS;IAG1B,UAAU,CAAa;IAE/B,4CAA4C;IAC5C,8DAA8D;IAC9D,KAAK,CAAC,iBAAiB,CAAC,SAAiB;QACvC,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,iBAAiB,YAAY,SAAS,eAAe,CAAC;QACjF,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACnE,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;CACF,CAAA;AAfY,wDAAsB;AAGzB;IAFP,IAAA,kBAAM,EAAC,QAAQ,CAAC;IAChB,IAAA,iBAAK,EAAC,qBAAqB,CAAC;iEACK;AAG1B;IADP,IAAA,kBAAM,EAAC,wBAAU,CAAC;0DACY;iCANpB,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAelC"}