@test137e29b/module-hrp-database-types
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -6,3 +6,3 @@ import { MongoRepository } from '@test137e29b/fm-mongoose-repository'; | ||
} | ||
export declare const exampleRepository: ExampleRepository; | ||
export declare const exampleMongooseRepository: ExampleRepository; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.exampleRepository = void 0; | ||
exports.exampleMongooseRepository = void 0; | ||
const fm_mongoose_repository_1 = require("@test137e29b/fm-mongoose-repository"); | ||
@@ -11,3 +11,3 @@ const Example_model_1 = require("./Example.model"); | ||
} | ||
exports.exampleRepository = new ExampleRepository(); | ||
exports.exampleMongooseRepository = new ExampleRepository(); | ||
//# sourceMappingURL=Example.repository.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
const ExportWrapper_1 = require("./wrapper/ExportWrapper"); | ||
exports.exampleRepository = (0, ExportWrapper_1.exportAndWrapMongoRepository)(Example_repository_1.exampleRepository); | ||
exports.exampleRepository = (0, ExportWrapper_1.wrapExportedRepository)(Example_repository_1.exampleMongooseRepository); | ||
//# sourceMappingURL=index.js.map |
import { ExportedRepository, MongoRepository } from '@test137e29b/fm-mongoose-repository'; | ||
import { EmptyObject, IRepoKey } from '@test137e29b/fm-mongoose-repository/dist/repository/types'; | ||
export declare function exportAndWrapMongoRepository<Entity extends IRepoKey & EmptyObject>(repository: MongoRepository<Entity>): ExportedRepository<Entity, import("@test137e29b/fm-mongoose-repository/dist/repository/types").ClientEntity<Entity>, Partial<Omit<import("@test137e29b/fm-mongoose-repository/dist/repository/types").ClientEntity<Entity>, "_id" | "createdAt" | "updatedAt">>>; | ||
export declare function exportMongoRepository<Entity extends IRepoKey & EmptyObject>(repository: MongoRepository<Entity>): ExportedRepository<Entity, import("@test137e29b/fm-mongoose-repository/dist/repository/types").ClientEntity<Entity>, Partial<Omit<import("@test137e29b/fm-mongoose-repository/dist/repository/types").ClientEntity<Entity>, "_id" | "createdAt" | "updatedAt">>>; | ||
export declare function wrapExportedRepository<Entity extends IRepoKey & EmptyObject>(repository: MongoRepository<Entity>): ExportedRepository<Entity, import("@test137e29b/fm-mongoose-repository/dist/repository/types").ClientEntity<Entity>, Partial<Omit<import("@test137e29b/fm-mongoose-repository/dist/repository/types").ClientEntity<Entity>, "_id" | "createdAt" | "updatedAt">>>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.exportAndWrapMongoRepository = void 0; | ||
exports.wrapExportedRepository = exports.exportMongoRepository = void 0; | ||
const fm_mongoose_repository_1 = require("@test137e29b/fm-mongoose-repository"); | ||
function exportAndWrapMongoRepository(repository) { | ||
function exportMongoRepository(repository) { | ||
const SEPARATOR = '_'; | ||
@@ -23,3 +23,8 @@ const classProperties = Object.getOwnPropertyNames(fm_mongoose_repository_1.MongoRepository.prototype); | ||
} | ||
exports.exportAndWrapMongoRepository = exportAndWrapMongoRepository; | ||
exports.exportMongoRepository = exportMongoRepository; | ||
function wrapExportedRepository(repository) { | ||
const exportedRepository = new fm_mongoose_repository_1.ExportedRepository(repository.name); | ||
return exportedRepository; | ||
} | ||
exports.wrapExportedRepository = wrapExportedRepository; | ||
//# sourceMappingURL=ExportWrapper.js.map |
{ | ||
"name": "@test137e29b/module-hrp-database-types", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Database Types and Exported Repository Wrappers for HorizonRP on FiveM.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -10,2 +10,2 @@ import { MongoRepository } from '@test137e29b/fm-mongoose-repository'; | ||
export const exampleRepository = new ExampleRepository(); | ||
export const exampleMongooseRepository = new ExampleRepository(); |
@@ -1,4 +0,4 @@ | ||
import { exampleRepository as exampleMongooseRepository } from './entities/Example/Example.repository'; | ||
import { exportAndWrapMongoRepository } from './wrapper/ExportWrapper'; | ||
import { exampleMongooseRepository } from './entities/Example/Example.repository'; | ||
import { wrapExportedRepository } from './wrapper/ExportWrapper'; | ||
export const exampleRepository = exportAndWrapMongoRepository(exampleMongooseRepository); | ||
export const exampleRepository = wrapExportedRepository(exampleMongooseRepository); |
import { ExportedRepository, MongoRepository } from '@test137e29b/fm-mongoose-repository'; | ||
import { EmptyObject, IRepoKey } from '@test137e29b/fm-mongoose-repository/dist/repository/types'; | ||
export function exportAndWrapMongoRepository<Entity extends IRepoKey & EmptyObject>( | ||
export function exportMongoRepository<Entity extends IRepoKey & EmptyObject>( | ||
repository: MongoRepository<Entity> | ||
@@ -25,1 +25,8 @@ ) { | ||
} | ||
export function wrapExportedRepository<Entity extends IRepoKey & EmptyObject>( | ||
repository: MongoRepository<Entity> | ||
) { | ||
const exportedRepository = new ExportedRepository<Entity>(repository.name); | ||
return exportedRepository; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17623
343