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

@coursehero/theia

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coursehero/theia - npm Package Compare versions

Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5

dist/cli.d.ts

7

__tests__/canary.test.ts
import * as rimraf from 'rimraf'
import theia, { Configuration, LocalStorage } from '../theia'
import theia, { Configuration, LocalStorage } from '../src/theia'

@@ -18,7 +18,6 @@ describe('mythos', () => {

},
storage,
loadFromDisk: false
storage
}
const core = theia(config)
const core = theia(config, 'theia*')

@@ -25,0 +24,0 @@ beforeAll(() => core.buildAll(), 1000 * 60)

@@ -9,3 +9,3 @@ /// <reference path="../types/tapable.d.ts" />

export declare function nn<T>(array: (T | null)[]): T[];
export default function theia(configFromParams?: Configuration): Core;
export default function theia(configFromParams: Configuration, debugNamespaces: string): Core;
export { Builder, Core, CoreHooks, LocalStorage, Plugin, S3Storage, Storage };

@@ -20,3 +20,2 @@ export declare type Environment = 'test' | 'development' | 'production';

verbose?: boolean;
loadFromDisk?: boolean;
}

@@ -23,0 +22,0 @@ export interface ComponentLibraryConfigurations {

"use strict";
/// <reference path="../types/tapable.d.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
const debug = require("debug");
const path = require("path");

@@ -18,5 +19,2 @@ const Core_1 = require("./Core"), CoreHooks = Core_1;

exports.nn = nn;
function getConfig(configPath) {
return require(configPath).default;
}
function configDefaulter(options) {

@@ -39,5 +37,2 @@ const opts = Object.assign({}, options);

}
if (opts.loadFromDisk === undefined) {
opts.loadFromDisk = true;
}
if (opts.plugins === undefined) {

@@ -54,30 +49,5 @@ opts.plugins = [];

}
function theia(configFromParams) {
const configPaths = [
path.resolve('theia.config'),
path.resolve('dist/theia.config'),
path.resolve('src/theia.config')
];
const configPath = configPaths.find(p => {
try {
require.resolve(p);
return true;
}
catch (e) {
return false;
}
});
let config;
const readFromDisk = !configFromParams || (configFromParams && configFromParams.loadFromDisk);
if (readFromDisk && configPath) {
config = getConfig(configPath);
// TODO merge configFromParams
}
else if (configFromParams) {
config = configFromParams;
}
else {
throw new Error('could not find theia config');
}
config = configDefaulter(config);
function theia(configFromParams, debugNamespaces) {
debug.enable(debugNamespaces);
const config = configDefaulter(configFromParams);
const core = new Core_1.default(config);

@@ -84,0 +54,0 @@ if (config.verbose) {

{
"name": "@coursehero/theia",
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"bin": "./dist/cli.js",
"main": "dist/theia.js",

@@ -12,2 +13,3 @@ "types": "dist/theia.d.ts",

"bluebird": "^3.5.1",
"commander": "^2.17.1",
"debug": "~3.1.0",

@@ -23,3 +25,3 @@ "fs-extra": "^5.0.0",

},
"gitHead": "6b26aadae2a4dbe5ee75c0594c687ce896371704"
"gitHead": "ff5f725760db703bc9db3241ec810d81d519ae38"
}

Sorry, the diff of this file is not supported yet

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