@levrbet/shared 0.2.49 → 0.2.51

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/README.md CHANGED
@@ -5,31 +5,10 @@ Shared utilities, components, and types for the LEVR platform.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @levrbet/shared @prisma/client prisma
8
+ npm install @levrbet/shared @prisma/client
9
9
  ```
10
10
 
11
- ## Prisma Setup
12
-
13
- This package includes a Prisma schema. After installation, run the setup script to generate the Prisma client:
14
-
15
- ```bash
16
- npx levrbet-prisma-setup
17
- ```
18
-
19
- Or add it to your `postinstall` script in `package.json`:
20
-
21
- ```json
22
- {
23
- "scripts": {
24
- "postinstall": "levrbet-prisma-setup"
25
- }
26
- }
27
- ```
28
-
29
- This will:
30
-
31
- 1. Copy the Prisma schema to your project's `prisma/` folder
32
- 2. Generate the `@prisma/client` in your `node_modules`
11
+ The Prisma client is automatically generated during installation - no additional setup required.
33
12
 
34
13
  ## Usage
35
14
 
@@ -37,7 +16,7 @@ This will:
37
16
  // Core utilities (universal - works in both browser and Node.js)
38
17
  import { e18, LevrBaseMarket } from "@levrbet/shared/core"
39
18
 
40
- // Prisma types and client (requires running prisma setup first)
19
+ // Prisma types and client
41
20
  import { PrismaClient, GamePhase, MarketStatus } from "@levrbet/shared/core"
42
21
  // Or directly from @prisma/client
43
22
  import { PrismaClient, GamePhase } from "@prisma/client"
@@ -62,11 +41,20 @@ This package requires the following peer dependencies:
62
41
  | Package | Required For |
63
42
  | ----------------------- | ---------------------------- |
64
43
  | `@prisma/client` | Database types and client |
65
- | `prisma` | Generating the Prisma client |
66
44
  | `react` | React hooks (optional) |
67
45
  | `@tanstack/react-query` | React query hooks (optional) |
68
46
  | `@privy-io/react-auth` | Privy auth hooks (optional) |
69
47
 
48
+ ## Prisma
49
+
50
+ The Prisma schema is bundled in this package and the client is auto-generated on install. If you need to manually regenerate:
51
+
52
+ ```bash
53
+ npx levrbet-prisma-setup
54
+ # Or directly:
55
+ npx prisma generate --schema=node_modules/@levrbet/shared/prisma/schema.prisma
56
+ ```
57
+
70
58
  ## Development
71
59
 
72
60
  ```bash
@@ -83,7 +71,6 @@ npm run dev # Creates a .tgz file
83
71
 
84
72
  # In consumer project
85
73
  npm install /path/to/levr-shared/*.tgz
86
- npx levrbet-prisma-setup
87
74
  ```
88
75
 
89
76
  ## License
@@ -17,7 +17,6 @@ export interface LevrGameWithRelationsPeriphery extends LevrGame {
17
17
  }
18
18
  export type LevrGameWithMarketsScoresAndLeague = Prisma.LevrGameGetPayload<{
19
19
  include: {
20
- fixture: {};
21
20
  markets: {
22
21
  include: {
23
22
  odds: true;
@@ -1 +1 @@
1
- {"version":3,"file":"game.types.js","sourceRoot":"","sources":["../../../../../src/core/types/oracle/game/game.types.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AACxE,0CAA2C;AAI3C,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,+CAAyB,CAAA;IACzB,mDAA6B,CAAA;AACjC,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAEM,MAAM,mBAAmB,GAAG,CAAC,MAAkB,EAAE,EAAE;IACtD,OAAO;QACH,CAAC,mBAAU,CAAC,cAAc,CAAC,EAAE,kBAAkB;QAC/C,CAAC,mBAAU,CAAC,SAAS,CAAC,EAAE,YAAY;KACvC,CAAC,MAAM,CAAC,CAAA;AACb,CAAC,CAAA;AALY,QAAA,mBAAmB,uBAK/B;AAyBD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,kDAA0B,CAAA;IAC1B,oDAA4B,CAAA;IAC5B,0DAAkC,CAAA;IAClC,8CAAsB,CAAA;IACtB,sDAA8B,CAAA;AAClC,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAEY,QAAA,cAAc,GAAG,IAAA,kBAAU,EAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;AAErD,QAAA,cAAc,GAAG,IAAA,kBAAU,EAAC,oBAAoB,EAAE;IAC3D,SAAS,EAAE,kBAAkB;CAChC,CAAC,CAAA;AACW,QAAA,cAAc,GAAG,IAAA,kBAAU,EAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;AACrD,QAAA,cAAc,GAAG,IAAA,kBAAU,EAAC,oBAAoB,EAAE;IAC3D,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,qBAAqB;CACrC,CAAC,CAAA;AAEF,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,uEAAe,CAAA;IACf,iEAAY,CAAA;IACZ,uEAAe,CAAA;IACf,iEAAY,CAAA;IACZ,mEAAa,CAAA;IACb,uEAAe,CAAA;IACf,mEAAa,CAAA;IACb,2EAAiB,CAAA;IACjB,6EAAkB,CAAA;AACtB,CAAC,EAVW,iBAAiB,iCAAjB,iBAAiB,QAU5B;AAyBD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iEAAa,CAAA;IACb,6DAAW,CAAA;AACf,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAQD,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;AACzB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,wCAAwB,CAAA;AAC5B,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
1
+ {"version":3,"file":"game.types.js","sourceRoot":"","sources":["../../../../../src/core/types/oracle/game/game.types.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AACxE,0CAA2C;AAI3C,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,+CAAyB,CAAA;IACzB,mDAA6B,CAAA;AACjC,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAEM,MAAM,mBAAmB,GAAG,CAAC,MAAkB,EAAE,EAAE;IACtD,OAAO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AHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,wCAAwB,CAAA;AAC5B,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levrbet/shared",
3
- "version": "0.2.49",
3
+ "version": "0.2.51",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {