Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (28 sloc) 1021 Bytes
import { Inject } from '@nestjs/common';
export const InjectConnectionProvider = (): any => {
return Inject(`ConnectionProvider`);
};
export const fileContentInjections: string[] = [];
export const InjectFileContents = (path: string): any => {
const filename = require.resolve(path);
if (!fileContentInjections.includes(filename)) {
fileContentInjections.push(filename);
}
return Inject(`FileContents:${filename}`);
};
export const cypherInjections: string[] = [];
export const InjectCypher = (path: string): any => {
const filename = require.resolve(`${path}.cypher`);
if (!cypherInjections.includes(filename)) {
cypherInjections.push(filename);
}
return Inject(`CYPHER:${filename}`);
};
export const sqlInjections: string[] = [];
export const InjectSql = (path: string): any => {
const filename = require.resolve(`${path}.sql`);
if (!sqlInjections.includes(filename)) {
sqlInjections.push(filename);
}
return Inject(`SQL:${filename}`);
};
You can’t perform that action at this time.