milodb 1.0.8 → 2.0.0

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/FIX-2FA.md ADDED
@@ -0,0 +1,47 @@
1
+ # Fix NPM 2FA Error
2
+
3
+ ## Option 1: Enable 2FA (Recommended)
4
+
5
+ 1. Go to https://www.npmjs.com/settings/YOUR_USERNAME/twofa
6
+ 2. Enable two-factor authentication
7
+ 3. Use an authenticator app (Google Authenticator, Authy, etc.)
8
+ 4. Run `npm publish` again and enter the 2FA code when prompted
9
+
10
+ ## Option 2: Use Access Token
11
+
12
+ 1. Go to https://www.npmjs.com/settings/YOUR_USERNAME/tokens
13
+ 2. Click "Generate New Token"
14
+ 3. Select "Automation" (bypasses 2FA for CI/CD)
15
+ 4. Copy the token
16
+ 5. Create `.npmrc` in your home directory:
17
+
18
+ ```bash
19
+ # Windows: C:\Users\YOUR_USERNAME\.npmrc
20
+ # Mac/Linux: ~/.npmrc
21
+
22
+ //registry.npmjs.org/:_authToken=YOUR_TOKEN_HERE
23
+ ```
24
+
25
+ 6. Run `npm publish` again
26
+
27
+ ## Quick Fix (Windows)
28
+
29
+ ```bash
30
+ # Create token at: https://www.npmjs.com/settings/tokens
31
+ # Then run:
32
+ echo //registry.npmjs.org/:_authToken=YOUR_TOKEN > %USERPROFILE%\.npmrc
33
+ npm publish
34
+ ```
35
+
36
+ ## Verify After Publishing
37
+
38
+ ```bash
39
+ npm view milodb
40
+ ```
41
+
42
+ Your package will be live at:
43
+ https://www.npmjs.com/package/milodb
44
+
45
+ ---
46
+
47
+ **Recommended: Use Option 1 (2FA) for better security** 🔒
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 MiloDB
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/PUBLISHING.md ADDED
@@ -0,0 +1,84 @@
1
+ # Publishing to NPM
2
+
3
+ ## Before Publishing
4
+
5
+ 1. **Update package.json**
6
+ - Set your author name
7
+ - Add your GitHub repository URL
8
+ - Update version number
9
+
10
+ 2. **Build the project**
11
+ ```bash
12
+ npm install
13
+ npm run build
14
+ ```
15
+
16
+ 3. **Test locally**
17
+ ```bash
18
+ npm link
19
+ cd /path/to/test-project
20
+ npm link milodb
21
+ ```
22
+
23
+ ## Publish
24
+
25
+ 1. **Login to npm**
26
+ ```bash
27
+ npm login
28
+ ```
29
+
30
+ 2. **Publish**
31
+ ```bash
32
+ npm publish
33
+ ```
34
+
35
+ ## Update Version
36
+
37
+ ```bash
38
+ # Patch (1.0.0 -> 1.0.1)
39
+ npm version patch
40
+
41
+ # Minor (1.0.0 -> 1.1.0)
42
+ npm version minor
43
+
44
+ # Major (1.0.0 -> 2.0.0)
45
+ npm version major
46
+
47
+ # Then publish
48
+ npm publish
49
+ ```
50
+
51
+ ## Files Included in Package
52
+
53
+ - `dist/` - Compiled JavaScript and type definitions
54
+ - `README.md` - Documentation
55
+ - `LICENSE` - MIT license
56
+ - `package.json` - Package metadata
57
+
58
+ Files excluded (see `.npmignore`):
59
+ - `src/` - TypeScript source
60
+ - `dashboard/` - Dashboard app
61
+ - `node_modules/`
62
+ - Development files
63
+
64
+ ## Verify Package
65
+
66
+ Before publishing, check what will be included:
67
+
68
+ ```bash
69
+ npm pack --dry-run
70
+ ```
71
+
72
+ ## Post-Publish
73
+
74
+ 1. Test installation:
75
+ ```bash
76
+ npm install milodb
77
+ ```
78
+
79
+ 2. Check npm page:
80
+ ```
81
+ https://www.npmjs.com/package/milodb
82
+ ```
83
+
84
+ 3. Update GitHub releases with changelog