quar 1.4.0 → 1.4.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.
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "restricted",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
@@ -0,0 +1,50 @@
1
+ name: Publish Package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ pull_request:
9
+ branches:
10
+ - main
11
+
12
+ jobs:
13
+ release:
14
+ if: github.ref == 'refs/heads/main' && github.repository == 'IsmailBinMujeeb/Quar-Studio'
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: write
18
+ pull-requests: write
19
+ actions: write
20
+ id-token: write
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v6
24
+
25
+ - name: Setup Node.js
26
+ uses: actions/setup-node@v6
27
+ with:
28
+ node-version: 24
29
+ registry-url: https://registry.npmjs.org
30
+ cache: npm
31
+
32
+ - name: Set npm token
33
+ run: |
34
+ npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
35
+ npm config set provenance true
36
+
37
+ - name: Install dependencies
38
+ run: npm ci
39
+
40
+ - name: Create Release Pull Request or Publish to npm
41
+ id: changesets
42
+ uses: changesets/action@v1
43
+ with:
44
+ version: npm run changeset version
45
+ publish: npm run changeset publish
46
+ createGithubReleases: true
47
+ commit: "chore(release): version packages"
48
+ title: "chore(release): version packages"
49
+ env:
50
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # quar
2
+
3
+ ## 1.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - cfe3e93: update package.json
8
+
9
+ ## 1.4.1
10
+
11
+ ### Patch Changes
12
+
13
+ - a24e395: update readme for latest updates
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Ismail Bin Mujeeb
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ismail Bin Mujeeb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,95 +1,96 @@
1
- # Quar Studio – Quick UI for Mongoose Models
2
-
3
- <p align="center">
4
- <img src="./assets/icon.png" alt="logo" width="200px"/>
5
- </p>
6
-
7
- Instantly spin up a web-based editor for your Mongoose models.
8
- Built for developers who loves quick database interaction!
9
-
10
- ## Install & Run
11
- ```bash
12
- npx quar --model <path-to-model-folder> --db <db-name>
13
- ```
14
- This will load all Mongoose models from the folder and start a local web UI to Create, view, update, and delete documents.
15
-
16
- ## What it does
17
- - Loads your Mongoose models dynamically
18
- - Connects to your MongoDB database
19
- - Gives a tabbed UI for each model
20
- - View nested documents in a tree-style
21
- - Supports Create, Read, update and delete
22
-
23
- ## Folder Structure
24
- Your models folder can contain files like this:
25
-
26
- ```js
27
- // ./models/Post.js
28
- import mongoose from "mongoose"
29
-
30
- const postSchema = new mongoose.Schema({
31
- title: String,
32
- body: String,
33
- author: {
34
- name: String,
35
- age: Number
36
- }
37
- });
38
-
39
- export default mongoose.model("Post", postSchema);
40
- ```
41
-
42
- ## Configuration
43
-
44
- 1. Install Quar as dev deps
45
- ```bash
46
- npm i quar --save-dev
47
- ```
48
-
49
- 2. Execute Command
50
- ```bash
51
- npx quar
52
- ```
53
-
54
- 3. Set Models Folder
55
- ```bash
56
- npx quar --model <folder-path>
57
- ```
58
-
59
- 4. Set Database Name
60
- ```bash
61
- npx quar --model <folder-path> --db <db-name>
62
- ```
63
-
64
- 5. Set Database URI `(Optional)`
65
- ```bash
66
- npx quar --model <folder-path> --db <db-name> --uri <db-uri>
67
- ```
68
- > ***Note:** By default it will try to connect local mongodb if uri not provided
69
-
70
- ## Usage Tips
71
- - Supports nested schemas & subdocuments
72
- - Clean tabbed navigation per model
73
- - Auto-refreshes data after updates
74
- - Keyboard shortcuts support
75
-
76
- | Command | Performs |
77
- |---------|----------|
78
- | <kbd>ctrl + o</kbd> | Toggles Insert Tab |
79
- | <kbd>ctrl + r</kbd> | Refresh Model |
80
- | <kbd>ctrl + ></kbd> | Go To Next Page |
81
- | <kbd>ctrl + <</kbd> | Go To Previous Page |
82
-
83
-
84
-
85
- ## Dev Notes
86
-
87
- - Built for development use
88
- - Doesn’t expose MONGO_URI publicly
89
- - Uses Mongooses model.schema.tree for schema info
90
- - Modular and extendable
91
-
92
- ## Contribute
93
- Pull requests, suggestions, and ideas are welcome!
94
-
95
- ***Icon: <a href="https://www.flaticon.com/free-icons/thunder" title="thunder icons">Thunder icons created by Hexagon075 - Flaticon</a>***
1
+ # Quar Studio – Quick UI for Mongoose Models
2
+
3
+ <p align="center">
4
+ <img src="./assets/icon.png" alt="logo" width="200px"/>
5
+ </p>
6
+
7
+ Instantly spin up a web-based editor for your Mongoose models.
8
+ Built for developers who loves quick database interaction!
9
+
10
+ ## Install & Run
11
+ ```bash
12
+ npx quar
13
+ ```
14
+ It will ask you for model folder path, database name and database URI (optional).
15
+ This will load all Mongoose models from the folder and start a local web UI to Create, view, update, and delete documents.
16
+
17
+ ## What it does
18
+ - Loads your Mongoose models dynamically
19
+ - Connects to your MongoDB database
20
+ - Gives a tabbed UI for each model
21
+ - View nested documents in a tree-style
22
+ - Supports Create, Read, update and delete
23
+
24
+ ## Folder Structure
25
+ Your models folder can contain files like this:
26
+
27
+ ```js
28
+ // ./models/Post.js
29
+ import mongoose from "mongoose"
30
+
31
+ const postSchema = new mongoose.Schema({
32
+ title: String,
33
+ body: String,
34
+ author: {
35
+ name: String,
36
+ age: Number
37
+ }
38
+ });
39
+
40
+ export default mongoose.model("Post", postSchema);
41
+ ```
42
+
43
+ ## Configuration
44
+
45
+ 1. Install Quar as dev deps
46
+ ```bash
47
+ npm i quar --save-dev
48
+ ```
49
+
50
+ 2. Execute Command
51
+ ```bash
52
+ npx quar
53
+ ```
54
+
55
+ 3. Set Models Folder
56
+ ```bash
57
+ npx quar --model <folder-path>
58
+ ```
59
+
60
+ 4. Set Database Name
61
+ ```bash
62
+ npx quar --model <folder-path> --db <db-name>
63
+ ```
64
+
65
+ 5. Set Database URI `(Optional)`
66
+ ```bash
67
+ npx quar --model <folder-path> --db <db-name> --uri <db-uri>
68
+ ```
69
+ > ***Note:** By default it will try to connect local mongodb if uri not provided
70
+
71
+ ## Usage Tips
72
+ - Supports nested schemas & subdocuments
73
+ - Clean tabbed navigation per model
74
+ - Auto-refreshes data after updates
75
+ - Keyboard shortcuts support
76
+
77
+ | Command | Performs |
78
+ |---------|----------|
79
+ | <kbd>ctrl + o</kbd> | Toggles Insert Tab |
80
+ | <kbd>ctrl + r</kbd> | Refresh Model |
81
+ | <kbd>ctrl + ></kbd> | Go To Next Page |
82
+ | <kbd>ctrl + <</kbd> | Go To Previous Page |
83
+
84
+
85
+
86
+ ## Dev Notes
87
+
88
+ - Built for development use
89
+ - Doesnt expose MONGO_URI publicly
90
+ - Uses Mongoose’s model.schema.tree for schema info
91
+ - Modular and extendable
92
+
93
+ ## Contribute
94
+ Pull requests, suggestions, and ideas are welcome!
95
+
96
+ ***Icon: <a href="https://www.flaticon.com/free-icons/thunder" title="thunder icons">Thunder icons created by Hexagon075 - Flaticon</a>***
@@ -1,52 +1,52 @@
1
- import mongoose from "mongoose";
2
-
3
- const postSchema = new mongoose.Schema(
4
- {
5
- author: {
6
- type: mongoose.Schema.Types.ObjectId,
7
- ref: "User",
8
- required: true,
9
- },
10
- title: {
11
- type: String,
12
- required: [true, "Post title is required"],
13
- trim: true,
14
- maxlength: [120, "Title cannot exceed 120 characters"],
15
- },
16
- content: {
17
- type: String,
18
- required: [true, "Post content is required"],
19
- },
20
- image: {
21
- type: String,
22
- default: null,
23
- },
24
- likes: [
25
- {
26
- type: mongoose.Schema.Types.ObjectId,
27
- ref: "User",
28
- },
29
- ],
30
- // comments: [
31
- // {
32
- // user: {
33
- // type: mongoose.Schema.Types.ObjectId,
34
- // ref: "User",
35
- // },
36
- // text: {
37
- // type: String,
38
- // required: true,
39
- // },
40
- // createdAt: {
41
- // type: Date,
42
- // default: Date.now,
43
- // },
44
- // },
45
- // ],
46
- },
47
- {
48
- timestamps: true,
49
- }
50
- );
51
-
52
- export default mongoose.model("Post", postSchema);
1
+ import mongoose from "mongoose";
2
+
3
+ const postSchema = new mongoose.Schema(
4
+ {
5
+ author: {
6
+ type: mongoose.Schema.Types.ObjectId,
7
+ ref: "User",
8
+ required: true,
9
+ },
10
+ title: {
11
+ type: String,
12
+ required: [true, "Post title is required"],
13
+ trim: true,
14
+ maxlength: [120, "Title cannot exceed 120 characters"],
15
+ },
16
+ content: {
17
+ type: String,
18
+ required: [true, "Post content is required"],
19
+ },
20
+ image: {
21
+ type: String,
22
+ default: null,
23
+ },
24
+ likes: [
25
+ {
26
+ type: mongoose.Schema.Types.ObjectId,
27
+ ref: "User",
28
+ },
29
+ ],
30
+ // comments: [
31
+ // {
32
+ // user: {
33
+ // type: mongoose.Schema.Types.ObjectId,
34
+ // ref: "User",
35
+ // },
36
+ // text: {
37
+ // type: String,
38
+ // required: true,
39
+ // },
40
+ // createdAt: {
41
+ // type: Date,
42
+ // default: Date.now,
43
+ // },
44
+ // },
45
+ // ],
46
+ },
47
+ {
48
+ timestamps: true,
49
+ }
50
+ );
51
+
52
+ export default mongoose.model("Post", postSchema);
@@ -1,44 +1,44 @@
1
- import mongoose from "mongoose";
2
-
3
- const userSchema = new mongoose.Schema(
4
- {
5
- username: {
6
- type: String,
7
- required: [true, "Username is required"],
8
- unique: true,
9
- trim: true,
10
- minlength: [3, "Username must be at least 3 characters long"],
11
- },
12
- email: {
13
- type: String,
14
- required: [true, "Email is required"],
15
- unique: true,
16
- lowercase: true,
17
- match: [/.+@.+\..+/, "Please enter a valid email address"],
18
- },
19
- password: {
20
- type: String,
21
- required: [true, "Password is required"],
22
- minlength: [6, "Password must be at least 6 characters long"],
23
- select: false,
24
- },
25
- avatar: {
26
- type: String,
27
- },
28
- bio: {
29
- type: String,
30
- maxlength: [160, "Bio cannot exceed 160 characters"],
31
- },
32
- posts: [
33
- {
34
- type: mongoose.Schema.Types.ObjectId,
35
- ref: "Post",
36
- },
37
- ],
38
- },
39
- {
40
- timestamps: true,
41
- }
42
- );
43
-
44
- export default mongoose.model("User", userSchema);
1
+ import mongoose from "mongoose";
2
+
3
+ const userSchema = new mongoose.Schema(
4
+ {
5
+ username: {
6
+ type: String,
7
+ required: [true, "Username is required"],
8
+ unique: true,
9
+ trim: true,
10
+ minlength: [3, "Username must be at least 3 characters long"],
11
+ },
12
+ email: {
13
+ type: String,
14
+ required: [true, "Email is required"],
15
+ unique: true,
16
+ lowercase: true,
17
+ match: [/.+@.+\..+/, "Please enter a valid email address"],
18
+ },
19
+ password: {
20
+ type: String,
21
+ required: [true, "Password is required"],
22
+ minlength: [6, "Password must be at least 6 characters long"],
23
+ select: false,
24
+ },
25
+ avatar: {
26
+ type: String,
27
+ },
28
+ bio: {
29
+ type: String,
30
+ maxlength: [160, "Bio cannot exceed 160 characters"],
31
+ },
32
+ posts: [
33
+ {
34
+ type: mongoose.Schema.Types.ObjectId,
35
+ ref: "Post",
36
+ },
37
+ ],
38
+ },
39
+ {
40
+ timestamps: true,
41
+ }
42
+ );
43
+
44
+ export default mongoose.model("User", userSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quar",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "This will load all Mongoose models from the folder and start a local web UI to Create, view, update, and delete documents.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9,7 +9,11 @@
9
9
  },
10
10
  "scripts": {
11
11
  "start": "node index.js",
12
- "dev": "node index.js --model ./dummy_models --db quarDB"
12
+ "dev": "node index.js --model ./dummy_models --db quarDB",
13
+ "changeset": "changeset"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
13
17
  },
14
18
  "author": "@IsmailBinMujeeb (IsmailBinMujeeb@gmail.com)",
15
19
  "license": "MIT",
@@ -29,5 +33,8 @@
29
33
  "bugs": {
30
34
  "url": "https://github.com/IsmailBinMujeeb/quar-studio/issues"
31
35
  },
32
- "homepage": "https://github.com/IsmailBinMujeeb/quar-studio#readme"
36
+ "homepage": "https://github.com/IsmailBinMujeeb/quar-studio#readme",
37
+ "devDependencies": {
38
+ "@changesets/cli": "^2.29.8"
39
+ }
33
40
  }