@paytmsupport/paytm-jarvis 1.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/.npmrc.example +4 -0
- package/ENABLE_2FA_PAYTM.md +59 -0
- package/NPM_PRIVATE_PUBLISH.md +149 -0
- package/NPM_PRO_REQUIRED.md +51 -0
- package/NPM_PUBLISH_GUIDE.md +138 -0
- package/PRIVATE_PUBLISH_GUIDE.md +112 -0
- package/PUBLISH_NOW.md +53 -0
- package/PUBLISH_PAYTM.md +48 -0
- package/QUICK_START_NPM_PRIVATE.md +54 -0
- package/QUICK_START_PRIVATE.md +72 -0
- package/dist/commands/compress.d.ts +3 -0
- package/dist/commands/compress.js +97 -0
- package/dist/commands/config-cmd.d.ts +1 -0
- package/dist/commands/config-cmd.js +84 -0
- package/dist/commands/diff.d.ts +1 -0
- package/dist/commands/diff.js +97 -0
- package/dist/commands/handoff.d.ts +1 -0
- package/dist/commands/handoff.js +151 -0
- package/dist/commands/hook.d.ts +1 -0
- package/dist/commands/hook.js +60 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +49 -0
- package/dist/commands/log.d.ts +4 -0
- package/dist/commands/log.js +53 -0
- package/dist/commands/resume.d.ts +4 -0
- package/dist/commands/resume.js +44 -0
- package/dist/commands/save.d.ts +13 -0
- package/dist/commands/save.js +160 -0
- package/dist/commands/share.d.ts +3 -0
- package/dist/commands/share.js +58 -0
- package/dist/commands/suggest.d.ts +1 -0
- package/dist/commands/suggest.js +67 -0
- package/dist/commands/summarize.d.ts +1 -0
- package/dist/commands/summarize.js +122 -0
- package/dist/commands/watch.d.ts +3 -0
- package/dist/commands/watch.js +99 -0
- package/dist/core/ai.d.ts +17 -0
- package/dist/core/ai.js +55 -0
- package/dist/core/context.d.ts +16 -0
- package/dist/core/context.js +88 -0
- package/dist/core/git.d.ts +7 -0
- package/dist/core/git.js +73 -0
- package/dist/core/parser.d.ts +14 -0
- package/dist/core/parser.js +539 -0
- package/dist/core/parser.test.d.ts +1 -0
- package/dist/core/prompt.d.ts +2 -0
- package/dist/core/prompt.js +75 -0
- package/dist/core/types.d.ts +24 -0
- package/dist/core/types.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +91 -0
- package/dist/mcp-server.d.ts +20 -0
- package/dist/mcp-server.js +153 -0
- package/dist/utils/clipboard.d.ts +5 -0
- package/dist/utils/clipboard.js +23 -0
- package/dist/utils/config.d.ts +30 -0
- package/dist/utils/config.js +48 -0
- package/package.json +54 -0
package/.npmrc.example
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Enable 2FA for paytmsupport Account
|
|
2
|
+
|
|
3
|
+
## Error
|
|
4
|
+
```
|
|
5
|
+
403 Forbidden - Two-factor authentication or granular access token with bypass 2fa enabled is required to publish packages.
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Solution: Enable 2FA on paytmsupport Account
|
|
9
|
+
|
|
10
|
+
### Step 1: Enable 2FA
|
|
11
|
+
|
|
12
|
+
1. Go to: https://www.npmjs.com/settings/paytmsupport/two-factor-auth
|
|
13
|
+
2. Click **"Enable 2FA"**
|
|
14
|
+
3. Scan QR code with authenticator app:
|
|
15
|
+
- Google Authenticator
|
|
16
|
+
- Authy
|
|
17
|
+
- Microsoft Authenticator
|
|
18
|
+
- Any TOTP app
|
|
19
|
+
4. Enter the 6-digit code to verify
|
|
20
|
+
5. **Save backup codes** (very important!)
|
|
21
|
+
|
|
22
|
+
### Step 2: Login Again with 2FA
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm login
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Enter:
|
|
29
|
+
- Username: `paytmsupport`
|
|
30
|
+
- Password: (your password)
|
|
31
|
+
- Email: (your email)
|
|
32
|
+
- **OTP**: (6-digit code from authenticator app)
|
|
33
|
+
|
|
34
|
+
### Step 3: Publish
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm publish
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or if you have the OTP code:
|
|
41
|
+
```bash
|
|
42
|
+
npm publish --otp=YOUR_6_DIGIT_CODE
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Alternative: Granular Access Token (If you don't want 2FA)
|
|
46
|
+
|
|
47
|
+
1. Go to: https://www.npmjs.com/settings/paytmsupport/tokens
|
|
48
|
+
2. Create **Granular Access Token**
|
|
49
|
+
3. Enable **"Bypass 2FA"** option
|
|
50
|
+
4. Use token to login:
|
|
51
|
+
```bash
|
|
52
|
+
npm login --auth-type=legacy
|
|
53
|
+
# Username: paytmsupport
|
|
54
|
+
# Password: (paste the token)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
**After enabling 2FA, login again and publish!**
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# npm Private Package Publishing Guide
|
|
2
|
+
|
|
3
|
+
## ⚠️ Important: npm Private Packages Require Payment
|
|
4
|
+
|
|
5
|
+
npm private packages require a **paid npm account**:
|
|
6
|
+
- **npm Pro**: $7/month (for user-scoped private packages)
|
|
7
|
+
- **npm Team**: $7/user/month (for organization-scoped packages)
|
|
8
|
+
|
|
9
|
+
**Free Alternative**: Consider GitHub Packages (see `PRIVATE_PUBLISH_GUIDE.md`)
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
1. ✅ **npm account** with Pro subscription
|
|
14
|
+
2. ✅ **Scoped package name** (already set: `@naitiksharma23/jarvis`)
|
|
15
|
+
3. ✅ **2FA enabled** OR granular access token with bypass 2FA
|
|
16
|
+
|
|
17
|
+
## Step-by-Step Instructions
|
|
18
|
+
|
|
19
|
+
### 1. Sign up for npm Pro
|
|
20
|
+
|
|
21
|
+
1. Go to: https://www.npmjs.com/products/pro
|
|
22
|
+
2. Click **"Get Started"** or **"Upgrade to Pro"**
|
|
23
|
+
3. Choose **npm Pro** ($7/month)
|
|
24
|
+
4. Complete payment
|
|
25
|
+
|
|
26
|
+
### 2. Enable 2FA (Recommended)
|
|
27
|
+
|
|
28
|
+
1. Go to: https://www.npmjs.com/settings/YOUR_USERNAME/two-factor-auth
|
|
29
|
+
2. Enable Two-Factor Authentication
|
|
30
|
+
3. Save backup codes securely
|
|
31
|
+
|
|
32
|
+
**Alternative**: Use granular access token with bypass 2FA enabled
|
|
33
|
+
|
|
34
|
+
### 3. Login to npm
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm login
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Enter:
|
|
41
|
+
- Username
|
|
42
|
+
- Password
|
|
43
|
+
- Email
|
|
44
|
+
- OTP (if 2FA enabled)
|
|
45
|
+
|
|
46
|
+
### 4. Verify Package Configuration
|
|
47
|
+
|
|
48
|
+
Your `package.json` should have:
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"name": "@naitiksharma23/jarvis",
|
|
52
|
+
"version": "1.0.0"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
✅ **Scoped packages are private by default** - no `publishConfig` needed!
|
|
57
|
+
|
|
58
|
+
### 5. Build the Package
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
cd jarvis
|
|
62
|
+
npm run build
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 6. Publish Privately
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm publish
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Note**: Scoped packages (`@username/package`) are automatically published as **private** - no flags needed!
|
|
72
|
+
|
|
73
|
+
### 7. Verify Publication
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm view @naitiksharma23/jarvis
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
You should see your package details. It will show as **private**.
|
|
80
|
+
|
|
81
|
+
### 8. Test Installation
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install -g @naitiksharma23/jarvis
|
|
85
|
+
jarvis --version
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Sharing with Your Friend
|
|
89
|
+
|
|
90
|
+
### Option 1: Add as Collaborator (Recommended)
|
|
91
|
+
|
|
92
|
+
1. Go to: https://www.npmjs.com/package/@naitiksharma23/jarvis/settings
|
|
93
|
+
2. Click **"Add Collaborator"**
|
|
94
|
+
3. Enter their npm username
|
|
95
|
+
4. They can now install: `npm install -g @naitiksharma23/jarvis`
|
|
96
|
+
|
|
97
|
+
### Option 2: Organization (For Teams)
|
|
98
|
+
|
|
99
|
+
1. Create npm organization: https://www.npmjs.com/org/create
|
|
100
|
+
2. Add team members
|
|
101
|
+
3. Transfer package to organization
|
|
102
|
+
4. Team members can install
|
|
103
|
+
|
|
104
|
+
## Important Notes
|
|
105
|
+
|
|
106
|
+
✅ **Scoped = Private**: Packages starting with `@username/` are private by default
|
|
107
|
+
|
|
108
|
+
✅ **No publishConfig needed**: npm automatically publishes scoped packages as private
|
|
109
|
+
|
|
110
|
+
✅ **Authentication**: Users need npm account + access to install private packages
|
|
111
|
+
|
|
112
|
+
✅ **VS Code Extension**: Already bundles jarvis, so works without npm install!
|
|
113
|
+
|
|
114
|
+
## Updating the Package
|
|
115
|
+
|
|
116
|
+
When you make changes:
|
|
117
|
+
|
|
118
|
+
1. Update version in `package.json`:
|
|
119
|
+
```json
|
|
120
|
+
"version": "1.0.1" // patch
|
|
121
|
+
"version": "1.1.0" // minor
|
|
122
|
+
"version": "2.0.0" // major
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
2. Rebuild:
|
|
126
|
+
```bash
|
|
127
|
+
npm run build
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
3. Publish:
|
|
131
|
+
```bash
|
|
132
|
+
npm publish
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Troubleshooting
|
|
136
|
+
|
|
137
|
+
- **"You do not have permission"**: Make sure you have npm Pro subscription
|
|
138
|
+
- **"Package name already exists"**: Scoped name should be unique to your account
|
|
139
|
+
- **"2FA required"**: Enable 2FA or use granular token with bypass 2FA
|
|
140
|
+
- **"Cannot install"**: Friend needs to be added as collaborator
|
|
141
|
+
|
|
142
|
+
## Cost Comparison
|
|
143
|
+
|
|
144
|
+
| Option | Cost | Setup |
|
|
145
|
+
|--------|------|-------|
|
|
146
|
+
| **npm Private** | $7/month | Paid subscription |
|
|
147
|
+
| **GitHub Packages** | FREE | Token setup |
|
|
148
|
+
|
|
149
|
+
**Recommendation**: If cost is a concern, use GitHub Packages (see `PRIVATE_PUBLISH_GUIDE.md`)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# npm Pro Subscription Required
|
|
2
|
+
|
|
3
|
+
## Error
|
|
4
|
+
```
|
|
5
|
+
402 Payment Required - You must sign up for private packages
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Issue
|
|
9
|
+
Scoped packages (`@paytmsupport/paytm-jarvis`) are **private by default** and require **npm Pro** subscription ($7/month).
|
|
10
|
+
|
|
11
|
+
## Solution Options
|
|
12
|
+
|
|
13
|
+
### Option 1: Subscribe to npm Pro (Keep Private) ✅
|
|
14
|
+
|
|
15
|
+
1. Go to: https://www.npmjs.com/products/pro
|
|
16
|
+
2. Sign up for **npm Pro** ($7/month)
|
|
17
|
+
3. Complete payment
|
|
18
|
+
4. Then publish:
|
|
19
|
+
```bash
|
|
20
|
+
npm publish
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Option 2: Publish as Public Package (Free) ✅
|
|
24
|
+
|
|
25
|
+
If you don't need it private, publish as **public**:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm publish --access public
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This will make `@paytmsupport/paytm-jarvis` **publicly available** (free).
|
|
32
|
+
|
|
33
|
+
### Option 3: Use Unscoped Name (Public, Free)
|
|
34
|
+
|
|
35
|
+
Change package name to unscoped (public by default):
|
|
36
|
+
|
|
37
|
+
1. Update `package.json`:
|
|
38
|
+
```json
|
|
39
|
+
"name": "paytm-jarvis"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
2. Publish:
|
|
43
|
+
```bash
|
|
44
|
+
npm publish
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
**Which option do you prefer?**
|
|
50
|
+
- Private: Subscribe to npm Pro ($7/month)
|
|
51
|
+
- Public: Use `npm publish --access public`
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# How to Publish Jarvis CLI to npm
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
1. **npm account**: Create one at https://www.npmjs.com/signup if you don't have one
|
|
6
|
+
2. **Package name availability**: The name "jarvis" might already be taken. Check at https://www.npmjs.com/package/jarvis
|
|
7
|
+
|
|
8
|
+
## Step-by-Step Instructions
|
|
9
|
+
|
|
10
|
+
### 1. Login to npm
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
cd jarvis
|
|
14
|
+
npm login
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
You'll be prompted for:
|
|
18
|
+
- Username
|
|
19
|
+
- Password
|
|
20
|
+
- Email
|
|
21
|
+
- OTP (if 2FA is enabled)
|
|
22
|
+
|
|
23
|
+
**Alternative**: If you prefer command line:
|
|
24
|
+
```bash
|
|
25
|
+
npm adduser
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Check if package name is available
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm view jarvis
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If it shows package info, the name is taken. You'll need to:
|
|
35
|
+
- Use a scoped package: `@yourusername/jarvis`
|
|
36
|
+
- Or choose a different name like `jarvis-cli`, `jarvis-context`, etc.
|
|
37
|
+
|
|
38
|
+
**To use scoped package**, update `package.json`:
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"name": "@yourusername/jarvis",
|
|
42
|
+
...
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 3. Verify package contents (already done)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm pack --dry-run
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This shows what will be published. ✅ Already verified - looks good!
|
|
53
|
+
|
|
54
|
+
### 4. Build the project (already done)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm run build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
✅ Already built - `dist/` folder is ready!
|
|
61
|
+
|
|
62
|
+
### 5. Publish to npm
|
|
63
|
+
|
|
64
|
+
**For public package:**
|
|
65
|
+
```bash
|
|
66
|
+
npm publish
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**For scoped package (if name is taken):**
|
|
70
|
+
```bash
|
|
71
|
+
npm publish --access public
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 6. Verify publication
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm view jarvis
|
|
78
|
+
# or
|
|
79
|
+
npm view @yourusername/jarvis # if using scoped name
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 7. Test installation
|
|
83
|
+
|
|
84
|
+
In a different directory:
|
|
85
|
+
```bash
|
|
86
|
+
npm install -g jarvis
|
|
87
|
+
# or
|
|
88
|
+
npm install -g @yourusername/jarvis
|
|
89
|
+
jarvis --version
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Important Notes
|
|
93
|
+
|
|
94
|
+
⚠️ **Package Name**: If "jarvis" is already taken, you have two options:
|
|
95
|
+
|
|
96
|
+
1. **Use scoped package** (recommended):
|
|
97
|
+
- Change `"name": "jarvis"` to `"name": "@naitiksharma/jarvis"` in `package.json`
|
|
98
|
+
- Users install with: `npm install -g @naitiksharma/jarvis`
|
|
99
|
+
- Users run with: `jarvis` (if bin name stays the same)
|
|
100
|
+
|
|
101
|
+
2. **Use different name**:
|
|
102
|
+
- Change to something like `jarvis-cli`, `jarvis-context`, etc.
|
|
103
|
+
- Update `package.json` name field
|
|
104
|
+
|
|
105
|
+
## After Publishing
|
|
106
|
+
|
|
107
|
+
Once published, your VS Code extension can use:
|
|
108
|
+
- `npx -y jarvis` (if name is "jarvis")
|
|
109
|
+
- `npx -y @yourusername/jarvis` (if scoped)
|
|
110
|
+
|
|
111
|
+
This will work for your friend without global installation! 🎉
|
|
112
|
+
|
|
113
|
+
## Updating the Package
|
|
114
|
+
|
|
115
|
+
When you make changes:
|
|
116
|
+
|
|
117
|
+
1. Update version in `package.json`:
|
|
118
|
+
```json
|
|
119
|
+
"version": "1.0.1" // patch version
|
|
120
|
+
"version": "1.1.0" // minor version
|
|
121
|
+
"version": "2.0.0" // major version
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
2. Rebuild:
|
|
125
|
+
```bash
|
|
126
|
+
npm run build
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
3. Publish:
|
|
130
|
+
```bash
|
|
131
|
+
npm publish
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Troubleshooting
|
|
135
|
+
|
|
136
|
+
- **"You do not have permission"**: Make sure you're logged in and the package name isn't taken
|
|
137
|
+
- **"Package name already exists"**: Use scoped package or different name
|
|
138
|
+
- **"Invalid package name"**: Package names must be lowercase, no spaces, can have hyphens
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Private Package Publishing Guide - GitHub Packages
|
|
2
|
+
|
|
3
|
+
## Why GitHub Packages?
|
|
4
|
+
- ✅ **FREE** for private packages (npm charges $7/month)
|
|
5
|
+
- ✅ Works seamlessly with npm
|
|
6
|
+
- ✅ Private by default
|
|
7
|
+
- ✅ 500MB storage + 1GB bandwidth/month included
|
|
8
|
+
|
|
9
|
+
## Step 1: Get Your GitHub Username
|
|
10
|
+
|
|
11
|
+
First, check your GitHub username. You'll need it for the scoped package name.
|
|
12
|
+
|
|
13
|
+
## Step 2: Update package.json
|
|
14
|
+
|
|
15
|
+
The package name must be scoped to your GitHub username/organization:
|
|
16
|
+
- Format: `@yourusername/jarvis`
|
|
17
|
+
- Example: `@naitiksharma/jarvis`
|
|
18
|
+
|
|
19
|
+
## Step 3: Create GitHub Personal Access Token
|
|
20
|
+
|
|
21
|
+
1. Go to: https://github.com/settings/tokens
|
|
22
|
+
2. Click **"Generate new token"** → **"Generate new token (classic)"**
|
|
23
|
+
3. Give it a name: `npm-publish-jarvis`
|
|
24
|
+
4. Select scopes:
|
|
25
|
+
- ✅ `read:packages` (required)
|
|
26
|
+
- ✅ `write:packages` (required for publishing)
|
|
27
|
+
- ✅ `delete:packages` (optional, for deleting packages)
|
|
28
|
+
5. Click **"Generate token"**
|
|
29
|
+
6. **COPY THE TOKEN** - you won't see it again!
|
|
30
|
+
|
|
31
|
+
## Step 4: Configure npm for GitHub Packages
|
|
32
|
+
|
|
33
|
+
Create/update `.npmrc` file in your home directory:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# On macOS/Linux:
|
|
37
|
+
echo "//npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE" >> ~/.npmrc
|
|
38
|
+
|
|
39
|
+
# Or manually edit ~/.npmrc and add:
|
|
40
|
+
# //npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Replace `YOUR_TOKEN_HERE` with your actual token!**
|
|
44
|
+
|
|
45
|
+
## Step 5: Update package.json
|
|
46
|
+
|
|
47
|
+
Add `publishConfig` to your `package.json`:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"name": "@yourusername/jarvis",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"registry": "https://npm.pkg.github.com/"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Step 6: Build and Publish
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
cd jarvis
|
|
62
|
+
npm run build
|
|
63
|
+
npm publish
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Step 7: Install the Private Package
|
|
67
|
+
|
|
68
|
+
### For You:
|
|
69
|
+
```bash
|
|
70
|
+
npm install -g @yourusername/jarvis
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### For Your Friend:
|
|
74
|
+
|
|
75
|
+
They need to:
|
|
76
|
+
|
|
77
|
+
1. **Create `.npmrc` file** in their home directory:
|
|
78
|
+
```bash
|
|
79
|
+
echo "//npm.pkg.github.com/:_authToken=THEIR_TOKEN" >> ~/.npmrc
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. **Get access to your package:**
|
|
83
|
+
- Option A: Add them as collaborator to your GitHub repo
|
|
84
|
+
- Option B: They create their own token with `read:packages` scope
|
|
85
|
+
|
|
86
|
+
3. **Install:**
|
|
87
|
+
```bash
|
|
88
|
+
npm install -g @yourusername/jarvis
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Important Notes
|
|
92
|
+
|
|
93
|
+
⚠️ **Package Name**: Must be scoped (e.g., `@naitiksharma/jarvis`)
|
|
94
|
+
|
|
95
|
+
⚠️ **Authentication Required**: Both publishing AND installing require authentication
|
|
96
|
+
|
|
97
|
+
⚠️ **Private by Default**: Packages from private repos are automatically private
|
|
98
|
+
|
|
99
|
+
⚠️ **VS Code Extension**: Your extension already bundles jarvis, so it works without npm install. But if you want the `npx` fallback to work, users need `.npmrc` configured.
|
|
100
|
+
|
|
101
|
+
## Troubleshooting
|
|
102
|
+
|
|
103
|
+
- **"401 Unauthorized"**: Check your token in `~/.npmrc`
|
|
104
|
+
- **"404 Not Found"**: Make sure package name matches your GitHub username
|
|
105
|
+
- **"403 Forbidden"**: Token doesn't have correct scopes
|
|
106
|
+
|
|
107
|
+
## Alternative: npm Private (Paid)
|
|
108
|
+
|
|
109
|
+
If you prefer npm's registry:
|
|
110
|
+
1. Sign up for npm Pro ($7/month): https://www.npmjs.com/products/pro
|
|
111
|
+
2. Use scoped package: `@yourusername/jarvis`
|
|
112
|
+
3. Publish: `npm publish --access restricted`
|
package/PUBLISH_NOW.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Publish Steps - Do This Now
|
|
2
|
+
|
|
3
|
+
## Error: 2FA Required + Token Expired
|
|
4
|
+
|
|
5
|
+
npm requires **Two-Factor Authentication** to publish packages.
|
|
6
|
+
|
|
7
|
+
## Quick Fix:
|
|
8
|
+
|
|
9
|
+
### Step 1: Enable 2FA on npm
|
|
10
|
+
|
|
11
|
+
1. Go to: https://www.npmjs.com/settings/naitiksharma23/two-factor-auth
|
|
12
|
+
2. Click **"Enable 2FA"**
|
|
13
|
+
3. Scan QR code with authenticator app (Google Authenticator, Authy, etc.)
|
|
14
|
+
4. Enter the 6-digit code to verify
|
|
15
|
+
5. **Save backup codes** (important!)
|
|
16
|
+
|
|
17
|
+
### Step 2: Login Again
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
cd jarvis
|
|
21
|
+
npm login
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Enter:
|
|
25
|
+
- Username: `naitiksharma23`
|
|
26
|
+
- Password: (your password)
|
|
27
|
+
- Email: (your email)
|
|
28
|
+
- OTP: (6-digit code from authenticator app)
|
|
29
|
+
|
|
30
|
+
### Step 3: Publish
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm publish
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Alternative: Granular Access Token (If you don't want 2FA)
|
|
37
|
+
|
|
38
|
+
1. Go to: https://www.npmjs.com/settings/naitiksharma23/tokens
|
|
39
|
+
2. Create **Granular Access Token**
|
|
40
|
+
3. Enable **"Bypass 2FA"** option
|
|
41
|
+
4. Use token to login:
|
|
42
|
+
```bash
|
|
43
|
+
npm login --auth-type=legacy
|
|
44
|
+
# Enter username and token as password
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
**After enabling 2FA, run:**
|
|
50
|
+
```bash
|
|
51
|
+
npm login
|
|
52
|
+
npm publish
|
|
53
|
+
```
|
package/PUBLISH_PAYTM.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Publish @paytmsupport/paytm-jarvis
|
|
2
|
+
|
|
3
|
+
## Package Updated ✅
|
|
4
|
+
- Package name: `@paytmsupport/paytm-jarvis@1.0.0`
|
|
5
|
+
- Scoped package = **PRIVATE by default**
|
|
6
|
+
- Build: Complete ✅
|
|
7
|
+
|
|
8
|
+
## Steps to Publish
|
|
9
|
+
|
|
10
|
+
### 1. Login with paytmsupport account
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
cd jarvis
|
|
14
|
+
npm login
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Enter:
|
|
18
|
+
- Username: `paytmsupport`
|
|
19
|
+
- Password: (your password)
|
|
20
|
+
- Email: (your email)
|
|
21
|
+
- OTP: (6-digit code from authenticator if 2FA enabled)
|
|
22
|
+
|
|
23
|
+
### 2. Publish
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm publish
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Note**: Scoped packages (`@paytmsupport/paytm-jarvis`) are automatically **PRIVATE** - no flags needed!
|
|
30
|
+
|
|
31
|
+
### 3. Verify
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm view @paytmsupport/paytm-jarvis
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Sharing with Friend
|
|
38
|
+
|
|
39
|
+
1. Go to: https://www.npmjs.com/package/@paytmsupport/paytm-jarvis/settings
|
|
40
|
+
2. Click **"Add Collaborator"**
|
|
41
|
+
3. Enter their npm username
|
|
42
|
+
4. They install: `npm install -g @paytmsupport/paytm-jarvis`
|
|
43
|
+
|
|
44
|
+
## Important
|
|
45
|
+
|
|
46
|
+
⚠️ **npm Pro Required**: Private packages need npm Pro ($7/month) subscription
|
|
47
|
+
|
|
48
|
+
✅ **Scoped = Private**: `@paytmsupport/paytm-jarvis` will be private automatically
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Quick Start: npm Private Publishing
|
|
2
|
+
|
|
3
|
+
## ⚠️ Requires npm Pro ($7/month)
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
### 1. Get npm Pro Subscription
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Visit: https://www.npmjs.com/products/pro
|
|
11
|
+
# Sign up for npm Pro ($7/month)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### 2. Enable 2FA
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Visit: https://www.npmjs.com/settings/YOUR_USERNAME/two-factor-auth
|
|
18
|
+
# Enable Two-Factor Authentication
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 3. Login
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm login
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 4. Build & Publish
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd jarvis
|
|
31
|
+
npm run build
|
|
32
|
+
npm publish
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**That's it!** Scoped packages (`@naitiksharma/jarvis`) are automatically **private**.
|
|
36
|
+
|
|
37
|
+
### 5. Add Your Friend
|
|
38
|
+
|
|
39
|
+
1. Go to: https://www.npmjs.com/package/@naitiksharma23/jarvis/settings
|
|
40
|
+
2. Click **"Add Collaborator"**
|
|
41
|
+
3. Enter their npm username
|
|
42
|
+
4. They install: `npm install -g @naitiksharma23/jarvis`
|
|
43
|
+
|
|
44
|
+
## Verify
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm view @naitiksharma23/jarvis
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Should show your private package! 🔒
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
**Full guide**: See `NPM_PRIVATE_PUBLISH.md`
|