mongodb-models-visualizer 0.1.1 โ 0.1.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/.github/workflows/publish.yml +24 -11
- package/README.md +8 -0
- package/contributing.md +115 -0
- package/license +27 -0
- package/package.json +2 -2
|
@@ -2,10 +2,14 @@ name: Publish to npm & GitHub Packages
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
|
|
6
|
-
-
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
7
|
workflow_dispatch:
|
|
8
8
|
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
id-token: write # Required for npm provenance
|
|
12
|
+
|
|
9
13
|
jobs:
|
|
10
14
|
publish:
|
|
11
15
|
runs-on: ubuntu-latest
|
|
@@ -15,21 +19,30 @@ jobs:
|
|
|
15
19
|
|
|
16
20
|
- uses: actions/setup-node@v4
|
|
17
21
|
with:
|
|
18
|
-
node-version:
|
|
22
|
+
node-version: 20
|
|
23
|
+
registry-url: 'https://registry.npmjs.org'
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: npm ci
|
|
27
|
+
|
|
28
|
+
- name: Build package
|
|
29
|
+
run: npm run build
|
|
19
30
|
|
|
20
|
-
# Publish to npm
|
|
21
31
|
- name: Publish to npm
|
|
22
|
-
run:
|
|
23
|
-
npm config set registry https://registry.npmjs.org/
|
|
24
|
-
npm publish
|
|
32
|
+
run: npm publish --provenance --access public
|
|
25
33
|
env:
|
|
26
34
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
- name: Configure for GitHub Packages
|
|
37
|
+
uses: actions/setup-node@v4
|
|
38
|
+
with:
|
|
39
|
+
node-version: 20
|
|
40
|
+
registry-url: 'https://npm.pkg.github.com'
|
|
41
|
+
scope: '@hibbanur-rahman'
|
|
42
|
+
|
|
29
43
|
- name: Publish to GitHub Packages
|
|
30
44
|
run: |
|
|
31
45
|
npm pkg set name="@hibbanur-rahman/mongodb-models-visualizer"
|
|
32
|
-
npm
|
|
33
|
-
npm publish
|
|
46
|
+
npm publish --access public
|
|
34
47
|
env:
|
|
35
|
-
NODE_AUTH_TOKEN: ${{ secrets.
|
|
48
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
1
9
|
# mongodb-visualizer
|
|
2
10
|
|
|
3
11
|
๐ **Swagger-like Analyzer for MongoDB (Mongoose) Models**
|
package/contributing.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Contributing to mongodb-models-visualizer
|
|
2
|
+
|
|
3
|
+
First of all, thank you for considering contributing ๐
|
|
4
|
+
Contributions of all kinds are welcome โ code, docs, ideas, or bug reports.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ๐ง Project Philosophy
|
|
9
|
+
|
|
10
|
+
- Simple developer experience
|
|
11
|
+
- Zero-config integration
|
|
12
|
+
- Clear and readable code
|
|
13
|
+
- Framework-agnostic core
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## ๐ ๏ธ Tech Stack
|
|
18
|
+
|
|
19
|
+
- TypeScript
|
|
20
|
+
- Node.js
|
|
21
|
+
- Express
|
|
22
|
+
- Mongoose
|
|
23
|
+
- tsup (build tool)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## ๐ Getting Started
|
|
28
|
+
|
|
29
|
+
### 1๏ธโฃ Fork the Repository
|
|
30
|
+
Click the **Fork** button on GitHub.
|
|
31
|
+
|
|
32
|
+
### 2๏ธโฃ Clone Your Fork
|
|
33
|
+
```bash
|
|
34
|
+
git clone https://github.com/<your-username>/mongodb-visualizer.git
|
|
35
|
+
cd mongodb-visualizer
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 3๏ธโฃ Install Dependencies
|
|
39
|
+
```bash
|
|
40
|
+
npm install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 4๏ธโฃ Build the Package
|
|
44
|
+
```bash
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## ๐ Project Structure
|
|
51
|
+
```
|
|
52
|
+
src/
|
|
53
|
+
โโโ core/ # Model scanning & analysis logic
|
|
54
|
+
โโโ express/ # Express middleware
|
|
55
|
+
โโโ ui/ # Swagger-like UI (future)
|
|
56
|
+
โโโ index.ts # Public API
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## ๐งช Testing Locally
|
|
62
|
+
|
|
63
|
+
You can test the package using npm link:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm link
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
In your test Express app:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm link mongodb-models-visualizer
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## ๐งพ Coding Guidelines
|
|
78
|
+
|
|
79
|
+
- Use TypeScript
|
|
80
|
+
- Prefer pure functions in `core/`
|
|
81
|
+
- Avoid breaking changes without discussion
|
|
82
|
+
- Add comments for non-obvious logic
|
|
83
|
+
- Follow existing code style
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## ๐ Reporting Bugs
|
|
88
|
+
|
|
89
|
+
When opening an issue, please include:
|
|
90
|
+
|
|
91
|
+
- Node.js version
|
|
92
|
+
- Mongoose version
|
|
93
|
+
- Minimal reproducible example
|
|
94
|
+
- Expected vs actual behavior
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## โจ Feature Requests
|
|
99
|
+
|
|
100
|
+
Feature ideas are welcome!
|
|
101
|
+
Please open an issue and describe:
|
|
102
|
+
|
|
103
|
+
- Use case
|
|
104
|
+
- Expected output
|
|
105
|
+
- Why it's useful
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## ๐ Pull Request Process
|
|
110
|
+
|
|
111
|
+
1. Create a feature branch
|
|
112
|
+
2. Make your changes
|
|
113
|
+
3. Run `npm run build`
|
|
114
|
+
4. Open a PR with a clear description
|
|
115
|
+
5. Reference related issues if any
|
package/license
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
# ๐ `LICENSE` (MIT License)
|
|
5
|
+
|
|
6
|
+
```md
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 mongodb-models-analyzer
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in
|
|
19
|
+
all copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27
|
+
THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb-models-visualizer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "MongoDB Database Visualizer and models relationships between collections",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"mongoose": ">=6"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"test": "echo \"
|
|
19
|
+
"test": "echo \"Warning: No tests specified\"",
|
|
20
20
|
"build": "tsup",
|
|
21
21
|
"prepublishOnly": "npm run build"
|
|
22
22
|
},
|