@outs-tand-ing/postgres 0.1.0 → 0.1.2
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 +10 -6
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +1 -2
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/shared/drizzle.d.ts +0 -2
- package/dist/modules/shared/drizzle.d.ts.map +1 -1
- package/dist/modules/shared/drizzle.js +4 -3
- package/dist/modules/shared/drizzle.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -279,6 +279,7 @@ bun run publish:npm
|
|
|
279
279
|
```
|
|
280
280
|
|
|
281
281
|
This will:
|
|
282
|
+
|
|
282
283
|
1. Clean the dist directory
|
|
283
284
|
2. Build TypeScript declarations and JS files
|
|
284
285
|
3. Publish to npm with public access
|
|
@@ -338,15 +339,11 @@ export default {
|
|
|
338
339
|
const client = postgres(env.DATABASE_URL)
|
|
339
340
|
const db = drizzle(client)
|
|
340
341
|
|
|
341
|
-
const user = await db
|
|
342
|
-
.select()
|
|
343
|
-
.from(users)
|
|
344
|
-
.where(eq(users.email, 'test@example.com'))
|
|
345
|
-
.limit(1)
|
|
342
|
+
const user = await db.select().from(users).where(eq(users.email, 'test@example.com')).limit(1)
|
|
346
343
|
|
|
347
344
|
await client.end()
|
|
348
345
|
return Response.json({ user })
|
|
349
|
-
}
|
|
346
|
+
},
|
|
350
347
|
}
|
|
351
348
|
```
|
|
352
349
|
|
|
@@ -395,6 +392,13 @@ const newUser: NewUser = {
|
|
|
395
392
|
}
|
|
396
393
|
```
|
|
397
394
|
|
|
395
|
+
## Resolving type issues when importing from @outs-tand-ing/postgres for the PG/Drizzle schemas (best practices going forward)
|
|
396
|
+
|
|
397
|
+
1. Import drizzle utilities directly: Always use import { eq, and, or } from 'drizzle-orm' in your ops code
|
|
398
|
+
2. Import schemas from postgres package: import { type Round, type Season } from '@outs-tand-ing/postgres'
|
|
399
|
+
3. Keep versions in sync: Both packages use exact version 0.45.1 - maintain this consistency
|
|
400
|
+
4. After updating postgres package: Run bun install in ops to pick up changes
|
|
401
|
+
|
|
398
402
|
## License
|
|
399
403
|
|
|
400
404
|
MIT
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAG1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAG1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/modules/index.js
CHANGED
|
@@ -9,6 +9,5 @@ export * from './delivery';
|
|
|
9
9
|
export * from './timeline';
|
|
10
10
|
// Shared utilities
|
|
11
11
|
export { generateHashId, formatDateDDMMYY, normalizeForUrl } from './shared/utils';
|
|
12
|
-
// Drizzle utilities
|
|
13
|
-
export * from './shared/drizzle';
|
|
12
|
+
// Note: Drizzle utilities (eq, and, or, etc.) should be imported directly from 'drizzle-orm' in your project
|
|
14
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAE1B,mBAAmB;AACnB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAElF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAE1B,mBAAmB;AACnB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAElF,6GAA6G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.d.ts","sourceRoot":"","sources":["../../../src/modules/shared/drizzle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drizzle.d.ts","sourceRoot":"","sources":["../../../src/modules/shared/drizzle.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// Note: Consumers should import drizzle-orm utilities directly from their own drizzle-orm installation
|
|
3
|
+
// This prevents type conflicts when using schemas across packages
|
|
4
|
+
// Example: import { eq, and, or } from 'drizzle-orm'
|
|
4
5
|
//# sourceMappingURL=drizzle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.js","sourceRoot":"","sources":["../../../src/modules/shared/drizzle.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"drizzle.js","sourceRoot":"","sources":["../../../src/modules/shared/drizzle.ts"],"names":[],"mappings":";AAAA,uGAAuG;AACvG,kEAAkE;AAClE,qDAAqD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outs-tand-ing/postgres",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "PostgreSQL database with Drizzle ORM for Outs project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"drizzle-kit": "0.31.8",
|
|
88
88
|
"drizzle-orm": "0.45.1",
|
|
89
89
|
"mongoose": "^9.0.2",
|
|
90
|
-
"postgres": "
|
|
90
|
+
"postgres": "3.4.7",
|
|
91
91
|
"typescript": "^5.9.3"
|
|
92
92
|
}
|
|
93
93
|
}
|