package-installer-cli 1.3.3 → 1.4.1
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.
- checksums.yaml +4 -4
- data/dist/commands/email.js +1150 -0
- data/dist/email-templates/bugReport.js +108 -0
- data/dist/email-templates/collectors/bugReport.js +41 -0
- data/dist/email-templates/collectors/common.js +56 -0
- data/dist/email-templates/collectors/customMessage.js +48 -0
- data/dist/email-templates/collectors/docs.js +41 -0
- data/dist/email-templates/collectors/featureRequest.js +47 -0
- data/dist/email-templates/collectors/improvement.js +52 -0
- data/dist/email-templates/collectors/index.js +9 -0
- data/dist/email-templates/collectors/question.js +31 -0
- data/dist/email-templates/collectors/templateRequest.js +53 -0
- data/dist/email-templates/customMessage.js +135 -0
- data/dist/email-templates/docs.js +111 -0
- data/dist/email-templates/featureRequest.js +111 -0
- data/dist/email-templates/generator.js +67 -0
- data/dist/email-templates/improvement.js +121 -0
- data/dist/email-templates/index.js +15 -0
- data/dist/email-templates/question.js +101 -0
- data/dist/email-templates/styles.js +168 -0
- data/dist/email-templates/templateRequest.js +120 -0
- data/dist/email-templates/testEmail.js +56 -0
- data/dist/email-templates/types.js +1 -0
- data/dist/index.js +29 -1
- data/dist/utils/featureInstaller.js +4 -11
- data/features/ai/ai.json +547 -0
- data/features/analytics/analytics.json +4 -0
- data/features/auth/auth.json +473 -0
- data/features/auth/auth0/django/backend/apiexample/urls.py +10 -0
- data/features/auth/auth0/django/backend/apiexample/validator.py +21 -0
- data/features/auth/auth0/django/backend/apiexample/views.py +30 -0
- data/features/auth/auth0/django/backend/requirements.txt +4 -0
- data/features/auth/auth0/django/web-app/requirements.txt +4 -0
- data/features/auth/auth0/django/web-app/webappexample/settings.py +28 -0
- data/features/auth/auth0/django/web-app/webappexample/templates/index.html +16 -0
- data/features/auth/auth0/django/web-app/webappexample/urls.py +10 -0
- data/features/auth/auth0/django/web-app/webappexample/views.py +52 -0
- data/features/auth/auth0/go/backend/go.mod +8 -0
- data/features/auth/auth0/go/backend/main.go +60 -0
- data/features/auth/auth0/go/backend/middleware/jwt.go +81 -0
- data/features/auth/auth0/go/web-app/auth.go +56 -0
- data/features/auth/auth0/go/web-app/callback.go +52 -0
- data/features/auth/auth0/go/web-app/go.mod +11 -0
- data/features/auth/auth0/go/web-app/isAuthenticated.go +20 -0
- data/features/auth/auth0/go/web-app/login.go +47 -0
- data/features/auth/auth0/go/web-app/logout.go +38 -0
- data/features/auth/auth0/go/web-app/main.go +31 -0
- data/features/auth/auth0/go/web-app/router.go +44 -0
- data/features/auth/auth0/go/web-app/user.go +18 -0
- data/features/auth/auth0/ruby-on-rails/backend/Gemfile +1 -0
- data/features/auth/auth0/ruby-on-rails/backend/app/controllers/application_controller.rb +5 -0
- data/features/auth/auth0/ruby-on-rails/backend/app/controllers/concern/secured.rb +60 -0
- data/features/auth/auth0/ruby-on-rails/backend/app/controllers/private_controller.rb +6 -0
- data/features/auth/auth0/ruby-on-rails/backend/app/controllers/public-controller.rb +6 -0
- data/features/auth/auth0/ruby-on-rails/backend/app/lib/auth0_client.rb +59 -0
- data/features/auth/auth0/ruby-on-rails/web-app/Gemfile +2 -0
- data/features/auth/auth0/ruby-on-rails/web-app/auth0_controller.rb +41 -0
- data/features/auth/auth0/ruby-on-rails/web-app/config/auth0.yml +4 -0
- data/features/auth/auth0/ruby-on-rails/web-app/config/initializers/auth0.rb +14 -0
- data/features/auth/auth0/ruby-on-rails/web-app/config/routes.rb +6 -0
- data/features/auth/auth0/ruby-on-rails/web-app/config/secured.rb +11 -0
- data/features/auth/clerk/go/clerk_client.go +28 -0
- data/features/auth/clerk/go/go.mod +5 -0
- data/features/auth/clerk/go/main.go +82 -0
- data/features/auth/clerk/nextjs/typescript/app/layout.tsx +2 -2
- data/features/auth/clerk/ruby-on-rails/Gemfile +1 -0
- data/features/auth/clerk/ruby-on-rails/app.rb +50 -0
- data/features/auth/clerk/ruby-on-rails/config/initializers/clerk.rb +4 -0
- data/features/aws/aws.json +5207 -0
- data/features/database/database.json +246 -0
- data/features/docker/docker.json +108 -0
- data/features/features.json +44 -7321
- data/features/gitignore/gitignore.json +61 -0
- data/features/monitoring/monitoring.json +5 -0
- data/features/payment/payment.json +347 -0
- data/features/storage/storage.json +371 -0
- data/features/testing/jest/angularjs/typescript/tests/angularjs.test.ts +12 -0
- data/features/testing/jest/expressjs/javascript/tests/expressjs.test.js +10 -0
- data/features/testing/jest/expressjs/typescript/tests/expressjs.test.ts +10 -0
- data/features/testing/jest/nestjs/typescript/tests/nestjs.test.ts +10 -0
- data/features/testing/jest/nextjs/javascript/tests/nextjs.test.js +10 -0
- data/features/testing/jest/nextjs/typescript/tests/nextjs.test.ts +10 -0
- data/features/testing/jest/nuxtjs/typescript/tests/nuxtjs.test.ts +9 -0
- data/features/testing/jest/reactjs/javascript/tests/reactjs.test.js +10 -0
- data/features/testing/jest/reactjs/typescript/tests/reactjs.test.ts +10 -0
- data/features/testing/jest/reactjs-expressjs-shadcn/javascript/tests/reactjs.expressjs.shadcn.test.js +16 -0
- data/features/testing/jest/reactjs-expressjs-shadcn/typescript/tests/reactjs.expressjs.shadcn.test.ts +16 -0
- data/features/testing/jest/reactjs-nestjs-shadcn/typescript/tests/reactjs.nestjs.shadcn.test.ts +14 -0
- data/features/testing/jest/remixjs/typescript/tests/remixjs.test.ts +9 -0
- data/features/testing/jest/vuejs/javascript/tests/vuejs.test.ts +9 -0
- data/features/testing/jest/vuejs/typescript/tests/vuejs.test.ts +9 -0
- data/features/testing/testing.json +102 -0
- data/features/ui/ui.json +91 -0
- metadata +90 -8
- data/features/testing/jest/angularjs/tests/angularjs.test.js +0 -12
- data/features/testing/jest/expressjs/tests/javascript/expressjs.test.js +0 -12
- data/features/testing/jest/expressjs/tests/typescript/expressjs.test.ts +0 -12
- data/features/testing/jest/go/tests/go.test.js +0 -12
- data/features/testing/jest/nextjs/tests/javascript/nextjs.test.js +0 -12
- data/features/testing/jest/nextjs/tests/typescript/nextjs.test.ts +0 -12
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { EMAIL_CSS } from './styles.js';
|
|
2
|
+
export function generateDocsTemplate(data, systemInfo) {
|
|
3
|
+
return {
|
|
4
|
+
subject: `[Package Installer CLI] 📚 Documentation Issue: ${data.title}`,
|
|
5
|
+
htmlBody: `
|
|
6
|
+
${EMAIL_CSS}
|
|
7
|
+
<body>
|
|
8
|
+
<div class="email-container">
|
|
9
|
+
<div class="header docs">
|
|
10
|
+
<span class="emoji">📚</span>
|
|
11
|
+
<h1>Documentation Issue</h1>
|
|
12
|
+
<p style="margin: 5px 0 0 0; opacity: 0.9;">Package Installer CLI</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="content">
|
|
16
|
+
<div class="section">
|
|
17
|
+
<h3>Issue Title</h3>
|
|
18
|
+
<p><strong>${data.title}</strong></p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="section">
|
|
22
|
+
<h3>Description</h3>
|
|
23
|
+
<p>${data.description}</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
${data.docSection ? `
|
|
27
|
+
<div class="section">
|
|
28
|
+
<h3>Documentation Section</h3>
|
|
29
|
+
<p>${data.docSection}</p>
|
|
30
|
+
</div>
|
|
31
|
+
` : ''}
|
|
32
|
+
|
|
33
|
+
${data.issue ? `
|
|
34
|
+
<div class="section">
|
|
35
|
+
<h3>Issue Type</h3>
|
|
36
|
+
<p>${data.issue}</p>
|
|
37
|
+
</div>
|
|
38
|
+
` : ''}
|
|
39
|
+
|
|
40
|
+
${data.suggestion ? `
|
|
41
|
+
<div class="section">
|
|
42
|
+
<h3>Suggested Improvement</h3>
|
|
43
|
+
<p>${data.suggestion}</p>
|
|
44
|
+
</div>
|
|
45
|
+
` : ''}
|
|
46
|
+
|
|
47
|
+
${data.additional ? `
|
|
48
|
+
<div class="section">
|
|
49
|
+
<h3>Additional Information</h3>
|
|
50
|
+
<p>${data.additional}</p>
|
|
51
|
+
</div>
|
|
52
|
+
` : ''}
|
|
53
|
+
|
|
54
|
+
<div class="system-info">
|
|
55
|
+
<strong>System Information:</strong><br>
|
|
56
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})<br>
|
|
57
|
+
- Node.js: ${systemInfo.nodeVersion}<br>
|
|
58
|
+
- CLI Version: ${systemInfo.cliVersion}<br>
|
|
59
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
${data.name || data.email ? `
|
|
63
|
+
<div class="contact-info">
|
|
64
|
+
<strong>Contact Information:</strong><br>
|
|
65
|
+
${data.name ? `Name: ${data.name}<br>` : ''}
|
|
66
|
+
${data.email ? `Email: ${data.email}` : ''}
|
|
67
|
+
</div>
|
|
68
|
+
` : ''}
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="footer">
|
|
72
|
+
<div class="timestamp">Reported at: ${systemInfo.timestamp}</div>
|
|
73
|
+
<p style="margin: 10px 0 0 0;">Thank you for helping improve our documentation! 📖</p>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</body>
|
|
77
|
+
`,
|
|
78
|
+
plainBody: `Hi Shariq,
|
|
79
|
+
|
|
80
|
+
I found an issue with Package Installer CLI documentation.
|
|
81
|
+
|
|
82
|
+
Issue Title: ${data.title}
|
|
83
|
+
|
|
84
|
+
Description:
|
|
85
|
+
${data.description}
|
|
86
|
+
|
|
87
|
+
Documentation Section:
|
|
88
|
+
${data.docSection || 'Not specified'}
|
|
89
|
+
|
|
90
|
+
Issue Type:
|
|
91
|
+
${data.issue || 'Not specified'}
|
|
92
|
+
|
|
93
|
+
Suggested Improvement:
|
|
94
|
+
${data.suggestion || 'Not provided'}
|
|
95
|
+
|
|
96
|
+
Additional Information:
|
|
97
|
+
${data.additional || 'None'}
|
|
98
|
+
|
|
99
|
+
System Information:
|
|
100
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})
|
|
101
|
+
- Node.js: ${systemInfo.nodeVersion}
|
|
102
|
+
- CLI Version: ${systemInfo.cliVersion}
|
|
103
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
104
|
+
|
|
105
|
+
Reported at: ${systemInfo.timestamp}
|
|
106
|
+
|
|
107
|
+
Best regards,
|
|
108
|
+
${data.name || 'Anonymous User'}
|
|
109
|
+
${data.email ? `Contact: ${data.email}` : ''}`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { EMAIL_CSS } from './styles.js';
|
|
2
|
+
export function generateFeatureRequestTemplate(data, systemInfo) {
|
|
3
|
+
return {
|
|
4
|
+
subject: `[Package Installer CLI] ✨ Feature Request: ${data.title}`,
|
|
5
|
+
htmlBody: `
|
|
6
|
+
${EMAIL_CSS}
|
|
7
|
+
<body>
|
|
8
|
+
<div class="email-container">
|
|
9
|
+
<div class="header feature">
|
|
10
|
+
<span class="emoji">✨</span>
|
|
11
|
+
<h1>Feature Request</h1>
|
|
12
|
+
<p style="margin: 5px 0 0 0; opacity: 0.9;">Package Installer CLI</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="content">
|
|
16
|
+
<div class="section">
|
|
17
|
+
<h3>Feature Title</h3>
|
|
18
|
+
<p><strong>${data.title}</strong></p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="section">
|
|
22
|
+
<h3>Description</h3>
|
|
23
|
+
<p>${data.description}</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
${data.useCase ? `
|
|
27
|
+
<div class="section">
|
|
28
|
+
<h3>Use Case</h3>
|
|
29
|
+
<p>${data.useCase}</p>
|
|
30
|
+
</div>
|
|
31
|
+
` : ''}
|
|
32
|
+
|
|
33
|
+
${data.benefits ? `
|
|
34
|
+
<div class="section">
|
|
35
|
+
<h3>Benefits</h3>
|
|
36
|
+
<p>${data.benefits}</p>
|
|
37
|
+
</div>
|
|
38
|
+
` : ''}
|
|
39
|
+
|
|
40
|
+
${data.implementation ? `
|
|
41
|
+
<div class="section">
|
|
42
|
+
<h3>Implementation Ideas</h3>
|
|
43
|
+
<p>${data.implementation}</p>
|
|
44
|
+
</div>
|
|
45
|
+
` : ''}
|
|
46
|
+
|
|
47
|
+
${data.additional ? `
|
|
48
|
+
<div class="section">
|
|
49
|
+
<h3>Additional Information</h3>
|
|
50
|
+
<p>${data.additional}</p>
|
|
51
|
+
</div>
|
|
52
|
+
` : ''}
|
|
53
|
+
|
|
54
|
+
<div class="system-info">
|
|
55
|
+
<strong>System Information:</strong><br>
|
|
56
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})<br>
|
|
57
|
+
- Node.js: ${systemInfo.nodeVersion}<br>
|
|
58
|
+
- CLI Version: ${systemInfo.cliVersion}<br>
|
|
59
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
${data.name || data.email ? `
|
|
63
|
+
<div class="contact-info">
|
|
64
|
+
<strong>Contact Information:</strong><br>
|
|
65
|
+
${data.name ? `Name: ${data.name}<br>` : ''}
|
|
66
|
+
${data.email ? `Email: ${data.email}` : ''}
|
|
67
|
+
</div>
|
|
68
|
+
` : ''}
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="footer">
|
|
72
|
+
<div class="timestamp">Submitted at: ${systemInfo.timestamp}</div>
|
|
73
|
+
<p style="margin: 10px 0 0 0;">Thank you for helping improve Package Installer CLI! 🚀</p>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</body>
|
|
77
|
+
`,
|
|
78
|
+
plainBody: `Hi Shariq,
|
|
79
|
+
|
|
80
|
+
I have a feature request for Package Installer CLI.
|
|
81
|
+
|
|
82
|
+
Feature Title: ${data.title}
|
|
83
|
+
|
|
84
|
+
Description:
|
|
85
|
+
${data.description}
|
|
86
|
+
|
|
87
|
+
Use Case:
|
|
88
|
+
${data.useCase || 'Not provided'}
|
|
89
|
+
|
|
90
|
+
Benefits:
|
|
91
|
+
${data.benefits || 'Not provided'}
|
|
92
|
+
|
|
93
|
+
Implementation Ideas:
|
|
94
|
+
${data.implementation || 'Not provided'}
|
|
95
|
+
|
|
96
|
+
Additional Information:
|
|
97
|
+
${data.additional || 'None'}
|
|
98
|
+
|
|
99
|
+
System Information:
|
|
100
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})
|
|
101
|
+
- Node.js: ${systemInfo.nodeVersion}
|
|
102
|
+
- CLI Version: ${systemInfo.cliVersion}
|
|
103
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
104
|
+
|
|
105
|
+
Submitted at: ${systemInfo.timestamp}
|
|
106
|
+
|
|
107
|
+
Best regards,
|
|
108
|
+
${data.name || 'Anonymous User'}
|
|
109
|
+
${data.email ? `Contact: ${data.email}` : ''}`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { generateBugReportTemplate } from './bugReport.js';
|
|
2
|
+
import { generateFeatureRequestTemplate } from './featureRequest.js';
|
|
3
|
+
import { generateTemplateRequestTemplate } from './templateRequest.js';
|
|
4
|
+
import { generateQuestionTemplate } from './question.js';
|
|
5
|
+
import { generateImprovementTemplate } from './improvement.js';
|
|
6
|
+
import { generateDocsTemplate } from './docs.js';
|
|
7
|
+
import { generateCustomMessageTemplate } from './customMessage.js';
|
|
8
|
+
/**
|
|
9
|
+
* Generate HTML email template using modular template functions
|
|
10
|
+
*/
|
|
11
|
+
export function generateEmailTemplate(category, data, systemInfo) {
|
|
12
|
+
// Convert data to TemplateData interface
|
|
13
|
+
const templateData = {
|
|
14
|
+
title: data.title,
|
|
15
|
+
description: data.description,
|
|
16
|
+
// Bug report specific
|
|
17
|
+
steps: data.steps,
|
|
18
|
+
expected: data.expected,
|
|
19
|
+
actual: data.actual,
|
|
20
|
+
// Feature request specific
|
|
21
|
+
useCase: data.useCase,
|
|
22
|
+
solution: data.solution,
|
|
23
|
+
benefits: data.benefits,
|
|
24
|
+
implementation: data.implementation,
|
|
25
|
+
// Template request specific
|
|
26
|
+
framework: data.framework,
|
|
27
|
+
features: data.features,
|
|
28
|
+
similar: data.similar,
|
|
29
|
+
// Question specific
|
|
30
|
+
tried: data.tried,
|
|
31
|
+
context: data.context,
|
|
32
|
+
// Improvement specific
|
|
33
|
+
currentBehavior: data.current,
|
|
34
|
+
proposedBehavior: data.description,
|
|
35
|
+
// Documentation specific
|
|
36
|
+
docSection: data.section,
|
|
37
|
+
issue: data.problems,
|
|
38
|
+
suggestion: data.suggestions,
|
|
39
|
+
// Custom message specific
|
|
40
|
+
format: data.format,
|
|
41
|
+
// Common fields
|
|
42
|
+
priority: data.priority,
|
|
43
|
+
additional: data.additional,
|
|
44
|
+
name: data.name,
|
|
45
|
+
email: data.email
|
|
46
|
+
};
|
|
47
|
+
// Use appropriate template function based on category
|
|
48
|
+
switch (category) {
|
|
49
|
+
case 'bug':
|
|
50
|
+
return generateBugReportTemplate(templateData, systemInfo);
|
|
51
|
+
case 'feature':
|
|
52
|
+
return generateFeatureRequestTemplate(templateData, systemInfo);
|
|
53
|
+
case 'template':
|
|
54
|
+
return generateTemplateRequestTemplate(templateData, systemInfo);
|
|
55
|
+
case 'question':
|
|
56
|
+
return generateQuestionTemplate(templateData, systemInfo);
|
|
57
|
+
case 'improvement':
|
|
58
|
+
return generateImprovementTemplate(templateData, systemInfo);
|
|
59
|
+
case 'docs':
|
|
60
|
+
return generateDocsTemplate(templateData, systemInfo);
|
|
61
|
+
case 'custom':
|
|
62
|
+
return generateCustomMessageTemplate(templateData, systemInfo);
|
|
63
|
+
default:
|
|
64
|
+
// Fallback to question template for unknown categories
|
|
65
|
+
return generateQuestionTemplate(templateData, systemInfo);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { EMAIL_CSS } from './styles.js';
|
|
2
|
+
export function generateImprovementTemplate(data, systemInfo) {
|
|
3
|
+
return {
|
|
4
|
+
subject: `[Package Installer CLI] 🚀 Improvement Suggestion: ${data.title}`,
|
|
5
|
+
htmlBody: `
|
|
6
|
+
${EMAIL_CSS}
|
|
7
|
+
<body>
|
|
8
|
+
<div class="email-container">
|
|
9
|
+
<div class="header improvement">
|
|
10
|
+
<span class="emoji">🚀</span>
|
|
11
|
+
<h1>Improvement Suggestion</h1>
|
|
12
|
+
<p style="margin: 5px 0 0 0; opacity: 0.9;">Package Installer CLI</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="content">
|
|
16
|
+
<div class="section">
|
|
17
|
+
<h3>Improvement Title</h3>
|
|
18
|
+
<p><strong>${data.title}</strong></p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="section">
|
|
22
|
+
<h3>Description</h3>
|
|
23
|
+
<p>${data.description}</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
${data.currentBehavior ? `
|
|
27
|
+
<div class="section">
|
|
28
|
+
<h3>Current Behavior</h3>
|
|
29
|
+
<p>${data.currentBehavior}</p>
|
|
30
|
+
</div>
|
|
31
|
+
` : ''}
|
|
32
|
+
|
|
33
|
+
${data.proposedBehavior ? `
|
|
34
|
+
<div class="section">
|
|
35
|
+
<h3>Proposed Behavior</h3>
|
|
36
|
+
<p>${data.proposedBehavior}</p>
|
|
37
|
+
</div>
|
|
38
|
+
` : ''}
|
|
39
|
+
|
|
40
|
+
${data.benefits ? `
|
|
41
|
+
<div class="section">
|
|
42
|
+
<h3>Benefits</h3>
|
|
43
|
+
<p>${data.benefits}</p>
|
|
44
|
+
</div>
|
|
45
|
+
` : ''}
|
|
46
|
+
|
|
47
|
+
${data.implementation ? `
|
|
48
|
+
<div class="section">
|
|
49
|
+
<h3>Implementation Ideas</h3>
|
|
50
|
+
<p>${data.implementation}</p>
|
|
51
|
+
</div>
|
|
52
|
+
` : ''}
|
|
53
|
+
|
|
54
|
+
${data.additional ? `
|
|
55
|
+
<div class="section">
|
|
56
|
+
<h3>Additional Information</h3>
|
|
57
|
+
<p>${data.additional}</p>
|
|
58
|
+
</div>
|
|
59
|
+
` : ''}
|
|
60
|
+
|
|
61
|
+
<div class="system-info">
|
|
62
|
+
<strong>System Information:</strong><br>
|
|
63
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})<br>
|
|
64
|
+
- Node.js: ${systemInfo.nodeVersion}<br>
|
|
65
|
+
- CLI Version: ${systemInfo.cliVersion}<br>
|
|
66
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
${data.name || data.email ? `
|
|
70
|
+
<div class="contact-info">
|
|
71
|
+
<strong>Contact Information:</strong><br>
|
|
72
|
+
${data.name ? `Name: ${data.name}<br>` : ''}
|
|
73
|
+
${data.email ? `Email: ${data.email}` : ''}
|
|
74
|
+
</div>
|
|
75
|
+
` : ''}
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div class="footer">
|
|
79
|
+
<div class="timestamp">Suggested at: ${systemInfo.timestamp}</div>
|
|
80
|
+
<p style="margin: 10px 0 0 0;">Thank you for helping make Package Installer CLI better! 🌟</p>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</body>
|
|
84
|
+
`,
|
|
85
|
+
plainBody: `Hi Shariq,
|
|
86
|
+
|
|
87
|
+
I have an improvement suggestion for Package Installer CLI.
|
|
88
|
+
|
|
89
|
+
Improvement Title: ${data.title}
|
|
90
|
+
|
|
91
|
+
Description:
|
|
92
|
+
${data.description}
|
|
93
|
+
|
|
94
|
+
Current Behavior:
|
|
95
|
+
${data.currentBehavior || 'Not described'}
|
|
96
|
+
|
|
97
|
+
Proposed Behavior:
|
|
98
|
+
${data.proposedBehavior || 'Not described'}
|
|
99
|
+
|
|
100
|
+
Benefits:
|
|
101
|
+
${data.benefits || 'Not provided'}
|
|
102
|
+
|
|
103
|
+
Implementation Ideas:
|
|
104
|
+
${data.implementation || 'Not provided'}
|
|
105
|
+
|
|
106
|
+
Additional Information:
|
|
107
|
+
${data.additional || 'None'}
|
|
108
|
+
|
|
109
|
+
System Information:
|
|
110
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})
|
|
111
|
+
- Node.js: ${systemInfo.nodeVersion}
|
|
112
|
+
- CLI Version: ${systemInfo.cliVersion}
|
|
113
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
114
|
+
|
|
115
|
+
Suggested at: ${systemInfo.timestamp}
|
|
116
|
+
|
|
117
|
+
Best regards,
|
|
118
|
+
${data.name || 'Anonymous User'}
|
|
119
|
+
${data.email ? `Contact: ${data.email}` : ''}`
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Main exports for email templates
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './styles.js';
|
|
4
|
+
// Template generators
|
|
5
|
+
export { generateBugReportTemplate } from './bugReport.js';
|
|
6
|
+
export { generateFeatureRequestTemplate } from './featureRequest.js';
|
|
7
|
+
export { generateTemplateRequestTemplate } from './templateRequest.js';
|
|
8
|
+
export { generateQuestionTemplate } from './question.js';
|
|
9
|
+
export { generateImprovementTemplate } from './improvement.js';
|
|
10
|
+
export { generateDocsTemplate } from './docs.js';
|
|
11
|
+
export { generateCustomMessageTemplate } from './customMessage.js';
|
|
12
|
+
export { generateTestEmailTemplate } from './testEmail.js';
|
|
13
|
+
export { generateEmailTemplate } from './generator.js';
|
|
14
|
+
// Data collectors
|
|
15
|
+
export * from './collectors/index.js';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { EMAIL_CSS } from './styles.js';
|
|
2
|
+
export function generateQuestionTemplate(data, systemInfo) {
|
|
3
|
+
return {
|
|
4
|
+
subject: `[Package Installer CLI] ❓ Question: ${data.title}`,
|
|
5
|
+
htmlBody: `
|
|
6
|
+
${EMAIL_CSS}
|
|
7
|
+
<body>
|
|
8
|
+
<div class="email-container">
|
|
9
|
+
<div class="header question">
|
|
10
|
+
<span class="emoji">❓</span>
|
|
11
|
+
<h1>Question</h1>
|
|
12
|
+
<p style="margin: 5px 0 0 0; opacity: 0.9;">Package Installer CLI</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="content">
|
|
16
|
+
<div class="section">
|
|
17
|
+
<h3>Question Title</h3>
|
|
18
|
+
<p><strong>${data.title}</strong></p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="section">
|
|
22
|
+
<h3>Question Details</h3>
|
|
23
|
+
<p>${data.description}</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
${data.context ? `
|
|
27
|
+
<div class="section">
|
|
28
|
+
<h3>Context</h3>
|
|
29
|
+
<p>${data.context}</p>
|
|
30
|
+
</div>
|
|
31
|
+
` : ''}
|
|
32
|
+
|
|
33
|
+
${data.tried ? `
|
|
34
|
+
<div class="section">
|
|
35
|
+
<h3>What I've Tried</h3>
|
|
36
|
+
<p>${data.tried}</p>
|
|
37
|
+
</div>
|
|
38
|
+
` : ''}
|
|
39
|
+
|
|
40
|
+
${data.additional ? `
|
|
41
|
+
<div class="section">
|
|
42
|
+
<h3>Additional Information</h3>
|
|
43
|
+
<p>${data.additional}</p>
|
|
44
|
+
</div>
|
|
45
|
+
` : ''}
|
|
46
|
+
|
|
47
|
+
<div class="system-info">
|
|
48
|
+
<strong>System Information:</strong><br>
|
|
49
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})<br>
|
|
50
|
+
- Node.js: ${systemInfo.nodeVersion}<br>
|
|
51
|
+
- CLI Version: ${systemInfo.cliVersion}<br>
|
|
52
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
${data.name || data.email ? `
|
|
56
|
+
<div class="contact-info">
|
|
57
|
+
<strong>Contact Information:</strong><br>
|
|
58
|
+
${data.name ? `Name: ${data.name}<br>` : ''}
|
|
59
|
+
${data.email ? `Email: ${data.email}` : ''}
|
|
60
|
+
</div>
|
|
61
|
+
` : ''}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="footer">
|
|
65
|
+
<div class="timestamp">Asked at: ${systemInfo.timestamp}</div>
|
|
66
|
+
<p style="margin: 10px 0 0 0;">We'll get back to you soon! 💬</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</body>
|
|
70
|
+
`,
|
|
71
|
+
plainBody: `Hi Shariq,
|
|
72
|
+
|
|
73
|
+
I have a question about Package Installer CLI.
|
|
74
|
+
|
|
75
|
+
Question Title: ${data.title}
|
|
76
|
+
|
|
77
|
+
Question Details:
|
|
78
|
+
${data.description}
|
|
79
|
+
|
|
80
|
+
Context:
|
|
81
|
+
${data.context || 'Not provided'}
|
|
82
|
+
|
|
83
|
+
What I've Tried:
|
|
84
|
+
${data.tried || 'Not provided'}
|
|
85
|
+
|
|
86
|
+
Additional Information:
|
|
87
|
+
${data.additional || 'None'}
|
|
88
|
+
|
|
89
|
+
System Information:
|
|
90
|
+
- OS: ${systemInfo.platform} (${systemInfo.arch})
|
|
91
|
+
- Node.js: ${systemInfo.nodeVersion}
|
|
92
|
+
- CLI Version: ${systemInfo.cliVersion}
|
|
93
|
+
- Working Directory: ${systemInfo.workingDirectory}
|
|
94
|
+
|
|
95
|
+
Asked at: ${systemInfo.timestamp}
|
|
96
|
+
|
|
97
|
+
Best regards,
|
|
98
|
+
${data.name || 'Anonymous User'}
|
|
99
|
+
${data.email ? `Contact: ${data.email}` : ''}`
|
|
100
|
+
};
|
|
101
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common CSS styles for all email templates
|
|
3
|
+
*/
|
|
4
|
+
export const EMAIL_CSS = `
|
|
5
|
+
<style>
|
|
6
|
+
body {
|
|
7
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
8
|
+
line-height: 1.6;
|
|
9
|
+
color: #333;
|
|
10
|
+
max-width: 800px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
padding: 20px;
|
|
13
|
+
background-color: #f8f9fa;
|
|
14
|
+
}
|
|
15
|
+
.email-container {
|
|
16
|
+
background: white;
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
.header {
|
|
22
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
23
|
+
color: white;
|
|
24
|
+
padding: 30px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
.header h1 {
|
|
28
|
+
margin: 0;
|
|
29
|
+
font-size: 28px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
}
|
|
32
|
+
.header .emoji {
|
|
33
|
+
font-size: 48px;
|
|
34
|
+
display: block;
|
|
35
|
+
margin-bottom: 10px;
|
|
36
|
+
}
|
|
37
|
+
.content {
|
|
38
|
+
padding: 30px;
|
|
39
|
+
}
|
|
40
|
+
.section {
|
|
41
|
+
margin-bottom: 25px;
|
|
42
|
+
padding: 20px;
|
|
43
|
+
background: #f8f9fa;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
border-left: 4px solid #667eea;
|
|
46
|
+
}
|
|
47
|
+
.section h3 {
|
|
48
|
+
margin: 0 0 15px 0;
|
|
49
|
+
color: #667eea;
|
|
50
|
+
font-size: 18px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
}
|
|
53
|
+
.section p {
|
|
54
|
+
margin: 0;
|
|
55
|
+
white-space: pre-wrap;
|
|
56
|
+
}
|
|
57
|
+
.priority-high {
|
|
58
|
+
border-left-color: #e74c3c;
|
|
59
|
+
}
|
|
60
|
+
.priority-high h3 {
|
|
61
|
+
color: #e74c3c;
|
|
62
|
+
}
|
|
63
|
+
.priority-critical {
|
|
64
|
+
border-left-color: #c0392b;
|
|
65
|
+
background: #fdf2f2;
|
|
66
|
+
}
|
|
67
|
+
.priority-critical h3 {
|
|
68
|
+
color: #c0392b;
|
|
69
|
+
}
|
|
70
|
+
.system-info {
|
|
71
|
+
background: #e8f4f8;
|
|
72
|
+
border: 1px solid #bee5eb;
|
|
73
|
+
border-radius: 8px;
|
|
74
|
+
padding: 15px;
|
|
75
|
+
margin: 20px 0;
|
|
76
|
+
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
color: #495057;
|
|
79
|
+
}
|
|
80
|
+
.steps-list {
|
|
81
|
+
background: white;
|
|
82
|
+
border: 1px solid #dee2e6;
|
|
83
|
+
border-radius: 6px;
|
|
84
|
+
padding: 15px;
|
|
85
|
+
margin: 10px 0;
|
|
86
|
+
}
|
|
87
|
+
.steps-list ol {
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding-left: 20px;
|
|
90
|
+
}
|
|
91
|
+
.steps-list li {
|
|
92
|
+
margin: 8px 0;
|
|
93
|
+
padding: 5px 0;
|
|
94
|
+
}
|
|
95
|
+
.features-list {
|
|
96
|
+
background: white;
|
|
97
|
+
border: 1px solid #dee2e6;
|
|
98
|
+
border-radius: 6px;
|
|
99
|
+
padding: 15px;
|
|
100
|
+
margin: 10px 0;
|
|
101
|
+
}
|
|
102
|
+
.features-list ul {
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding-left: 20px;
|
|
105
|
+
}
|
|
106
|
+
.features-list li {
|
|
107
|
+
margin: 8px 0;
|
|
108
|
+
padding: 5px 0;
|
|
109
|
+
}
|
|
110
|
+
.footer {
|
|
111
|
+
background: #495057;
|
|
112
|
+
color: white;
|
|
113
|
+
padding: 20px 30px;
|
|
114
|
+
text-align: center;
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
}
|
|
117
|
+
.priority-badge {
|
|
118
|
+
display: inline-block;
|
|
119
|
+
padding: 4px 12px;
|
|
120
|
+
border-radius: 20px;
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
text-transform: uppercase;
|
|
124
|
+
margin-left: 10px;
|
|
125
|
+
}
|
|
126
|
+
.priority-low {
|
|
127
|
+
background: #d1ecf1;
|
|
128
|
+
color: #0c5460;
|
|
129
|
+
}
|
|
130
|
+
.priority-medium {
|
|
131
|
+
background: #fff3cd;
|
|
132
|
+
color: #856404;
|
|
133
|
+
}
|
|
134
|
+
.priority-high-badge {
|
|
135
|
+
background: #f8d7da;
|
|
136
|
+
color: #721c24;
|
|
137
|
+
}
|
|
138
|
+
.priority-critical-badge {
|
|
139
|
+
background: #f5c6cb;
|
|
140
|
+
color: #491217;
|
|
141
|
+
}
|
|
142
|
+
.contact-info {
|
|
143
|
+
background: #e8f5e8;
|
|
144
|
+
border: 1px solid #c3e6cb;
|
|
145
|
+
border-radius: 6px;
|
|
146
|
+
padding: 15px;
|
|
147
|
+
margin: 15px 0;
|
|
148
|
+
}
|
|
149
|
+
.timestamp {
|
|
150
|
+
color: #6c757d;
|
|
151
|
+
font-size: 13px;
|
|
152
|
+
font-style: italic;
|
|
153
|
+
}
|
|
154
|
+
.test-success {
|
|
155
|
+
background: #d4edda;
|
|
156
|
+
border: 1px solid #c3e6cb;
|
|
157
|
+
color: #155724;
|
|
158
|
+
padding: 15px;
|
|
159
|
+
border-radius: 8px;
|
|
160
|
+
margin: 20px 0;
|
|
161
|
+
text-align: center;
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
}
|
|
164
|
+
.header.test {
|
|
165
|
+
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
|
|
166
|
+
}
|
|
167
|
+
</style>
|
|
168
|
+
`;
|