vanguard-cli 3.1.3 → 3.1.6
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/RECOVERY_GUIDE.md +36 -0
- package/lib/commands/config.js +8 -5
- package/lib/services/scanner.js +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Enterprise Publication Recovery Guide 🛡️🔑🏗️
|
|
2
|
+
|
|
3
|
+
If you see an `ENEEDAUTH` or `Access token expired` error when publishing to NPM (like the one you saw on the homeserver), follow these steps to restore your automated shipping pipeline.
|
|
4
|
+
|
|
5
|
+
## 1. Refresh Your Session 🔄
|
|
6
|
+
Your CLI session for NPM has likely expired. Run this in your terminal to log back in:
|
|
7
|
+
```bash
|
|
8
|
+
npm login
|
|
9
|
+
```
|
|
10
|
+
*Note: This will likely open a browser windows or ask for your 2FA Passkey signature.*
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 2. Using a Permanent Token (Recommended) 🔑
|
|
15
|
+
To avoid Passkey/Browser prompts on your remote servers, use a **Granular Access Token**:
|
|
16
|
+
|
|
17
|
+
1. **Generate Token**: Go to [NPM Tokens](https://www.npmjs.com/settings/tokens/granular-access-tokens/new).
|
|
18
|
+
2. **Permissions**: Select "Read and write" for the specific package.
|
|
19
|
+
3. **Bypass 2FA**: **CHECK THIS BOX** in the NPM settings for the token.
|
|
20
|
+
4. **Set Environment**: On your server, add this to your `.bashrc` or `.env`:
|
|
21
|
+
```bash
|
|
22
|
+
export NPM_TOKEN="your_token_here"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 3. Finishing the Vanguard V3.1.5 Release 🚀
|
|
28
|
+
I have already versioned and pushed the codes to GitHub. To finish the live NPM update, simply run:
|
|
29
|
+
```bash
|
|
30
|
+
npm run ship
|
|
31
|
+
```
|
|
32
|
+
- Select **"Patch"**.
|
|
33
|
+
- When asked about 2FA, select **"No"** (after you've logged in or set the token).
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
🛡️ **Vanguard is perfectly synchronized and ready for the world.**
|
package/lib/commands/config.js
CHANGED
|
@@ -6,7 +6,8 @@ import { showBanner } from '../utils/ui.js';
|
|
|
6
6
|
|
|
7
7
|
export async function runConfigWizard() {
|
|
8
8
|
showBanner();
|
|
9
|
-
console.log('🛰️ Vanguard Configuration Wizard
|
|
9
|
+
console.log('🛰️ Vanguard Configuration Wizard');
|
|
10
|
+
console.log(chalk.dim(`📂 Config Path: ${config.path}\n`));
|
|
10
11
|
|
|
11
12
|
const { providerSelection } = await inquirer.prompt([
|
|
12
13
|
{
|
|
@@ -27,12 +28,14 @@ export async function runConfigWizard() {
|
|
|
27
28
|
{
|
|
28
29
|
type: 'password',
|
|
29
30
|
name: 'apiKey',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
validate: (val) => {
|
|
32
|
+
if (val.length === 0) return 'Key is required';
|
|
33
|
+
if (val.startsWith('sk-')) return '⚠️ That looks like an OpenAI key. Gemini keys usually start with "AIza"';
|
|
34
|
+
return true;
|
|
35
|
+
},
|
|
33
36
|
},
|
|
34
37
|
]);
|
|
35
|
-
config.set('GEMINI_KEY', apiKey);
|
|
38
|
+
config.set('GEMINI_KEY', apiKey.trim());
|
|
36
39
|
console.log('✅ Gemini configured and saved.');
|
|
37
40
|
} else {
|
|
38
41
|
const spinner = createSpinner('🔍 Detecting local Ollama models...').start();
|
package/lib/services/scanner.js
CHANGED
|
@@ -113,9 +113,9 @@ RESPONSE FORMAT (JSON ONLY):
|
|
|
113
113
|
const apiKey = config.get('GEMINI_KEY');
|
|
114
114
|
if (!apiKey) throw new Error('Gemini API Key missing. Run "vanguard config"');
|
|
115
115
|
|
|
116
|
-
const genAI = new GoogleGenerativeAI(apiKey);
|
|
117
|
-
// Use the
|
|
118
|
-
const model = genAI.getGenerativeModel({ model: 'gemini-
|
|
116
|
+
const genAI = new GoogleGenerativeAI(apiKey.trim());
|
|
117
|
+
// Use the latest stable pro flash model for the best performance/quota ratio
|
|
118
|
+
const model = genAI.getGenerativeModel({ model: 'gemini-2.0-flash' });
|
|
119
119
|
const instruction = await this.getSystemInstruction();
|
|
120
120
|
|
|
121
121
|
const result = await model.generateContent({
|