@eclipse-che/che-devworkspace-generator
Advanced tools
Comparing version 7.88.0-next-cd6d3b5 to 7.88.0-next-ce5fc9e
@@ -31,3 +31,3 @@ "use strict"; | ||
if (!regExp) { | ||
throw new Error("Invalid bitbucket-server URL: " + url); | ||
throw new Error("Invalid bitbucket-server URL: ".concat(url)); | ||
} | ||
@@ -34,0 +34,0 @@ var match = regExp.exec(url); |
@@ -24,11 +24,11 @@ "use strict"; | ||
var isUser = this.user !== undefined; | ||
return this.scheme + "://" + this.hostName + "/" + (isUser ? 'users' : 'projects') + "/" + (isUser ? this.user : this.project) + "/repos/" + this.repo + "/raw/" + path + (this.branch !== undefined ? '?/at=' + this.branch : ''); | ||
return "".concat(this.scheme, "://").concat(this.hostName, "/").concat(isUser ? 'users' : 'projects', "/").concat(isUser ? this.user : this.project, "/repos/").concat(this.repo, "/raw/").concat(path).concat(this.branch !== undefined ? '?/at=' + this.branch : ''); | ||
}; | ||
BitbucketServerUrl.prototype.getUrl = function () { | ||
var isUser = this.user !== undefined; | ||
return this.scheme + "://" + this.hostName + "/" + (isUser ? 'users' : 'projects') + "/" + (isUser ? this.user : this.project) + "/repos/" + this.repo + (this.branch !== undefined ? '/browse?at=' + this.branch : ''); | ||
return "".concat(this.scheme, "://").concat(this.hostName, "/").concat(isUser ? 'users' : 'projects', "/").concat(isUser ? this.user : this.project, "/repos/").concat(this.repo).concat(this.branch !== undefined ? '/browse?at=' + this.branch : ''); | ||
}; | ||
BitbucketServerUrl.prototype.getCloneUrl = function () { | ||
var isUser = this.user !== undefined; | ||
return this.scheme + "://" + this.hostName + "/scm/" + (isUser ? '~' + this.user : this.project.toLowerCase()) + "/" + this.repo + ".git"; | ||
return "".concat(this.scheme, "://").concat(this.hostName, "/scm/").concat(isUser ? '~' + this.user : this.project.toLowerCase(), "/").concat(this.repo, ".git"); | ||
}; | ||
@@ -35,0 +35,0 @@ BitbucketServerUrl.prototype.getRepoName = function () { |
@@ -31,3 +31,3 @@ "use strict"; | ||
if (!match) { | ||
throw new Error("Invalid bitbucket URL: " + url); | ||
throw new Error("Invalid bitbucket URL: ".concat(url)); | ||
} | ||
@@ -34,0 +34,0 @@ var workspaceId = this.getGroup(match, 'workspaceId'); |
@@ -20,9 +20,9 @@ "use strict"; | ||
BitbucketUrl.prototype.getContentUrl = function (path) { | ||
return BitbucketUrl.BITBUCKET_URL + "/" + this.workspaceId + "/" + this.repoName + "/raw/" + this.branchName + "/" + path; | ||
return "".concat(BitbucketUrl.BITBUCKET_URL, "/").concat(this.workspaceId, "/").concat(this.repoName, "/raw/").concat(this.branchName, "/").concat(path); | ||
}; | ||
BitbucketUrl.prototype.getUrl = function () { | ||
return BitbucketUrl.BITBUCKET_URL + "/" + this.workspaceId + "/" + this.repoName + "/src/" + this.branchName; | ||
return "".concat(BitbucketUrl.BITBUCKET_URL, "/").concat(this.workspaceId, "/").concat(this.repoName, "/src/").concat(this.branchName); | ||
}; | ||
BitbucketUrl.prototype.getCloneUrl = function () { | ||
return BitbucketUrl.BITBUCKET_URL + "/" + this.workspaceId + "/" + this.repoName + ".git"; | ||
return "".concat(BitbucketUrl.BITBUCKET_URL, "/").concat(this.workspaceId, "/").concat(this.repoName, ".git"); | ||
}; | ||
@@ -29,0 +29,0 @@ BitbucketUrl.prototype.getRepoName = function () { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -65,3 +69,3 @@ if (k2 === undefined) k2 = k; | ||
default: | ||
throw new Error("Dev Workspace generator tool doesn't support devfile version: " + version); | ||
throw new Error("Dev Workspace generator tool doesn't support devfile version: ".concat(version)); | ||
} | ||
@@ -68,0 +72,0 @@ }; |
@@ -32,3 +32,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -89,3 +89,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
else { | ||
console.warn("More than one dev container component has been potentially found, taking the first one of " + devComponents.map(function (component) { return component.name; })); | ||
console.warn("More than one dev container component has been potentially found, taking the first one of ".concat(devComponents.map(function (component) { return component.name; }))); | ||
return [2 /*return*/, devComponents[0]]; | ||
@@ -92,0 +92,0 @@ } |
@@ -32,3 +32,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -81,3 +81,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
devContainerImage = defaultComponentImage ? defaultComponentImage : this.DEFAULT_DEV_CONTAINER_IMAGE; | ||
console.log("No container component has been found. A default container component with image " + devContainerImage + " will be added."); | ||
console.log("No container component has been found. A default container component with image ".concat(devContainerImage, " will be added.")); | ||
devContainerComponent = { | ||
@@ -84,0 +84,0 @@ name: this.DEFAULT_DEV_CONTAINER_NAME, |
@@ -27,3 +27,3 @@ #!/usr/bin/env node | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -30,0 +30,0 @@ if (y = 0, t) op = [op[0] & 2, t.value]; |
@@ -23,3 +23,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -26,0 +26,0 @@ if (y = 0, t) op = [op[0] & 2, t.value]; |
@@ -13,3 +13,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -52,3 +56,3 @@ if (k2 === undefined) k2 = k; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -100,3 +104,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
case 3: | ||
console.log("DevWorkspace " + context.devWorkspaceTemplates[0].metadata.name + " was generated"); | ||
console.log("DevWorkspace ".concat(context.devWorkspaceTemplates[0].metadata.name, " was generated")); | ||
return [2 /*return*/, context]; | ||
@@ -118,3 +122,3 @@ } | ||
// add sufix | ||
metadata.name = metadata.name + "-" + suffix; | ||
metadata.name = "".concat(metadata.name, "-").concat(suffix); | ||
delete editorDevfile.metadata; | ||
@@ -121,0 +125,0 @@ delete editorDevfile.schemaVersion; |
@@ -31,3 +31,3 @@ "use strict"; | ||
if (!match) { | ||
throw new Error("Invalid github URL: " + link); | ||
throw new Error("Invalid github URL: ".concat(link)); | ||
} | ||
@@ -34,0 +34,0 @@ var scheme = this.getGroup(match, 'scheme'); |
@@ -27,9 +27,9 @@ "use strict"; | ||
var hostName = this.hostName === 'github.com' ? 'githubusercontent.com' : this.hostName; | ||
return this.scheme + "://raw." + hostName + "/" + this.repoUser + "/" + this.repoName + "/" + this.branchName + "/" + path; | ||
return "".concat(this.scheme, "://raw.").concat(hostName, "/").concat(this.repoUser, "/").concat(this.repoName, "/").concat(this.branchName, "/").concat(path); | ||
}; | ||
GithubUrl.prototype.getUrl = function () { | ||
return this.scheme + "://" + this.hostName + "/" + this.repoUser + "/" + this.repoName + "/tree/" + this.branchName + "/" + this.subFolder; | ||
return "".concat(this.scheme, "://").concat(this.hostName, "/").concat(this.repoUser, "/").concat(this.repoName, "/tree/").concat(this.branchName, "/").concat(this.subFolder); | ||
}; | ||
GithubUrl.prototype.getCloneUrl = function () { | ||
return this.scheme + "://" + this.hostName + "/" + this.repoUser + "/" + this.repoName + ".git"; | ||
return "".concat(this.scheme, "://").concat(this.hostName, "/").concat(this.repoUser, "/").concat(this.repoName, ".git"); | ||
}; | ||
@@ -36,0 +36,0 @@ GithubUrl.prototype.getRepoName = function () { |
@@ -17,3 +17,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -20,0 +20,0 @@ if (y = 0, t) op = [op[0] & 2, t.value]; |
@@ -13,3 +13,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -46,3 +50,3 @@ if (k2 === undefined) k2 = k; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -104,3 +108,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
pluginRegistryUrl = 'https://eclipse-che.github.io/che-plugin-registry/main/v3'; | ||
console.log("No plug-in registry url. Setting to " + pluginRegistryUrl); | ||
console.log("No plug-in registry url. Setting to ".concat(pluginRegistryUrl)); | ||
} | ||
@@ -158,5 +162,5 @@ inversifyBinbding = new inversify_binding_1.InversifyBinding(); | ||
if (!validationResult.valid) { | ||
throw new Error("Devfile schema validation failed. Error: " + validationResult.toString()); | ||
throw new Error("Devfile schema validation failed. Error: ".concat(validationResult.toString())); | ||
} | ||
console.log("Devfile is valid with schema version " + schemaVersion); | ||
console.log("Devfile is valid with schema version ".concat(schemaVersion)); | ||
// enhance projects | ||
@@ -163,0 +167,0 @@ devfileContent = this.replaceIfExistingProjects(devfileContent, params.projects); |
@@ -13,3 +13,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -52,3 +56,3 @@ if (k2 === undefined) k2 = k; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -93,3 +97,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
case 0: | ||
devfileUrl = this.pluginRegistryUrl + "/plugins/" + devfileId + "/devfile.yaml"; | ||
devfileUrl = "".concat(this.pluginRegistryUrl, "/plugins/").concat(devfileId, "/devfile.yaml"); | ||
return [4 /*yield*/, this.urlFetcher.fetchText(devfileUrl)]; | ||
@@ -96,0 +100,0 @@ case 1: |
{ | ||
"name": "@eclipse-che/che-devworkspace-generator", | ||
"version": "7.88.0-next-cd6d3b5", | ||
"version": "7.88.0-next-ce5fc9e", | ||
"private": false, | ||
@@ -34,3 +34,3 @@ "description": "Generates DevWorkspaces by transforming existing devfiles", | ||
"type": "git", | ||
"url": "git+https://github.com/eclipse-che/che-devfile-registry.git" | ||
"url": "git+https://github.com/devfile/devworkspace-generator.git" | ||
}, | ||
@@ -44,19 +44,19 @@ "author": "", | ||
"dependencies": { | ||
"@devfile/api": "2.2.2-1715367693", | ||
"@devfile/api": "2.2.2-1716821574", | ||
"jsonschema": "^1.4.1", | ||
"axios": "^1.7.0", | ||
"fs-extra": "^10.0.0", | ||
"inversify": "^5.0.1", | ||
"fs-extra": "^11.2.0", | ||
"inversify": "^6.0.2", | ||
"js-yaml": "^4.0.0", | ||
"jsonc-parser": "^3.0.0", | ||
"reflect-metadata": "^0.1.13" | ||
"reflect-metadata": "^0.2.2" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^27.0.2", | ||
"eslint": "^8.1.0", | ||
"eslint": "^9.5.0", | ||
"if-env": "^1.0.4", | ||
"jest": "^27.3.1", | ||
"prettier": "^2.4.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.44.0", | ||
"prettier": "^3.3.2", | ||
"rimraf": "^5.0.7", | ||
"rollup": "^4.18.0", | ||
"ts-jest": "^27.0.7", | ||
@@ -63,0 +63,0 @@ "typescript": "^4.4.4" |
@@ -20,3 +20,3 @@ /********************************************************************** | ||
private readonly repo: string, | ||
private readonly branch: string | undefined | ||
private readonly branch: string | undefined, | ||
) {} | ||
@@ -23,0 +23,0 @@ |
@@ -19,3 +19,3 @@ /********************************************************************** | ||
private readonly repoName: string, | ||
private readonly branchName: string | ||
private readonly branchName: string, | ||
) {} | ||
@@ -22,0 +22,0 @@ |
@@ -27,3 +27,3 @@ /********************************************************************** | ||
injectDefaultComponent?: string, | ||
defaultComponentImage?: string | ||
defaultComponentImage?: string, | ||
): Promise<V1alpha2DevWorkspaceSpecTemplateComponents | undefined> { | ||
@@ -39,3 +39,3 @@ // if a devfile contains a parent, we should not add a default dev container | ||
// we should ignore component that do not mount the sources | ||
component => component.container && component.container.mountSources !== false | ||
component => component.container && component.container.mountSources !== false, | ||
); | ||
@@ -58,4 +58,4 @@ | ||
`More than one dev container component has been potentially found, taking the first one of ${devComponents.map( | ||
component => component.name | ||
)}` | ||
component => component.name, | ||
)}`, | ||
); | ||
@@ -62,0 +62,0 @@ return devComponents[0]; |
@@ -38,3 +38,3 @@ /********************************************************************** | ||
console.log( | ||
`No container component has been found. A default container component with image ${devContainerImage} will be added.` | ||
`No container component has been found. A default container component with image ${devContainerImage} will be added.`, | ||
); | ||
@@ -41,0 +41,0 @@ const devContainerComponent: V1alpha2DevWorkspaceSpecTemplateComponents = { |
@@ -42,3 +42,3 @@ /********************************************************************** | ||
injectDefaultComponent?: string, | ||
defaultComponentImage?: string | ||
defaultComponentImage?: string, | ||
): Promise<DevfileContext> { | ||
@@ -49,3 +49,3 @@ const context = await this.generateContent( | ||
injectDefaultComponent, | ||
defaultComponentImage | ||
defaultComponentImage, | ||
); | ||
@@ -72,3 +72,3 @@ | ||
injectDefaultComponent?: string, | ||
defaultComponentImage?: string | ||
defaultComponentImage?: string, | ||
): Promise<DevfileContext> { | ||
@@ -75,0 +75,0 @@ const devfile = jsYaml.load(devfileContent); |
@@ -20,3 +20,3 @@ /********************************************************************** | ||
private readonly branchName: string, | ||
private readonly subFolder: string | ||
private readonly subFolder: string, | ||
) {} | ||
@@ -23,0 +23,0 @@ |
@@ -46,3 +46,3 @@ /********************************************************************** | ||
}, | ||
axiosInstance: axios.AxiosInstance | ||
axiosInstance: axios.AxiosInstance, | ||
): Promise<DevfileContext> { | ||
@@ -117,3 +117,3 @@ if (!params.editorPath && !params.editorEntry && !params.editorContent) { | ||
jsYamlDevfileContent, | ||
schemaVersion | ||
schemaVersion, | ||
); | ||
@@ -144,3 +144,3 @@ if (!validationResult.valid) { | ||
params.injectDefaultComponent, | ||
params.defaultComponentImage | ||
params.defaultComponentImage, | ||
); | ||
@@ -244,3 +244,3 @@ } | ||
}, | ||
axios.default | ||
axios.default, | ||
); | ||
@@ -247,0 +247,0 @@ return true; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
2051102
5
35259
+ Added@devfile/api@2.2.2-1716821574(transitive)
+ Added@inversifyjs/common@1.4.0(transitive)
+ Added@inversifyjs/core@1.3.5(transitive)
+ Added@inversifyjs/reflect-metadata-utils@0.2.4(transitive)
+ Addedfs-extra@11.3.0(transitive)
+ Addedinversify@6.2.1(transitive)
+ Addedreflect-metadata@0.2.2(transitive)
- Removed@devfile/api@2.2.2-1715367693(transitive)
- Removedfs-extra@10.1.0(transitive)
- Removedinversify@5.1.1(transitive)
- Removedreflect-metadata@0.1.14(transitive)
Updatedfs-extra@^11.2.0
Updatedinversify@^6.0.2
Updatedreflect-metadata@^0.2.2