@lazykedar/lazydocs 1.3.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.
@@ -0,0 +1,7 @@
1
+ # Funding options for LazyDocs
2
+
3
+ github: [kedar49]
4
+ # patreon: your_patreon_username
5
+ # open_collective: your_open_collective
6
+ # ko_fi: your_ko_fi_username
7
+ # custom: ['https://your-website.com/donate']
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Create a report to help us improve
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Bug Description
10
+ A clear and concise description of what the bug is.
11
+
12
+ ## To Reproduce
13
+ Steps to reproduce the behavior:
14
+ 1. Run command '...'
15
+ 2. With options '...'
16
+ 3. See error
17
+
18
+ ## Expected Behavior
19
+ A clear and concise description of what you expected to happen.
20
+
21
+ ## Actual Behavior
22
+ What actually happened.
23
+
24
+ ## Error Output
25
+ ```
26
+ Paste any error messages here
27
+ ```
28
+
29
+ ## Environment
30
+ - OS: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
31
+ - Node.js version: [e.g., 18.0.0]
32
+ - LazyDocs version: [e.g., 1.0.0]
33
+ - Installation method: [npm, Homebrew]
34
+
35
+ ## Additional Context
36
+ Add any other context about the problem here.
37
+
38
+ ## Screenshots
39
+ If applicable, add screenshots to help explain your problem.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an idea for this project
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Feature Description
10
+ A clear and concise description of the feature you'd like to see.
11
+
12
+ ## Problem Statement
13
+ Is your feature request related to a problem? Please describe.
14
+ Example: I'm always frustrated when [...]
15
+
16
+ ## Proposed Solution
17
+ Describe the solution you'd like to see implemented.
18
+
19
+ ## Alternatives Considered
20
+ Describe any alternative solutions or features you've considered.
21
+
22
+ ## Use Case
23
+ Describe how this feature would be used and who would benefit from it.
24
+
25
+ ## Example Usage
26
+ If applicable, provide example commands or code showing how this feature would work:
27
+
28
+ ```bash
29
+ lazydocs generate --new-feature ...
30
+ ```
31
+
32
+ ## Additional Context
33
+ Add any other context, screenshots, or examples about the feature request here.
34
+
35
+ ## Would you like to implement this feature?
36
+ - [ ] Yes, I'd like to work on this
37
+ - [ ] No, but I'd be happy to test it
38
+ - [ ] I just want to suggest it
@@ -0,0 +1,57 @@
1
+ ## Description
2
+ <!-- Provide a brief description of the changes in this PR -->
3
+
4
+ ## Type of Change
5
+ <!-- Mark the relevant option with an "x" -->
6
+
7
+ - [ ] ๐Ÿ› Bug fix (non-breaking change which fixes an issue)
8
+ - [ ] โœจ New feature (non-breaking change which adds functionality)
9
+ - [ ] ๐Ÿ’ฅ Breaking change (fix or feature that would cause existing functionality to not work as expected)
10
+ - [ ] ๐Ÿ“š Documentation update
11
+ - [ ] ๐Ÿ”ง Maintenance (dependency updates, refactoring, etc.)
12
+ - [ ] ๐Ÿงช Test improvements
13
+
14
+ ## Related Issues
15
+ <!-- Link to related issues using #issue_number -->
16
+
17
+ Fixes #
18
+ Relates to #
19
+
20
+ ## Changes Made
21
+ <!-- List the main changes made in this PR -->
22
+
23
+ -
24
+ -
25
+ -
26
+
27
+ ## Testing
28
+ <!-- Describe the tests you ran and how to reproduce them -->
29
+
30
+ - [ ] All existing tests pass
31
+ - [ ] New tests added for new functionality
32
+ - [ ] Manual testing performed
33
+
34
+ ### Test Commands
35
+ ```bash
36
+ npm test
37
+ npm run build
38
+ ```
39
+
40
+ ## Checklist
41
+ <!-- Mark completed items with an "x" -->
42
+
43
+ - [ ] My code follows the project's code style
44
+ - [ ] I have performed a self-review of my code
45
+ - [ ] I have commented my code, particularly in hard-to-understand areas
46
+ - [ ] I have made corresponding changes to the documentation
47
+ - [ ] My changes generate no new warnings or errors
48
+ - [ ] I have added tests that prove my fix is effective or that my feature works
49
+ - [ ] New and existing unit tests pass locally with my changes
50
+ - [ ] Any dependent changes have been merged and published
51
+ - [ ] I have updated the CHANGELOG.md
52
+
53
+ ## Screenshots (if applicable)
54
+ <!-- Add screenshots to help explain your changes -->
55
+
56
+ ## Additional Notes
57
+ <!-- Add any additional notes or context about the PR here -->
@@ -0,0 +1,50 @@
1
+ version: 2
2
+ updates:
3
+ # Enable version updates for npm
4
+ - package-ecosystem: "npm"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "09:00"
10
+ open-pull-requests-limit: 10
11
+ reviewers:
12
+ - "kedar49"
13
+ assignees:
14
+ - "kedar49"
15
+ commit-message:
16
+ prefix: "chore"
17
+ prefix-development: "chore"
18
+ include: "scope"
19
+ labels:
20
+ - "dependencies"
21
+ - "automated"
22
+ ignore:
23
+ # Ignore major version updates for stable dependencies
24
+ - dependency-name: "*"
25
+ update-types: ["version-update:semver-major"]
26
+ groups:
27
+ development-dependencies:
28
+ dependency-type: "development"
29
+ patterns:
30
+ - "@types/*"
31
+ - "typescript"
32
+ - "jest"
33
+ - "ts-jest"
34
+ production-dependencies:
35
+ dependency-type: "production"
36
+ update-types:
37
+ - "minor"
38
+ - "patch"
39
+
40
+ # Enable version updates for GitHub Actions
41
+ - package-ecosystem: "github-actions"
42
+ directory: "/"
43
+ schedule:
44
+ interval: "weekly"
45
+ day: "monday"
46
+ commit-message:
47
+ prefix: "ci"
48
+ labels:
49
+ - "github-actions"
50
+ - "automated"
@@ -0,0 +1,67 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main, develop]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test on Node.js ${{ matrix.node-version }}
12
+ runs-on: ${{ matrix.os }}
13
+
14
+ strategy:
15
+ matrix:
16
+ os: [ubuntu-latest, windows-latest, macos-latest]
17
+ node-version: [18.x, 20.x, 21.x]
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Setup Node.js ${{ matrix.node-version }}
24
+ uses: actions/setup-node@v4
25
+ with:
26
+ node-version: ${{ matrix.node-version }}
27
+ cache: 'npm'
28
+
29
+ - name: Install dependencies
30
+ run: npm ci
31
+
32
+ - name: Run tests
33
+ run: npm test
34
+
35
+ - name: Build project
36
+ run: npm run build
37
+
38
+ - name: Upload coverage
39
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
40
+ uses: codecov/codecov-action@v3
41
+ with:
42
+ files: ./coverage/lcov.info
43
+ flags: unittests
44
+ name: codecov-umbrella
45
+
46
+ lint:
47
+ name: Lint and Type Check
48
+ runs-on: ubuntu-latest
49
+
50
+ steps:
51
+ - name: Checkout code
52
+ uses: actions/checkout@v4
53
+
54
+ - name: Setup Node.js
55
+ uses: actions/setup-node@v4
56
+ with:
57
+ node-version: '20.x'
58
+ cache: 'npm'
59
+
60
+ - name: Install dependencies
61
+ run: npm ci
62
+
63
+ - name: Type check
64
+ run: npx tsc --noEmit
65
+
66
+ - name: Check formatting
67
+ run: npx prettier --check "src/**/*.ts" || true
@@ -0,0 +1,38 @@
1
+ name: CodeQL Security Analysis
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: '0 0 * * 1' # Run every Monday at midnight
10
+
11
+ jobs:
12
+ analyze:
13
+ name: Analyze Code
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ actions: read
17
+ contents: read
18
+ security-events: write
19
+
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ language: ['javascript']
24
+
25
+ steps:
26
+ - name: Checkout code
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Initialize CodeQL
30
+ uses: github/codeql-action/init@v2
31
+ with:
32
+ languages: ${{ matrix.language }}
33
+
34
+ - name: Autobuild
35
+ uses: github/codeql-action/autobuild@v2
36
+
37
+ - name: Perform CodeQL Analysis
38
+ uses: github/codeql-action/analyze@v2
@@ -0,0 +1,24 @@
1
+ name: Dependency Review
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: read
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ dependency-review:
13
+ name: Review Dependencies
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Dependency Review
21
+ uses: actions/dependency-review-action@v3
22
+ with:
23
+ fail-on-severity: moderate
24
+ comment-summary-in-pr: true
@@ -0,0 +1,65 @@
1
+ name: Update Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - 'src/**'
8
+ - 'package.json'
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ update-docs:
13
+ name: Auto-generate Documentation
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+ with:
20
+ token: ${{ secrets.GITHUB_TOKEN }}
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: '20.x'
26
+ cache: 'npm'
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Build project
32
+ run: npm run build
33
+
34
+ - name: Generate README (using LazyDocs itself!)
35
+ run: |
36
+ export GROQ_API_KEY=${{ secrets.GROQ_API_KEY }}
37
+ node dist/cli.js generate --type readme --input ./src --output ./README_NEW.md || true
38
+ continue-on-error: true
39
+
40
+ - name: Check if README changed
41
+ id: check_changes
42
+ run: |
43
+ if [ -f README_NEW.md ]; then
44
+ if ! diff -q README.md README_NEW.md > /dev/null 2>&1; then
45
+ echo "changed=true" >> $GITHUB_OUTPUT
46
+ else
47
+ echo "changed=false" >> $GITHUB_OUTPUT
48
+ fi
49
+ else
50
+ echo "changed=false" >> $GITHUB_OUTPUT
51
+ fi
52
+
53
+ - name: Create Pull Request
54
+ if: steps.check_changes.outputs.changed == 'true'
55
+ uses: peter-evans/create-pull-request@v5
56
+ with:
57
+ token: ${{ secrets.GITHUB_TOKEN }}
58
+ commit-message: 'docs: auto-update README with LazyDocs'
59
+ title: '๐Ÿ“š Auto-update Documentation'
60
+ body: |
61
+ This PR was automatically generated by LazyDocs to update the documentation.
62
+
63
+ Please review the changes before merging.
64
+ branch: docs/auto-update
65
+ delete-branch: true
@@ -0,0 +1,60 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+ workflow_dispatch:
7
+ inputs:
8
+ version:
9
+ description: 'Version to publish (e.g., 1.0.0)'
10
+ required: true
11
+ type: string
12
+
13
+ jobs:
14
+ publish:
15
+ name: Publish to NPM
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: '20.x'
26
+ registry-url: 'https://registry.npmjs.org'
27
+ cache: 'npm'
28
+
29
+ - name: Install dependencies
30
+ run: npm ci
31
+
32
+ - name: Run tests
33
+ run: npm test
34
+
35
+ - name: Build project
36
+ run: npm run build
37
+
38
+ - name: Update version (if manual trigger)
39
+ if: github.event_name == 'workflow_dispatch'
40
+ run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
41
+
42
+ - name: Publish to NPM
43
+ run: npm publish --access public
44
+ env:
45
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46
+
47
+ - name: Create GitHub Release (if manual trigger)
48
+ if: github.event_name == 'workflow_dispatch'
49
+ uses: actions/create-release@v1
50
+ env:
51
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52
+ with:
53
+ tag_name: v${{ github.event.inputs.version }}
54
+ release_name: Release v${{ github.event.inputs.version }}
55
+ body: |
56
+ Release version ${{ github.event.inputs.version }}
57
+
58
+ See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
59
+ draft: false
60
+ prerelease: false
@@ -0,0 +1,102 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ permissions:
9
+ contents: write
10
+ packages: write
11
+
12
+ jobs:
13
+ create-release:
14
+ name: Create Release
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v4
25
+ with:
26
+ node-version: '20.x'
27
+ cache: 'npm'
28
+
29
+ - name: Install dependencies
30
+ run: npm ci
31
+
32
+ - name: Run tests
33
+ run: npm test
34
+
35
+ - name: Build project
36
+ run: npm run build
37
+
38
+ - name: Get version from tag
39
+ id: get_version
40
+ run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
41
+
42
+ - name: Generate changelog for this release
43
+ id: changelog
44
+ run: |
45
+ VERSION=${{ steps.get_version.outputs.VERSION }}
46
+ if [ -f CHANGELOG.md ]; then
47
+ CHANGELOG=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' || echo "See CHANGELOG.md for details")
48
+ else
49
+ CHANGELOG="See repository for details"
50
+ fi
51
+ echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
52
+ echo "$CHANGELOG" >> $GITHUB_OUTPUT
53
+ echo "EOF" >> $GITHUB_OUTPUT
54
+
55
+ - name: Package for distribution
56
+ run: |
57
+ mkdir -p dist-package
58
+ cp -r dist package.json README.md LICENSE dist-package/
59
+ if [ -f CHANGELOG.md ]; then
60
+ cp CHANGELOG.md dist-package/
61
+ fi
62
+ cd dist-package
63
+ tar -czf ../lazydocs-${{ steps.get_version.outputs.VERSION }}.tar.gz .
64
+
65
+ - name: Create GitHub Release
66
+ uses: softprops/action-gh-release@v1
67
+ with:
68
+ name: LazyDocs v${{ steps.get_version.outputs.VERSION }}
69
+ body: |
70
+ # LazyDocs v${{ steps.get_version.outputs.VERSION }}
71
+
72
+ ## What's New
73
+
74
+ ${{ steps.changelog.outputs.CHANGELOG }}
75
+
76
+ ## Installation
77
+
78
+ ```bash
79
+ npm install -g @tfkedar/lazydocs@${{ steps.get_version.outputs.VERSION }}
80
+ ```
81
+
82
+ ## Quick Start
83
+
84
+ ```bash
85
+ # Configure
86
+ lazydocs config set GROQ_API_KEY=your_key
87
+
88
+ # Generate
89
+ lazydocs generate --interactive
90
+ ```
91
+
92
+ ## Links
93
+
94
+ - [NPM Package](https://www.npmjs.com/package/@tfkedar/lazydocs)
95
+ - [Documentation](https://github.com/${{ github.repository }}#readme)
96
+ - [Changelog](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md)
97
+ draft: false
98
+ prerelease: false
99
+ files: |
100
+ lazydocs-${{ steps.get_version.outputs.VERSION }}.tar.gz
101
+ env:
102
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,137 @@
1
+ # Changelog
2
+
3
+ All notable changes to LazyDocs will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.2.1] - 2025-01-07
9
+
10
+ ### Fixed
11
+ - Template files (.hbs) now included in npm package
12
+ - Added copy-templates script to build process
13
+ - Updated .npmignore to ensure dist/t/ folder is included
14
+
15
+ ### Technical
16
+ - Build script now copies Handlebars templates to dist folder
17
+ - Fixes "ENOENT: no such file or directory" error when generating README
18
+
19
+ ## [1.2.0] - 2025-01-07
20
+
21
+ ### Changed
22
+ - Removed all emojis from console output for better terminal compatibility
23
+ - Cleaned up code comments and removed external references
24
+ - Updated README to minimal, focused version
25
+ - Improved package description
26
+ - Updated web landing page with modern design
27
+
28
+ ### Removed
29
+ - Dead code and unused files
30
+ - Empty test folders
31
+ - Implementation documentation files
32
+ - Emoji from postinstall message
33
+
34
+ ### Fixed
35
+ - GitHub Actions release workflow permissions
36
+ - Updated to use softprops/action-gh-release@v1
37
+
38
+ ### Technical
39
+ - All TypeScript files compile without errors
40
+ - Optimized code organization
41
+ - Better error messages
42
+ - Improved code maintainability
43
+
44
+ ## [1.1.0] - 2025-01-06
45
+
46
+ ### Added
47
+ - Token-efficient code analysis (handles 100+ file projects)
48
+ - Automatic retry logic with exponential backoff (3 attempts)
49
+ - Structured prompt engineering for better output
50
+ - Compact summaries for large codebases
51
+ - Enhanced error messages with actionable solutions
52
+ - File statistics tracking
53
+ - Smart code truncation
54
+
55
+ ### Changed
56
+ - Improved AI integration with better error handling
57
+ - Enhanced prompt structure for consistent output
58
+ - Better token management
59
+
60
+ ## [1.0.3] - 2025-01-05
61
+
62
+ ### Added
63
+ - Professional landing page (web/)
64
+ - Modern, responsive design with dark theme
65
+ - Interactive features and animations
66
+
67
+ ### Changed
68
+ - Improved config system
69
+ - Better validation with helpful error messages
70
+ - API key format validation (must start with gsk_)
71
+ - Config value masking for security
72
+
73
+ ### Added
74
+ - New config delete command
75
+ - Support for more config options (TIMEOUT, GENERATE_COUNT)
76
+
77
+ ## [1.0.2] - 2025-01-04
78
+
79
+ ### Added
80
+ - Dynamic model fetching from Groq API
81
+ - lazydocs models --refresh to get latest models
82
+ - Interactive mode now shows all available models
83
+
84
+ ### Changed
85
+ - Updated default model to llama-3.3-70b-versatile
86
+ - Added support for OpenAI models (gpt-oss-120b, gpt-oss-20b)
87
+ - All models support 131K+ context windows
88
+ - Automatic fallback if API fetch fails
89
+
90
+ ### Improved
91
+ - Simplified README (professional yet casual)
92
+ - Better model descriptions
93
+ - Cleaner package structure
94
+
95
+ ## [1.0.1] - 2025-01-03
96
+
97
+ ### Changed
98
+ - Reduced package size from 27.4 KB to 15.8 KB (42% smaller)
99
+ - Optimized .npmignore to exclude non-essential files
100
+ - Improved .gitignore for better development experience
101
+
102
+ ### Improved
103
+ - Simplified README for better readability
104
+ - Created concise QUICK_START guide
105
+ - Better file organization
106
+
107
+ ## [1.0.0] - 2025-01-02
108
+
109
+ ### Added
110
+ - Initial release of LazyDocs
111
+ - AI-powered documentation generation using Groq API
112
+ - Support for README, PR descriptions, and changelog generation
113
+ - Multi-file type support (.js, .ts, .jsx, .tsx, .mjs, .cjs, .py)
114
+ - Interactive CLI mode
115
+ - Multiple AI model selection
116
+ - Configurable AI parameters (temperature, max tokens)
117
+ - Recursive directory scanning
118
+ - Smart code analysis with Babel parser
119
+ - Handlebars templating system
120
+ - Configuration management (~/.lazydocs)
121
+ - Project initialization command
122
+ - Comprehensive error handling with retry logic
123
+
124
+ ### Documentation
125
+ - Complete README with examples
126
+ - API documentation
127
+ - Contributing guidelines
128
+ - Installation instructions
129
+
130
+ ### Testing
131
+ - Unit tests for code analyzer
132
+ - Unit tests for AI integration
133
+ - Test fixtures and utilities
134
+
135
+ ---
136
+
137
+ *Generated by LazyDocs*