kfreelance-project-postgresql-prisma 1.0.1 → 1.0.3

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/client.js CHANGED
@@ -1,3 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrismaClient = void 0;
1
4
  // Direct client export for simple usage
2
- export { PrismaClient } from "../generated/prisma/index.js";
5
+ var index_js_1 = require("../generated/prisma/index.js");
6
+ Object.defineProperty(exports, "PrismaClient", { enumerable: true, get: function () { return index_js_1.PrismaClient; } });
3
7
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,yDAA4D;AAAnD,wGAAA,YAAY,OAAA"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,16 @@
1
- export { PrismaClient } from "../generated/prisma/index.js";
2
- export type { User, PasswordResetToken, Prisma, } from "../generated/prisma/index.js";
3
- import { PrismaClient } from "../generated/prisma/index.js";
1
+ export { PrismaClient } from "../generated/prisma";
2
+ export type { User, PasswordResetToken, Prisma } from "../generated/prisma";
3
+ import { PrismaClient } from "../generated/prisma";
4
4
  export declare const createPrismaClient: (options?: {
5
5
  databaseUrl?: string;
6
6
  log?: Array<"query" | "info" | "warn" | "error">;
7
- }) => PrismaClient<import("../generated/prisma/index.js").Prisma.PrismaClientOptions, never, import("../generated/prisma/runtime/library.js").DefaultArgs>;
7
+ }) => PrismaClient<{
8
+ datasources: {
9
+ db: {
10
+ url: string;
11
+ };
12
+ };
13
+ log: ("query" | "info" | "warn" | "error")[];
14
+ }, "query" | "info" | "warn" | "error", import("../generated/prisma/runtime/library").DefaultArgs>;
8
15
  export declare const getDefaultDatabaseUrl: () => string;
9
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,YAAY,EACV,IAAI,EACJ,kBAAkB,EAClB,MAAM,GACP,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,eAAO,MAAM,kBAAkB,GAAI,UAAU;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CAClD,yJAgBA,CAAC;AAGF,eAAO,MAAM,qBAAqB,cAEjC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,YAAY,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO5E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,eAAO,MAAM,kBAAkB,GAAI,UAAU;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CAClD;;;;;;;kGA0BA,CAAC;AAGF,eAAO,MAAM,qBAAqB,cAKjC,CAAC"}
package/dist/index.js CHANGED
@@ -1,23 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefaultDatabaseUrl = exports.createPrismaClient = exports.PrismaClient = void 0;
1
4
  // Library entry point - exports PrismaClient and types for consuming microservices
2
- export { PrismaClient } from "../generated/prisma/index.js";
3
- import { PrismaClient } from "../generated/prisma/index.js";
5
+ var prisma_1 = require("../generated/prisma");
6
+ Object.defineProperty(exports, "PrismaClient", { enumerable: true, get: function () { return prisma_1.PrismaClient; } });
7
+ // export type {
8
+ // User,
9
+ // PasswordResetToken,
10
+ // Prisma,
11
+ // } from "../generated/prisma/index.js";
12
+ const prisma_2 = require("../generated/prisma");
13
+ // import { PrismaClient } from "../generated/prisma/index.js";
4
14
  // Utility function to create a PrismaClient with custom options
5
- export const createPrismaClient = (options) => {
6
- const config = {};
7
- if (options?.databaseUrl) {
8
- config.datasources = {
15
+ const createPrismaClient = (options) => {
16
+ // const config: any = {};
17
+ // if (options?.databaseUrl) {
18
+ // config.datasources = {
19
+ // db: {
20
+ // url: options.databaseUrl,
21
+ // },
22
+ // };
23
+ // }
24
+ // if (options?.log) {
25
+ // config.log = options.log;
26
+ // }
27
+ // return new PrismaClient(config);
28
+ // const { PrismaClient } = require("../generated/prisma");
29
+ return new prisma_2.PrismaClient({
30
+ datasources: {
9
31
  db: {
10
- url: options.databaseUrl,
32
+ url: options?.databaseUrl || (0, exports.getDefaultDatabaseUrl)(),
11
33
  },
12
- };
13
- }
14
- if (options?.log) {
15
- config.log = options.log;
16
- }
17
- return new PrismaClient(config);
34
+ },
35
+ log: options?.log || ["error", "warn"],
36
+ });
18
37
  };
38
+ exports.createPrismaClient = createPrismaClient;
19
39
  // Export database configuration helpers
20
- export const getDefaultDatabaseUrl = () => {
21
- return process.env.DATABASE_URL || "postgresql://postgres:your_secure_password@localhost:5432/freelance_db?schema=public";
40
+ const getDefaultDatabaseUrl = () => {
41
+ return (process.env.DATABASE_URL ||
42
+ "postgresql://postgres:your_secure_password@localhost:5432/freelance_db?schema=public");
22
43
  };
44
+ exports.getDefaultDatabaseUrl = getDefaultDatabaseUrl;
23
45
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names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X,EAAE,EAAE;gBACF,GAAG,EAAE,OAAO,EAAE,WAAW,IAAI,IAAA,6BAAqB,GAAE;aACrD;SACF;QACD,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;KACvC,CAAC,CAAC;AACL,CAAC,CAAC;AA7BW,QAAA,kBAAkB,sBA6B7B;AAEF,wCAAwC;AACjC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,YAAY;QACxB,sFAAsF,CACvF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,qBAAqB,yBAKhC"}
@@ -155,8 +155,7 @@ const config = {
155
155
  "isCustomOutput": true
156
156
  },
157
157
  "relativeEnvPaths": {
158
- "rootEnvPath": null,
159
- "schemaEnvPath": "../../.env"
158
+ "rootEnvPath": null
160
159
  },
161
160
  "relativePath": "../../prisma",
162
161
  "clientVersion": "6.16.3",
@@ -156,8 +156,7 @@ const config = {
156
156
  "isCustomOutput": true
157
157
  },
158
158
  "relativeEnvPaths": {
159
- "rootEnvPath": null,
160
- "schemaEnvPath": "../../.env"
159
+ "rootEnvPath": null
161
160
  },
162
161
  "relativePath": "../../prisma",
163
162
  "clientVersion": "6.16.3",
@@ -155,8 +155,7 @@ const config = {
155
155
  "isCustomOutput": true
156
156
  },
157
157
  "relativeEnvPaths": {
158
- "rootEnvPath": null,
159
- "schemaEnvPath": "../../.env"
158
+ "rootEnvPath": null
160
159
  },
161
160
  "relativePath": "../../prisma",
162
161
  "clientVersion": "6.16.3",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "kfreelance-project-postgresql-prisma",
3
- "version": "1.0.1",
4
- "description": "Shared Prisma client library for microservices",
3
+ "version": "1.0.3",
5
4
  "type": "module",
5
+ "description": "Shared Prisma client library for microservices",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {