Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(function() {
var tv4;
tv4 = require('tv4').tv4;
module.exports = function(options) {
return tv4.validateMultiple(options, {
"type": "object",
additionalProperties: false,
properties: {
thisValue: {
required: false
},
global: {
type: 'array',
required: false
},
functionName: {
required: false
},
(function (tsd) {
var fs = require('fs');
var path = require('path');
var util = require('util');
var assert = require('assert');
var tv4 = require('tv4').tv4;
var Installed = (function () {
function Installed(selector, commit, hash) {
if (typeof selector === "undefined") { selector = null; }
if (typeof commit === "undefined") { commit = null; }
if (typeof hash === "undefined") { hash = null; }
this.selector = selector;
this.commit = commit;
this.hash = hash;
}
Installed.prototype.toString = function () {
return this.selector;
};
return Installed;
})();
tsd.Installed = Installed;
var Config = (function () {
function Config() {
this.version = "v3";
this.dependencies = {
};
this.tv4 = require('tv4').tv4;
this.schema = JSON.parse(System.IO.FileManager.handle.readFile(Config.SCHEMA_PATH));
}
Config.FILE_NAME = 'tsd-config.json';
(function (tsd) {
var fs = require('fs');
var path = require('path');
var util = require('util');
var assert = require('assert');
var mkdirp = require('mkdirp');
var tv4 = require('tv4').tv4;
var Context = (function () {
function Context(configPath, verbose) {
if (typeof configPath === "undefined") { configPath = null; }
if (typeof verbose === "undefined") { verbose = false; }
this.verbose = verbose;
this.log = xm.getLogger();
this.packageInfo = tsd.PackageJSON.getLocal();
this.paths = new tsd.Paths(this.packageInfo);
this.config = tsd.Config.getLocal(configPath || this.paths.config);
this.paths.setTypings(this.config.typingsPath);
if(this.verbose) {
this.logInfo(this.verbose);
}
}
Context.prototype.logInfo = function (details) {
if (typeof details === "undefined") { details = false; }