@talkpilot/core-db 1.0.1 → 1.0.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/.cursor/rules/development.mdc +1 -1
- package/DEVELOPMENT.md +2 -2
- package/README.md +9 -9
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ This package provides a centralized database layer for multiple domains (TalkPil
|
|
|
19
19
|
Each domain is isolated. They have their own `db` instance and must be connected independently.
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import { mongodbClient, municipalDataMongodbClient } from '@
|
|
22
|
+
import { mongodbClient, municipalDataMongodbClient } from '@talkpilot/core-db';
|
|
23
23
|
|
|
24
24
|
// TalkPilot
|
|
25
25
|
await mongodbClient.connect(uri);
|
package/DEVELOPMENT.md
CHANGED
|
@@ -32,7 +32,7 @@ If you want to use this package in another project locally without publishing it
|
|
|
32
32
|
|
|
33
33
|
2. In your PROJECT folder:
|
|
34
34
|
```bash
|
|
35
|
-
npm link @
|
|
35
|
+
npm link @talkpilot/core-db
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Adding a New Getter
|
|
@@ -95,4 +95,4 @@ Each developer needs to add the shared token to their local npm configuration. D
|
|
|
95
95
|
```
|
|
96
96
|
4. Save and exit.
|
|
97
97
|
|
|
98
|
-
Now you can run `npm publish` and `npm install` for scoped `@
|
|
98
|
+
Now you can run `npm publish` and `npm install` for scoped `@talkpilot` packages without being prompted for credentials.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @talkpilot/core-db
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@talkpilot/core-db)
|
|
4
4
|
|
|
5
5
|
A TypeScript-based core database management package designed to provide centralized database connections, ORM integrations, and client utilities for other projects. This package manages connections to both **TalkPilot** and **Municipal** MongoDB databases.
|
|
6
6
|
|
|
@@ -19,9 +19,9 @@ This package is intended to be used as a dependency in other projects. If you're
|
|
|
19
19
|
# In your other project:
|
|
20
20
|
npm install /path/to/core-db
|
|
21
21
|
# or if published to a registry:
|
|
22
|
-
npm install @
|
|
23
|
-
# or via GitHub
|
|
24
|
-
npm install github:
|
|
22
|
+
npm install @talkpilot/core-db
|
|
23
|
+
# or via GitHub
|
|
24
|
+
npm install github:talkpilot/core-db
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Quick Start
|
|
@@ -31,7 +31,7 @@ npm install github:Talk-Pilot/core-db
|
|
|
31
31
|
You must initialize the database clients before using any of the getters.
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
|
-
import { mongodbClient, municipalDataMongodbClient } from '@
|
|
34
|
+
import { mongodbClient, municipalDataMongodbClient } from '@talkpilot/core-db';
|
|
35
35
|
|
|
36
36
|
async function bootstrap() {
|
|
37
37
|
// Initialize TalkPilot DB
|
|
@@ -49,7 +49,7 @@ bootstrap().catch(console.error);
|
|
|
49
49
|
Once initialized, you can import and use any of the exported database getters.
|
|
50
50
|
|
|
51
51
|
```typescript
|
|
52
|
-
import { findAgents, findCities } from '@
|
|
52
|
+
import { findAgents, findCities } from '@talkpilot/core-db';
|
|
53
53
|
|
|
54
54
|
async function getSummary() {
|
|
55
55
|
// Get all agents from TalkPilot DB
|
|
@@ -89,7 +89,7 @@ The clients will automatically attempt to use the following environment variable
|
|
|
89
89
|
|
|
90
90
|
1. Clone the repository and install dependencies:
|
|
91
91
|
```bash
|
|
92
|
-
git clone https://github.com/
|
|
92
|
+
git clone https://github.com/talkpilot/core-db.git
|
|
93
93
|
cd core-db
|
|
94
94
|
npm install
|
|
95
95
|
```
|
|
@@ -128,7 +128,7 @@ To publish a new version of the package:
|
|
|
128
128
|
|
|
129
129
|
4. **Update in other repos**:
|
|
130
130
|
```bash
|
|
131
|
-
npm update @
|
|
131
|
+
npm update @talkpilot/core-db
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
## License
|