Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eclipse-che/theia-factory-plugin

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-che/theia-factory-plugin - npm Package Compare versions

Comparing version 0.0.1-1542962448 to 0.0.1-1547041312

src/factory-initializer.ts

40

package.json

@@ -6,3 +6,3 @@ {

],
"version": "0.0.1-1542962448",
"version": "0.0.1-1547041312",
"license": "EPL-2.0",

@@ -15,2 +15,6 @@ "files": [

"@theia/plugin-packager": "^0.0.1-1539891078",
"@eclipse-che/plugin": "^0.0.1-1546522786",
"@types/jest": "22.2.3",
"jest": "22.4.3",
"ts-jest": "22.4.3",
"rimraf": "2.6.2",

@@ -21,8 +25,4 @@ "tslint": "5.10.0",

},
"dependencies": {
"@eclipse-che/workspace-client": "latest",
"axios": "0.18.0"
},
"scripts": {
"prepare": "yarn run clean && yarn run build",
"prepare": "yarn run clean && yarn run build && yarn tslint-fix && yarn run test",
"clean": "rimraf lib",

@@ -33,3 +33,5 @@ "format-code": "tsfmt -r",

"build": "yarn run format-code && yarn run compile && theia:plugin pack",
"tslint-fix": "tslint --fix --project ."
"tslint-fix": "tslint --fix --project .",
"test": "jest",
"test-watch": "jest --watchAll"
},

@@ -40,4 +42,26 @@ "engines": {

"theiaPlugin": {
"backend": "lib/plugin-backend-plugin.js"
"backend": "lib/factory-plugin.js"
},
"jest": {
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.ts"
],
"coverageDirectory": "./coverage",
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"modulePathIgnorePatterns": [
"<rootDir>/lib"
],
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json"
],
"testURL": "http://localhost/"
}
}

27

src/theia-commands.ts

@@ -11,2 +11,4 @@ /*********************************************************************

import * as theia from '@theia/plugin';
import * as che from '@eclipse-che/plugin';
import convertToFileURI from './openfile';

@@ -24,11 +26,15 @@ const CHE_TASK_TYPE = 'che';

export class TheiaCloneCommand {
constructor(
protected readonly locationURI: string | undefined,
protected readonly folder: string,
protected readonly checkoutBranch?: string | undefined
) {
private locationURI: string | undefined;
private folder: string;
private checkoutBranch?: string | undefined;
constructor(project: che.ProjectConfig, projectsRoot: string) {
this.locationURI = project.source && project.source.location ? project.source.location : undefined;
this.folder = projectsRoot + project.path;
this.checkoutBranch = project.source && project.source.parameters && project.source.parameters['branch'] ?
project.source.parameters['branch'] : undefined;
}
execute(): PromiseLike<void> {
if (!this.locationURI) {

@@ -46,4 +52,7 @@ return new Promise(() => { });

}
}
export class TheiaCommand {
constructor(

@@ -61,6 +70,6 @@ protected readonly id: string,

execute(): PromiseLike<void> {
if (this.id === ActionId.OPEN_FILE) {
if (this.properties && this.properties.file) {
return theia.commands.executeCommand('file-search.openFile', this.properties.file)
const fileLocation = convertToFileURI(this.properties.file);
return theia.commands.executeCommand('file-search.openFile', fileLocation)
.then(() => {

@@ -86,6 +95,6 @@

}
return new Promise(() => { console.error('action nor openfile nor run command'); });
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc