@pkgverse/prismock 2.0.0-beta.4 → 2.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -5
- package/dist/index.mjs +1 -3
- package/dist/lib/prismock.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -670,9 +670,7 @@ module.exports = __toCommonJS(exports_src);
|
|
|
670
670
|
|
|
671
671
|
// src/lib/prismock.ts
|
|
672
672
|
var import_path = __toESM(require("path"));
|
|
673
|
-
var
|
|
674
|
-
var import_getGenerators = require("@prisma/internals/dist/get-generators/getGenerators");
|
|
675
|
-
var import_getSchema = require("@prisma/internals/dist/cli/getSchema");
|
|
673
|
+
var import_internals = require("@prisma/internals");
|
|
676
674
|
|
|
677
675
|
// src/lib/operations/aggregate.ts
|
|
678
676
|
function aggregate(args, items) {
|
|
@@ -5278,8 +5276,8 @@ var PrismockClient = createPrismock(import_client2.Prisma);
|
|
|
5278
5276
|
// src/lib/prismock.ts
|
|
5279
5277
|
async function generateDMMF(schemaPath) {
|
|
5280
5278
|
const pathToModule = schemaPath ?? require.resolve(import_path.default.resolve(process.cwd(), "prisma/schema.prisma"));
|
|
5281
|
-
const datamodel = await
|
|
5282
|
-
return
|
|
5279
|
+
const datamodel = await import_internals.getSchema(pathToModule);
|
|
5280
|
+
return import_internals.getDMMF({ datamodel });
|
|
5283
5281
|
}
|
|
5284
5282
|
async function generatePrismock(options = {}) {
|
|
5285
5283
|
const schema = await generateDMMF(options.schemaPath);
|
package/dist/index.mjs
CHANGED
|
@@ -613,9 +613,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
613
613
|
|
|
614
614
|
// src/lib/prismock.ts
|
|
615
615
|
import path from "path";
|
|
616
|
-
import { getDMMF } from "@prisma/internals
|
|
617
|
-
import { getGenerator } from "@prisma/internals/dist/get-generators/getGenerators";
|
|
618
|
-
import { getSchema } from "@prisma/internals/dist/cli/getSchema";
|
|
616
|
+
import { getDMMF, getGenerator, getSchema } from "@prisma/internals";
|
|
619
617
|
|
|
620
618
|
// src/lib/operations/aggregate.ts
|
|
621
619
|
function aggregate(args, items) {
|
package/dist/lib/prismock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrismaClient } from '@prisma/client';
|
|
2
2
|
import { DMMF } from '@prisma/generator-helper';
|
|
3
|
-
import { Generator } from '@prisma/internals
|
|
3
|
+
import { type Generator } from '@prisma/internals';
|
|
4
4
|
import { Delegate, DelegateProperties, Item } from './delegate';
|
|
5
5
|
import { PrismockClientType } from './client';
|
|
6
6
|
type Options = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pkgverse/prismock",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.6",
|
|
4
4
|
"description": "A mock for PrismaClient, dedicated to unit testing.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/JQuezada0/prismock"
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"packageManager": "bun@1.2.16",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "dist/index.cjs",
|
|
13
|
-
"
|
|
14
|
-
"module": "dist/index.mjs",
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"module": "./dist/index.mjs",
|
|
15
15
|
"exports": {
|
|
16
|
-
"
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
17
18
|
"import": "./dist/index.mjs",
|
|
18
19
|
"require": "./dist/index.cjs",
|
|
19
|
-
"types": "./dist/index.d.ts",
|
|
20
20
|
"default": "./dist/index.mjs"
|
|
21
21
|
}
|
|
22
22
|
},
|