@hedhog/prisma 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/prisma.module.d.ts +3 -0
- package/dist/prisma.module.d.ts.map +1 -0
- package/dist/prisma.module.js +21 -0
- package/dist/prisma.module.js.map +1 -0
- package/dist/prisma.service.d.ts +6 -0
- package/dist/prisma.service.d.ts.map +1 -0
- package/dist/prisma.service.js +21 -0
- package/dist/prisma.service.js.map +1 -0
- package/dist/prisma.service.spec.d.ts +2 -0
- package/dist/prisma.service.spec.d.ts.map +1 -0
- package/dist/prisma.service.spec.js +17 -0
- package/dist/prisma.service.spec.js.map +1 -0
- package/package.json +23 -0
- package/src/index.ts +2 -0
- package/src/prisma.module.ts +8 -0
- package/src/prisma.service.spec.ts +18 -0
- package/src/prisma.service.ts +9 -0
- package/tsconfig.json +20 -0
- package/tsconfig.lib.json +9 -0
package/dist/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./prisma.module"), exports);
|
18
|
+
__exportStar(require("./prisma.service"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prisma.module.d.ts","sourceRoot":"","sources":["../src/prisma.module.ts"],"names":[],"mappings":"AAGA,qBAIa,YAAY;CAAG"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
+
exports.PrismaModule = void 0;
|
10
|
+
const common_1 = require("@nestjs/common");
|
11
|
+
const prisma_service_1 = require("./prisma.service");
|
12
|
+
let PrismaModule = class PrismaModule {
|
13
|
+
};
|
14
|
+
exports.PrismaModule = PrismaModule;
|
15
|
+
exports.PrismaModule = PrismaModule = __decorate([
|
16
|
+
(0, common_1.Module)({
|
17
|
+
providers: [prisma_service_1.PrismaService],
|
18
|
+
exports: [prisma_service_1.PrismaService],
|
19
|
+
})
|
20
|
+
], PrismaModule);
|
21
|
+
//# sourceMappingURL=prisma.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prisma.module.js","sourceRoot":"","sources":["../src/prisma.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAM1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAJxB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;KACzB,CAAC;GACW,YAAY,CAAG"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prisma.service.d.ts","sourceRoot":"","sources":["../src/prisma.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBACa,aAAc,SAAQ,YAAa,YAAW,YAAY;IAC/D,YAAY;CAGnB"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
+
exports.PrismaService = void 0;
|
10
|
+
const common_1 = require("@nestjs/common");
|
11
|
+
const client_1 = require("@prisma/client");
|
12
|
+
let PrismaService = class PrismaService extends client_1.PrismaClient {
|
13
|
+
async onModuleInit() {
|
14
|
+
await this.$connect();
|
15
|
+
}
|
16
|
+
};
|
17
|
+
exports.PrismaService = PrismaService;
|
18
|
+
exports.PrismaService = PrismaService = __decorate([
|
19
|
+
(0, common_1.Injectable)()
|
20
|
+
], PrismaService);
|
21
|
+
//# sourceMappingURL=prisma.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prisma.service.js","sourceRoot":"","sources":["../src/prisma.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA0D;AAC1D,2CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAY;IAC7C,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAIzB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prisma.service.spec.d.ts","sourceRoot":"","sources":["../src/prisma.service.spec.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const testing_1 = require("@nestjs/testing");
|
4
|
+
const prisma_service_1 = require("./prisma.service");
|
5
|
+
describe('PrismaService', () => {
|
6
|
+
let service;
|
7
|
+
beforeEach(async () => {
|
8
|
+
const module = await testing_1.Test.createTestingModule({
|
9
|
+
providers: [prisma_service_1.PrismaService],
|
10
|
+
}).compile();
|
11
|
+
service = module.get(prisma_service_1.PrismaService);
|
12
|
+
});
|
13
|
+
it('should be defined', () => {
|
14
|
+
expect(service).toBeDefined();
|
15
|
+
});
|
16
|
+
});
|
17
|
+
//# sourceMappingURL=prisma.service.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prisma.service.spec.js","sourceRoot":"","sources":["../src/prisma.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,qDAAiD;AAEjD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,OAAsB,CAAC;IAE3B,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE,CAAC,8BAAa,CAAC;SAC3B,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,OAAO,GAAG,MAAM,CAAC,GAAG,CAAgB,8BAAa,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"name": "@hedhog/prisma",
|
3
|
+
"version": "0.0.2",
|
4
|
+
"private": false,
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"scripts": {
|
7
|
+
"build": "tsc && npm version patch",
|
8
|
+
"prod": "npm run build && npm publish"
|
9
|
+
},
|
10
|
+
"keywords": [],
|
11
|
+
"author": "",
|
12
|
+
"license": "MIT",
|
13
|
+
"description": "",
|
14
|
+
"peerDependencies": {
|
15
|
+
"@nestjs/common": "^10.0.0",
|
16
|
+
"@nestjs/core": "^10.0.0",
|
17
|
+
"@prisma/client": "^5.17.0"
|
18
|
+
},
|
19
|
+
"devDependencies": {
|
20
|
+
"ts-node": "^10.9.1",
|
21
|
+
"typescript": "^5.1.3"
|
22
|
+
}
|
23
|
+
}
|
package/src/index.ts
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Test, TestingModule } from '@nestjs/testing';
|
2
|
+
import { PrismaService } from './prisma.service';
|
3
|
+
|
4
|
+
describe('PrismaService', () => {
|
5
|
+
let service: PrismaService;
|
6
|
+
|
7
|
+
beforeEach(async () => {
|
8
|
+
const module: TestingModule = await Test.createTestingModule({
|
9
|
+
providers: [PrismaService],
|
10
|
+
}).compile();
|
11
|
+
|
12
|
+
service = module.get<PrismaService>(PrismaService);
|
13
|
+
});
|
14
|
+
|
15
|
+
it('should be defined', () => {
|
16
|
+
expect(service).toBeDefined();
|
17
|
+
});
|
18
|
+
});
|
package/tsconfig.json
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"experimentalDecorators": true,
|
4
|
+
"target": "es2017",
|
5
|
+
"module": "commonjs",
|
6
|
+
"lib": ["es2017", "es7", "es6"],
|
7
|
+
"declaration": true,
|
8
|
+
"declarationMap": true,
|
9
|
+
"sourceMap": true,
|
10
|
+
"outDir": "./dist",
|
11
|
+
"rootDir": "./src",
|
12
|
+
"strict": true,
|
13
|
+
"noImplicitAny": false,
|
14
|
+
"strictNullChecks": false,
|
15
|
+
"allowSyntheticDefaultImports": true,
|
16
|
+
"esModuleInterop": true,
|
17
|
+
"emitDecoratorMetadata": true
|
18
|
+
},
|
19
|
+
"exclude": ["node_modules", "dist"]
|
20
|
+
}
|