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

nestjs-knex

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-knex - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0-next.1

20

dist/index.js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./knex.module"));
__export(require("./knex.decorators"));
__export(require("./knex.utils"));
__exportStar(require("./knex.module"), exports);
__exportStar(require("./knex.decorators"), exports);
__exportStar(require("./knex.interfaces"), exports);
__exportStar(require("./knex.utils"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KNEX_MODULE_OPTIONS_TOKEN = exports.KNEX_MODULE_CONNECTION_TOKEN = exports.KNEX_MODULE_CONNECTION = void 0;
exports.KNEX_MODULE_CONNECTION = 'default';
exports.KNEX_MODULE_CONNECTION_TOKEN = 'KnexModuleConnectionToken';
exports.KNEX_MODULE_OPTIONS_TOKEN = 'KnexModuleOptionsToken';

@@ -10,2 +10,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.KnexCoreModule = void 0;
const common_1 = require("@nestjs/common");

@@ -25,10 +26,4 @@ const knex_utils_1 = require("./knex.utils");

module: KnexCoreModule_1,
providers: [
knexOptionsProvider,
knexConnectionProvider,
],
exports: [
knexOptionsProvider,
knexConnectionProvider,
],
providers: [knexOptionsProvider, knexConnectionProvider],
exports: [knexOptionsProvider, knexConnectionProvider],
};

@@ -47,3 +42,6 @@ }

imports: options.imports,
providers: [...this.createAsyncProviders(options, connection), knexConnectionProvider],
providers: [
...this.createAsyncProviders(options, connection),
knexConnectionProvider,
],
exports: [knexConnectionProvider],

@@ -57,5 +55,3 @@ };

if (options.useExisting || options.useFactory) {
return [
this.createAsyncOptionsProvider(options, connection)
];
return [this.createAsyncOptionsProvider(options, connection)];
}

@@ -81,3 +77,3 @@ return [

async useFactory(optionsFactory) {
return await optionsFactory.createKnexModuleOptions();
return optionsFactory.createKnexModuleOptions();
},

@@ -84,0 +80,0 @@ inject: [options.useClass || options.useExisting],

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectConnection = exports.InjectKnex = void 0;
const common_1 = require("@nestjs/common");
const knex_utils_1 = require("./knex.utils");
exports.InjectKnex = (connection) => {
const InjectKnex = (connection) => {
return common_1.Inject(knex_utils_1.getKnexConnectionToken(connection));
};
exports.InjectKnex = InjectKnex;
exports.InjectConnection = exports.InjectKnex;

@@ -1,7 +0,7 @@

import { ModuleMetadata, Type } from "@nestjs/common/interfaces";
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
import * as knex from 'knex';
export declare type Knex = knex;
export declare type Connection = Knex;
export declare type Knex = knex.Knex;
export declare type Connection = knex.Knex;
export interface KnexModuleOptions {
config: knex.Config;
config: knex.Knex.Config;
}

@@ -8,0 +8,0 @@ export interface KnexModuleOptionsFactory {

@@ -10,2 +10,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.KnexModule = void 0;
const common_1 = require("@nestjs/common");

@@ -12,0 +13,0 @@ const knex_core_module_1 = require("./knex.core-module");

@@ -1,4 +0,4 @@

import { KnexModuleOptions } from "./knex.interfaces";
import { KnexModuleOptions } from './knex.interfaces';
export declare function getKnexOptionsToken(connection: string): string;
export declare function getKnexConnectionToken(connection: string): string;
export declare function createKnexConnection(options: KnexModuleOptions): any;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Knex = require("knex");
exports.createKnexConnection = exports.getKnexConnectionToken = exports.getKnexOptionsToken = void 0;
const knex_1 = require("knex");
const knex_constants_1 = require("./knex.constants");

@@ -15,4 +16,4 @@ function getKnexOptionsToken(connection) {

const { config } = options;
return Knex(config);
return knex_1.knex(config);
}
exports.createKnexConnection = createKnexConnection;
{
"name": "nestjs-knex",
"version": "1.0.1",
"version": "2.0.0-next.1",
"description": "Nest - modern, fast, powerful node.js web framework (@knex)",

@@ -40,28 +40,29 @@ "author": "Sviatoslav H",

"@nestjs/core": ">=6.7.0",
"knex": ">=0.16.5"
"knex": ">=0.95.4"
},
"devDependencies": {
"@nestjs/common": "^7.0.3",
"@nestjs/core": "^7.0.3",
"@nestjs/testing": "^7.0.3",
"@types/jest": "^25.1.4",
"@types/node": "^13.9.2",
"@types/supertest": "^2.0.8",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"jest": "^25.1.0",
"knex": "^0.20.11",
"prettier": "^1.19.1",
"@nestjs/common": "^7.6.15",
"@nestjs/core": "^7.6.15",
"@nestjs/testing": "^7.6.15",
"@types/jest": "^26.0.22",
"@types/node": "^14.14.41",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.24.0",
"eslint-config-prettier": "^8.2.0",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^26.6.3",
"knex": "^0.95.4",
"prettier": "^2.2.1",
"reflect-metadata": "^0.1.13",
"sqlite3": "^4.1.1",
"supertest": "^4.0.2",
"ts-jest": "^25.2.1",
"ts-loader": "^6.2.1",
"ts-node": "^8.7.0",
"rxjs": "^6.6.7",
"sqlite3": "^5.0.2",
"supertest": "^6.1.3",
"ts-jest": "^26.5.5",
"ts-loader": "^8.1.0",
"ts-node": "^9.1.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^3.8.3"
"typescript": "^4.2.4"
}
}
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