@eclipse-che/plugin-registry-generator
Advanced tools
Comparing version 7.42.0-dev-eed7973 to 7.42.0
@@ -23,4 +23,4 @@ "use strict"; | ||
const moment = require("moment"); | ||
const ora = require("ora"); | ||
const path = require("path"); | ||
const nanospinner_1 = require("nanospinner"); | ||
const inversify_1 = require("inversify"); | ||
@@ -57,3 +57,3 @@ const che_editors_analyzer_1 = require("./editor/che-editors-analyzer"); | ||
updateTask(promise, task, success, failureMessage) { | ||
promise.then(success, () => task.fail(failureMessage)); | ||
promise.then(success, () => task.error({ text: failureMessage })); | ||
} | ||
@@ -92,3 +92,3 @@ analyzeCheTheiaPluginsYaml() { | ||
const title = 'Download/Unpack/Analyze CheTheiaPlugins in parallel (may take a while)'; | ||
const downloadAndAnalyzeTask = ora(title).start(); | ||
const downloadAndAnalyzeTask = (0, nanospinner_1.createSpinner)(title).start(); | ||
const deferred = new deferred_1.Deferred(); | ||
@@ -104,3 +104,3 @@ this.wrapIntoTask(title, deferred.promise, downloadAndAnalyzeTask); | ||
current++; | ||
downloadAndAnalyzeTask.text = `${title} [${current}/${analyzingCheTheiaPlugins.length}] ...`; | ||
downloadAndAnalyzeTask.update({ text: `${title} [${current}/${analyzingCheTheiaPlugins.length}] ...` }); | ||
}, `Error analyzing extension ${cheTheiaPlugin.extension} from ${cheTheiaPlugin.repository.url}`); | ||
@@ -165,6 +165,6 @@ return analyzePromise; | ||
else { | ||
task = ora(title).start(); | ||
task = (0, nanospinner_1.createSpinner)(title).start(); | ||
} | ||
if (promise) { | ||
promise.then(() => task.succeed(), () => task.fail()); | ||
promise.then(() => task.success(), () => task.error()); | ||
} | ||
@@ -171,0 +171,0 @@ return promise; |
@@ -26,3 +26,3 @@ "use strict"; | ||
const content = yield fs.readFile(cheEditorFile, 'utf-8'); | ||
const chePluginsYaml = jsyaml.safeLoad(content, { | ||
const chePluginsYaml = jsyaml.load(content, { | ||
schema: jsyaml.JSON_SCHEMA, | ||
@@ -29,0 +29,0 @@ }); |
@@ -26,3 +26,3 @@ "use strict"; | ||
const content = yield fs.readFile(cheTheiaPluginsFile, 'utf-8'); | ||
const cheTheiaPluginsYaml = jsyaml.safeLoad(content, { | ||
const cheTheiaPluginsYaml = jsyaml.load(content, { | ||
schema: jsyaml.JSON_SCHEMA, | ||
@@ -29,0 +29,0 @@ }); |
@@ -90,3 +90,3 @@ "use strict"; | ||
cleanupWritingData.metadata.version = 'latest'; | ||
const yamlString = jsyaml.safeDump(cleanupWritingData, { lineWidth: -1 }); | ||
const yamlString = jsyaml.dump(cleanupWritingData, { lineWidth: -1 }); | ||
const pluginPath = path.resolve(pluginsFolder, alias, 'latest', 'che-theia-plugin.yaml'); | ||
@@ -93,0 +93,0 @@ yield fs.ensureDir(path.dirname(pluginPath)); |
@@ -26,3 +26,3 @@ "use strict"; | ||
const content = yield fs.readFile(cheEditorFile, 'utf-8'); | ||
const cheEditorsYaml = jsyaml.safeLoad(content, { | ||
const cheEditorsYaml = jsyaml.load(content, { | ||
schema: jsyaml.JSON_SCHEMA, | ||
@@ -29,0 +29,0 @@ }); |
@@ -20,3 +20,3 @@ "use strict"; | ||
const container = yield inversifyBinbding.initBindings(); | ||
const build = container.get(build_1.Build); | ||
const build = yield container.getAsync(build_1.Build); | ||
return build.build(); | ||
@@ -23,0 +23,0 @@ }); |
@@ -135,3 +135,3 @@ "use strict"; | ||
} | ||
const yamlString = jsyaml.safeDump(metaYaml, { noRefs: true, lineWidth: -1 }); | ||
const yamlString = jsyaml.dump(metaYaml, { noRefs: true, lineWidth: -1 }); | ||
const generated = Object.assign({}, metaYaml); | ||
@@ -149,3 +149,3 @@ generated.id = `${computedId}/${version}`; | ||
const devfilePath = path.resolve(pluginsFolder, computedId, version, 'devfile.yaml'); | ||
const devfileYamlString = jsyaml.safeDump(devfileYaml, { noRefs: true, lineWidth: -1 }); | ||
const devfileYamlString = jsyaml.dump(devfileYaml, { noRefs: true, lineWidth: -1 }); | ||
promises.push(fs.writeFile(devfilePath, devfileYamlString)); | ||
@@ -152,0 +152,0 @@ } |
{ | ||
"name": "@eclipse-che/plugin-registry-generator", | ||
"version": "7.42.0-dev-eed7973", | ||
"version": "7.42.0", | ||
"description": "Generator of yaml files exposed by the plug-in registry.", | ||
@@ -33,6 +33,6 @@ "main": "lib/entrypoint.js", | ||
"handlebars": "^4.7.7", | ||
"inversify": "^5.1.1", | ||
"js-yaml": "^3.14.1", | ||
"inversify": "^6.0.1", | ||
"js-yaml": "^4.1.0", | ||
"moment": "^2.29.1", | ||
"ora": "^5.4.0", | ||
"nanospinner": "^0.6.0", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -48,5 +48,5 @@ "semver": "^7.3.5", | ||
"@types/jest": "^27.4.0", | ||
"@types/js-yaml": "^3.12.6", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/semver": "^7.3.9", | ||
"@typescript-eslint/eslint-plugin": "^4.31.1", | ||
"@typescript-eslint/eslint-plugin": "^4.33.0", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
@@ -59,3 +59,3 @@ "concurrently": "^7.0.0", | ||
"eslint-plugin-header": "^3.1.1", | ||
"eslint-plugin-jest": "^24.4.2", | ||
"eslint-plugin-jest": "^25.3.4", | ||
"eslint-plugin-no-null": "^1.0.2", | ||
@@ -62,0 +62,0 @@ "eslint-plugin-no-unsanitized": "^4.0.1", |
@@ -12,5 +12,5 @@ /********************************************************************** | ||
import * as moment from 'moment'; | ||
import * as ora from 'ora'; | ||
import * as path from 'path'; | ||
import { Spinner, createSpinner } from 'nanospinner'; | ||
import { inject, injectable, named } from 'inversify'; | ||
@@ -139,4 +139,4 @@ | ||
updateTask<T>(promise: Promise<T>, task: ora.Ora, success: { (): void }, failureMessage: string): void { | ||
promise.then(success, () => task.fail(failureMessage)); | ||
updateTask<T>(promise: Promise<T>, task: Spinner, success: { (): void }, failureMessage: string): void { | ||
promise.then(success, () => task.error({ text: failureMessage })); | ||
} | ||
@@ -187,3 +187,3 @@ | ||
const title = 'Download/Unpack/Analyze CheTheiaPlugins in parallel (may take a while)'; | ||
const downloadAndAnalyzeTask = ora(title).start(); | ||
const downloadAndAnalyzeTask = createSpinner(title).start(); | ||
const deferred = new Deferred(); | ||
@@ -203,3 +203,3 @@ this.wrapIntoTask(title, deferred.promise, downloadAndAnalyzeTask); | ||
current++; | ||
downloadAndAnalyzeTask.text = `${title} [${current}/${analyzingCheTheiaPlugins.length}] ...`; | ||
downloadAndAnalyzeTask.update({ text: `${title} [${current}/${analyzingCheTheiaPlugins.length}] ...` }); | ||
}, | ||
@@ -280,13 +280,13 @@ `Error analyzing extension ${cheTheiaPlugin.extension} from ${cheTheiaPlugin.repository.url}` | ||
async wrapIntoTask<T>(title: string, promise: Promise<T>, customTask?: ora.Ora): Promise<T> { | ||
let task: ora.Ora; | ||
async wrapIntoTask<T>(title: string, promise: Promise<T>, customTask?: Spinner): Promise<T> { | ||
let task: Spinner; | ||
if (customTask) { | ||
task = customTask; | ||
} else { | ||
task = ora(title).start(); | ||
task = createSpinner(title).start(); | ||
} | ||
if (promise) { | ||
promise.then( | ||
() => task.succeed(), | ||
() => task.fail() | ||
() => task.success(), | ||
() => task.error() | ||
); | ||
@@ -293,0 +293,0 @@ } |
@@ -24,3 +24,3 @@ /********************************************************************** | ||
const chePluginsYaml: ChePluginsYaml = jsyaml.safeLoad(content, { | ||
const chePluginsYaml: ChePluginsYaml = jsyaml.load(content, { | ||
schema: jsyaml.JSON_SCHEMA, | ||
@@ -27,0 +27,0 @@ }) as ChePluginsYaml; |
@@ -24,3 +24,3 @@ /********************************************************************** | ||
const cheTheiaPluginsYaml: CheTheiaPluginsYaml = jsyaml.safeLoad(content, { | ||
const cheTheiaPluginsYaml: CheTheiaPluginsYaml = jsyaml.load(content, { | ||
schema: jsyaml.JSON_SCHEMA, | ||
@@ -27,0 +27,0 @@ }) as CheTheiaPluginsYaml; |
@@ -116,3 +116,3 @@ /********************************************************************** | ||
cleanupWritingData.metadata.version = 'latest'; | ||
const yamlString = jsyaml.safeDump(cleanupWritingData, { lineWidth: -1 }); | ||
const yamlString = jsyaml.dump(cleanupWritingData, { lineWidth: -1 }); | ||
const pluginPath = path.resolve(pluginsFolder, alias, 'latest', 'che-theia-plugin.yaml'); | ||
@@ -119,0 +119,0 @@ await fs.ensureDir(path.dirname(pluginPath)); |
@@ -24,3 +24,3 @@ /********************************************************************** | ||
const cheEditorsYaml: CheEditorsYaml = jsyaml.safeLoad(content, { | ||
const cheEditorsYaml: CheEditorsYaml = jsyaml.load(content, { | ||
schema: jsyaml.JSON_SCHEMA, | ||
@@ -27,0 +27,0 @@ }) as CheEditorsYaml; |
@@ -18,3 +18,3 @@ /********************************************************************** | ||
const container = await inversifyBinbding.initBindings(); | ||
const build = container.get(Build); | ||
const build = await container.getAsync(Build); | ||
return build.build(); | ||
@@ -21,0 +21,0 @@ } |
@@ -170,3 +170,3 @@ /********************************************************************** | ||
} | ||
const yamlString = jsyaml.safeDump(metaYaml, { noRefs: true, lineWidth: -1 }); | ||
const yamlString = jsyaml.dump(metaYaml, { noRefs: true, lineWidth: -1 }); | ||
const generated = { ...metaYaml }; | ||
@@ -184,3 +184,3 @@ generated.id = `${computedId}/${version}`; | ||
const devfilePath = path.resolve(pluginsFolder, computedId, version, 'devfile.yaml'); | ||
const devfileYamlString = jsyaml.safeDump(devfileYaml, { noRefs: true, lineWidth: -1 }); | ||
const devfileYamlString = jsyaml.dump(devfileYaml, { noRefs: true, lineWidth: -1 }); | ||
promises.push(fs.writeFile(devfilePath, devfileYamlString)); | ||
@@ -187,0 +187,0 @@ } |
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 2 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
554430
0
+ Addednanospinner@^0.6.0
+ Added@inversifyjs/common@1.4.0(transitive)
+ Added@inversifyjs/core@1.3.5(transitive)
+ Added@inversifyjs/reflect-metadata-utils@0.2.4(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedinversify@6.2.2(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addednanospinner@0.6.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedreflect-metadata@0.2.2(transitive)
- Removedora@^5.4.0
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedbl@4.1.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcli-cursor@3.1.0(transitive)
- Removedcli-spinners@2.9.2(transitive)
- Removedclone@1.0.4(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removeddefaults@1.0.4(transitive)
- Removedesprima@4.0.1(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedinversify@5.1.1(transitive)
- Removedis-interactive@1.0.0(transitive)
- Removedis-unicode-supported@0.1.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedlog-symbols@4.1.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removedonetime@5.1.2(transitive)
- Removedora@5.4.1(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedrestore-cursor@3.1.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedwcwidth@1.0.1(transitive)
Updatedinversify@^6.0.1
Updatedjs-yaml@^4.1.0