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

@spinajs/reflection

Package Overview
Dependencies
Maintainers
1
Versions
312
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/reflection - npm Package Compare versions

Comparing version 2.0.61 to 2.0.62

8

lib/index.d.ts

@@ -1,11 +0,3 @@

import ts from 'typescript';
import { Exception } from '../../exceptions/lib/index.js';
export * from 'typescript-mix';
export declare function build(override?: {
compilerOptions?: ts.CompilerOptions;
include?: string[];
exclude?: string[];
files?: string[];
extends?: string;
}, currentDir?: string): void;
/**

@@ -12,0 +4,0 @@ * Class info structure

37

lib/index.js

@@ -5,2 +5,3 @@ import * as fs from 'fs';

import ts from 'typescript';
import _ from 'lodash';
import { Configuration } from '@spinajs/configuration';

@@ -11,36 +12,2 @@ import { AsyncService, DI } from '@spinajs/di';

export * from 'typescript-mix';
export function build(override = {}, currentDir = process.cwd()) {
const configFile = ts.findConfigFile(currentDir, (path) => {
return ts.sys.fileExists(path);
}, 'tsconfig.json');
if (!configFile)
throw Error('tsconfig.json not found');
const { config } = ts.readConfigFile(configFile, (path) => {
return ts.sys.readFile(path);
});
config.compilerOptions = Object.assign({}, config.compilerOptions, override.compilerOptions);
if (override.include)
config.include = override.include;
if (override.exclude)
config.exclude = override.exclude;
if (override.files)
config.files = override.files;
if (override.extends)
config.files = override.extends;
const { options, fileNames, errors } = ts.parseJsonConfigFileContent(config, ts.sys, currentDir);
const program = ts.createProgram({ options, rootNames: fileNames, configFileParsingDiagnostics: errors });
const { diagnostics, emitSkipped } = program.emit();
const allDiagnostics = ts.getPreEmitDiagnostics(program).concat(diagnostics, errors);
if (allDiagnostics.length) {
const formatHost = {
getCanonicalFileName: (path) => path,
getCurrentDirectory: ts.sys.getCurrentDirectory,
getNewLine: () => ts.sys.newLine,
};
const message = ts.formatDiagnostics(allDiagnostics, formatHost);
console.warn(message);
}
if (emitSkipped)
process.exit(1);
}
/**

@@ -148,3 +115,3 @@ * Class info structure

// eslint-disable -next-line @typescript-eslint/await-thenable
const fPromises = directories
const fPromises = _.uniq(directories)
.filter((d) => {

@@ -151,0 +118,0 @@ /* eslint-disable */

10

package.json
{
"name": "@spinajs/reflection",
"version": "2.0.61",
"version": "2.0.62",
"description": "SpinaJS reflection helpers",

@@ -35,6 +35,6 @@ "exports": "./lib/index.js",

"dependencies": {
"@spinajs/configuration": "^2.0.61",
"@spinajs/di": "^2.0.61",
"@spinajs/exceptions": "^2.0.61",
"@spinajs/log": "^2.0.61",
"@spinajs/configuration": "^2.0.62",
"@spinajs/di": "^2.0.62",
"@spinajs/exceptions": "^2.0.62",
"@spinajs/log": "^2.0.62",
"glob": "^8.1.0",

@@ -41,0 +41,0 @@ "lodash": "^4.17.21",

Sorry, the diff of this file is not supported yet

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