Skip to content

Commit 73414eb

Browse files
committed
Fix: Resolve package issues
1 parent a6c2343 commit 73414eb

File tree

2 files changed

+24
-33
lines changed

2 files changed

+24
-33
lines changed

.vscodeignore

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,28 @@
1-
# Source files
2-
src/**
3-
tsconfig.json
4-
.gitignore
5-
6-
# Development files
1+
# Safe exclusions (these shouldn't cause issues)
72
.vscode/**
83
.vscode-test/**
9-
node_modules/**
4+
test/**
5+
.gitignore
106
internal/**
11-
12-
# Test files
13-
**/test/**
14-
**/*.test.ts
15-
**/*.test.js
16-
17-
# Build artifacts
18-
out/test/**
19-
out/**/*.map
20-
21-
# Documentation and meta files
227
.github/**
8+
*.vsix
239
vsc-extension-quickstart.md
2410
CONTRIBUTING.md
25-
26-
# Logs and temporary files
2711
*.log
2812
npm-debug.log*
2913
*.tmp
3014
*.temp
31-
32-
# OS files
3315
.DS_Store
3416
Thumbs.db
3517

36-
# Package files
37-
*.vsix
18+
# Exclude most of node_modules but keep runtime dependencies
19+
node_modules/**
20+
!node_modules/cloudinary/**
21+
!node_modules/lodash/**
22+
!node_modules/q/**
23+
24+
# Now we can safely add other exclusions:
25+
src/**/*.ts
26+
**/*.map
27+
tsconfig.json
28+
jsconfig.json

src/utils/userAgent.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ import * as path from 'path';
88
* @returns Transformed editor name
99
*/
1010
function transformAppNameToEditorName(appName: string): string {
11-
if (!appName) {return 'VSCode';}
11+
if (!appName) { return 'VSCode'; }
1212

1313
// Convert to lowercase for easier matching
1414
const lowerAppName = appName.toLowerCase();
1515

1616
// Handle special cases and transformations
17-
if (lowerAppName.includes('cursor')) {return 'Cursor';}
18-
if (lowerAppName.includes('visual studio code')) {return 'VSCode';}
19-
if (lowerAppName.includes('windsurf')) {return 'Windsurf';}
20-
if (lowerAppName.includes('insiders')) {return 'VSCodeInsiders';}
21-
if (lowerAppName.includes('code - oss')) {return 'VSCodeOSS';}
17+
if (lowerAppName.includes('cursor')) { return 'Cursor'; }
18+
if (lowerAppName.includes('visual studio code')) { return 'VSCode'; }
19+
if (lowerAppName.includes('windsurf')) { return 'Windsurf'; }
20+
if (lowerAppName.includes('insiders')) { return 'VSCodeInsiders'; }
21+
if (lowerAppName.includes('code - oss')) { return 'VSCodeOSS'; }
2222

2323
// Generic transformation: remove special characters, split on whitespace, and camelCase
2424
const cleanName = appName.replace(/[^\w\s]/g, '').trim();
2525
const words = cleanName.split(/\s+/);
2626

27-
if (words.length === 0) {return 'VSCode';}
28-
if (words.length === 1) {return words[0];}
27+
if (words.length === 0) { return 'VSCode'; }
28+
if (words.length === 1) { return words[0]; }
2929

3030
// First word lowercase, subsequent words capitalized
3131
return words[0].toLowerCase() + words.slice(1).map(word =>
@@ -55,7 +55,7 @@ function detectEditor(): { name: string; version: string } {
5555
export function generateUserAgent(): string {
5656
try {
5757
const extensionManifest = vscode.extensions.getExtension('Cloudinary.cloudinary');
58-
const extensionVersion = extensionManifest?.packageJSON?.version || '0.0.7';
58+
const extensionVersion = extensionManifest?.packageJSON?.version || '0.1.0';
5959

6060
const editor = detectEditor();
6161

0 commit comments

Comments
 (0)