@trishchuk/coolors-mcp 1.0.0 → 1.1.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.
Files changed (140) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +20 -8
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -8
  3. package/.github/pull_request_template.md +33 -8
  4. package/.github/workflows/ci.yml +107 -104
  5. package/.github/workflows/deploy-docs.yml +14 -11
  6. package/.github/workflows/release.yml +25 -23
  7. package/README.md +149 -15
  8. package/dist/bin/server.js +997 -256
  9. package/dist/bin/server.js.map +1 -1
  10. package/dist/{chunk-P3ARRKLS.js → chunk-HOMDMKUY.js} +3 -1
  11. package/dist/{chunk-P3ARRKLS.js.map → chunk-HOMDMKUY.js.map} +1 -1
  12. package/dist/{chunk-IQ7NN26V.js → chunk-LHW2ZTOU.js} +14 -2
  13. package/dist/chunk-LHW2ZTOU.js.map +1 -0
  14. package/dist/color/index.js +1 -1
  15. package/dist/coolors-mcp.d.ts +4 -4
  16. package/dist/coolors-mcp.js +1 -1
  17. package/docs/.vitepress/components/ClientGrid.vue +9 -3
  18. package/docs/.vitepress/components/CodeBlock.vue +51 -44
  19. package/docs/.vitepress/components/ConfigModal.vue +151 -67
  20. package/docs/.vitepress/components/DiagramModal.vue +186 -154
  21. package/docs/.vitepress/components/TroubleshootingModal.vue +101 -96
  22. package/docs/.vitepress/config.js +171 -141
  23. package/docs/.vitepress/theme/FundingLayout.vue +65 -54
  24. package/docs/.vitepress/theme/Layout.vue +21 -21
  25. package/docs/.vitepress/theme/components/AdBanner.vue +73 -52
  26. package/docs/.vitepress/theme/components/AdPlaceholder.vue +3 -3
  27. package/docs/.vitepress/theme/components/FundingEffects.vue +77 -53
  28. package/docs/.vitepress/theme/components/FundingHero.vue +78 -63
  29. package/docs/.vitepress/theme/components/SupportSection.vue +106 -89
  30. package/docs/.vitepress/theme/custom-app.css +19 -12
  31. package/docs/.vitepress/theme/custom.css +33 -25
  32. package/docs/.vitepress/theme/index.js +19 -16
  33. package/docs/concepts/accessibility.md +59 -47
  34. package/docs/concepts/color-spaces.md +28 -6
  35. package/docs/concepts/distance-metrics.md +45 -30
  36. package/docs/concepts/hct.md +30 -27
  37. package/docs/concepts/image-analysis.md +52 -21
  38. package/docs/concepts/material-design.md +43 -17
  39. package/docs/concepts/theme-matching.md +64 -40
  40. package/docs/examples/basic-colors.md +92 -108
  41. package/docs/examples/creating-themes.md +104 -108
  42. package/docs/examples/css-refactoring.md +33 -29
  43. package/docs/examples/image-extraction.md +145 -138
  44. package/docs/getting-started.md +45 -34
  45. package/docs/index.md +5 -1
  46. package/docs/installation.md +15 -1
  47. package/docs/tools/accessibility.md +74 -68
  48. package/docs/tools/image-extraction.md +62 -54
  49. package/docs/tools/theme-matching.md +45 -42
  50. package/eslint.config.ts +13 -0
  51. package/jsr.json +1 -1
  52. package/package.json +17 -13
  53. package/src/bin/server.ts +13 -1
  54. package/src/color/__tests__/extract-colors.test.ts +20 -30
  55. package/src/color/apca.ts +105 -0
  56. package/src/color/color-blindness.ts +109 -0
  57. package/src/coolors-mcp.ts +1 -1
  58. package/src/session.ts +10 -2
  59. package/src/theme/matcher.ts +1 -1
  60. package/src/theme/refactor.ts +1 -1
  61. package/src/theme/types.ts +3 -0
  62. package/src/tools/__tests__/cohesion.test.ts +97 -0
  63. package/src/tools/__tests__/color-blindness.test.ts +45 -0
  64. package/src/tools/__tests__/color-conversion.test.ts +38 -0
  65. package/src/tools/__tests__/contrast-checker.test.ts +56 -0
  66. package/src/tools/__tests__/palette-export.test.ts +54 -0
  67. package/src/tools/adjust-color.tool.ts +80 -0
  68. package/src/tools/cohesion.tools.ts +380 -0
  69. package/src/tools/color-blindness.tool.ts +168 -0
  70. package/src/tools/color-conversion.tool.ts +1 -1
  71. package/src/tools/contrast-checker.tool.ts +53 -14
  72. package/src/tools/dislike-analyzer.tool.ts +41 -54
  73. package/src/tools/image-extraction.tools.ts +62 -115
  74. package/src/tools/index.ts +15 -2
  75. package/src/tools/palette-export.tool.ts +174 -0
  76. package/src/tools/palette-with-locks.tool.ts +8 -6
  77. package/src/types.ts +2 -3
  78. package/tsconfig.json +12 -2
  79. package/vitest.config.js +1 -3
  80. package/.claude/settings.local.json +0 -39
  81. package/.env +0 -2
  82. package/.mcp.json +0 -12
  83. package/CLAUDE.md +0 -201
  84. package/DOCUMENTATION.md +0 -274
  85. package/GEMINI.md +0 -54
  86. package/demo/content_based_color.png +0 -0
  87. package/demo/music-player.html +0 -621
  88. package/demo/podcast-player.html +0 -903
  89. package/dist/chunk-IQ7NN26V.js.map +0 -1
  90. package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js +0 -93
  91. package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js.map +0 -7
  92. package/docs/.vitepress/cache/deps/_metadata.json +0 -127
  93. package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js +0 -9
  94. package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js.map +0 -7
  95. package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js +0 -12683
  96. package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js.map +0 -7
  97. package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js +0 -9719
  98. package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js.map +0 -7
  99. package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js +0 -4710
  100. package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js.map +0 -7
  101. package/docs/.vitepress/cache/deps/cytoscape.js +0 -30278
  102. package/docs/.vitepress/cache/deps/cytoscape.js.map +0 -7
  103. package/docs/.vitepress/cache/deps/dayjs.js +0 -285
  104. package/docs/.vitepress/cache/deps/dayjs.js.map +0 -7
  105. package/docs/.vitepress/cache/deps/debug.js +0 -468
  106. package/docs/.vitepress/cache/deps/debug.js.map +0 -7
  107. package/docs/.vitepress/cache/deps/package.json +0 -3
  108. package/docs/.vitepress/cache/deps/prismjs.js +0 -1466
  109. package/docs/.vitepress/cache/deps/prismjs.js.map +0 -7
  110. package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js +0 -228
  111. package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js.map +0 -7
  112. package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js +0 -142
  113. package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js.map +0 -7
  114. package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js +0 -27
  115. package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js.map +0 -7
  116. package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js +0 -65
  117. package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js.map +0 -7
  118. package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js +0 -53
  119. package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js.map +0 -7
  120. package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js +0 -73
  121. package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js.map +0 -7
  122. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4507
  123. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
  124. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -584
  125. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
  126. package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +0 -1146
  127. package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map +0 -7
  128. package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +0 -1667
  129. package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map +0 -7
  130. package/docs/.vitepress/cache/deps/vitepress___minisearch.js +0 -1814
  131. package/docs/.vitepress/cache/deps/vitepress___minisearch.js.map +0 -7
  132. package/docs/.vitepress/cache/deps/vue.js +0 -344
  133. package/docs/.vitepress/cache/deps/vue.js.map +0 -7
  134. package/examples/theme-matching.md +0 -113
  135. package/mcp-config.json +0 -8
  136. package/note.md +0 -35
  137. package/research_results.md +0 -53
  138. package/src/tools/colors.ts +0 -31
  139. package/src/tools/registry.ts +0 -142
  140. package/src/tools/simple-tools.ts +0 -37
@@ -1,44 +1,52 @@
1
1
  ---
2
2
  name: Bug report
3
3
  about: Report a bug in Coolors MCP
4
- title: '[BUG] '
4
+ title: "[BUG] "
5
5
  labels: bug
6
- assignees: ''
6
+ assignees: ""
7
7
  ---
8
8
 
9
9
  ## Bug Description
10
+
10
11
  <!-- A clear and concise description of what the bug is -->
11
12
 
12
13
  ## Environment
13
- - **Node.js version**:
14
- - **npm version**:
15
- - **Operating System**:
16
- - **MCP Client**:
14
+
15
+ - **Node.js version**:
16
+ - **npm version**:
17
+ - **Operating System**:
18
+ - **MCP Client**:
17
19
  - [ ] Claude Desktop
18
20
  - [ ] Claude Code
19
21
  - [ ] Other (please specify):
20
22
  - **MCP SDK version**:
21
- - **Coolors MCP version**:
23
+ - **Coolors MCP version**:
22
24
 
23
25
  ## To Reproduce
26
+
24
27
  Steps to reproduce the behavior:
28
+
25
29
  1. Install/configure '...'
26
30
  2. Run command '...'
27
31
  3. Use tool '...'
28
32
  4. See error
29
33
 
30
34
  ## Expected Behavior
35
+
31
36
  <!-- What you expected to happen -->
32
37
 
33
38
  ## Actual Behavior
39
+
34
40
  <!-- What actually happened -->
35
41
 
36
42
  ## Error Messages / Logs
43
+
37
44
  ```
38
45
  <!-- Paste any error messages or relevant logs here -->
39
46
  ```
40
47
 
41
48
  ## MCP Tool Used
49
+
42
50
  - [ ] convert_color
43
51
  - [ ] color_distance
44
52
  - [ ] check_contrast
@@ -49,6 +57,7 @@ Steps to reproduce the behavior:
49
57
  - [ ] extract_image_colors
50
58
 
51
59
  ## Command/Prompt Used
60
+
52
61
  ```javascript
53
62
  // Example of the exact command or prompt that caused the issue
54
63
  {
@@ -61,13 +70,16 @@ Steps to reproduce the behavior:
61
70
  ```
62
71
 
63
72
  ## Additional Context
73
+
64
74
  <!-- Add any other context about the problem here -->
65
75
 
66
76
  ## Possible Solution
77
+
67
78
  <!-- If you have suggestions on how to fix the bug -->
68
79
 
69
80
  ## Checklist
81
+
70
82
  - [ ] I have checked existing issues for duplicates
71
83
  - [ ] I have verified the MCP server is properly installed
72
84
  - [ ] I have tried with the latest version of the tool
73
- - [ ] I have included all relevant error messages
85
+ - [ ] I have included all relevant error messages
@@ -1,28 +1,35 @@
1
1
  ---
2
2
  name: Feature request
3
3
  about: Suggest a new feature for Coolors MCP
4
- title: '[FEATURE] '
4
+ title: "[FEATURE] "
5
5
  labels: enhancement
6
- assignees: ''
6
+ assignees: ""
7
7
  ---
8
8
 
9
9
  ## Feature Description
10
+
10
11
  <!-- Clear description of the feature you'd like to see -->
11
12
 
12
13
  ## Problem It Solves
14
+
13
15
  <!-- What problem or limitation does this feature address? -->
14
16
 
15
17
  ## Proposed Solution
18
+
16
19
  <!-- How do you envision this feature working? -->
17
20
 
18
21
  ## Use Cases
22
+
19
23
  <!-- Specific examples of how this feature would be used -->
20
- 1.
21
- 2.
22
- 3.
24
+
25
+ 1.
26
+ 2.
27
+ 3.
23
28
 
24
29
  ## Tool Enhancement
30
+
25
31
  <!-- Which tool(s) would this feature affect? -->
32
+
26
33
  - [ ] Color conversion tools
27
34
  - [ ] Material Design theme tools
28
35
  - [ ] CSS theme matching tools
@@ -33,7 +40,9 @@ assignees: ''
33
40
  - [ ] Documentation
34
41
 
35
42
  ## Color Space Considerations
43
+
36
44
  <!-- Which color spaces would this feature affect? -->
45
+
37
46
  - [ ] RGB/Hex
38
47
  - [ ] HSL/HSV
39
48
  - [ ] LAB
@@ -42,6 +51,7 @@ assignees: ''
42
51
  - [ ] N/A - Not color space related
43
52
 
44
53
  ## Example Implementation
54
+
45
55
  ```javascript
46
56
  // Example of how you would use this feature
47
57
  {
@@ -53,19 +63,23 @@ assignees: ''
53
63
  ```
54
64
 
55
65
  ## Alternatives Considered
66
+
56
67
  <!-- Have you considered other solutions or workarounds? -->
57
68
 
58
69
  ## Additional Context
70
+
59
71
  <!-- Any other context, mockups, or examples -->
60
72
 
61
73
  ## Impact Assessment
62
- - **Benefit to users**:
74
+
75
+ - **Benefit to users**:
63
76
  - **Implementation complexity**: Low / Medium / High
64
77
  - **Breaking changes**: Yes / No
65
- - **Documentation needs**:
78
+ - **Documentation needs**:
66
79
 
67
80
  ## Checklist
81
+
68
82
  - [ ] I have searched existing issues for similar requests
69
83
  - [ ] This feature aligns with the project's goals
70
84
  - [ ] I would be willing to help implement this feature
71
- - [ ] I have considered the impact on existing users
85
+ - [ ] I have considered the impact on existing users
@@ -1,12 +1,17 @@
1
1
  ## Description
2
+
2
3
  <!-- Provide a brief description of the changes in this PR -->
3
4
 
4
5
  ## Related Issue
6
+
5
7
  <!-- Link to the issue this PR addresses, if applicable -->
8
+
6
9
  Fixes #(issue number)
7
10
 
8
11
  ## Type of Change
12
+
9
13
  <!-- Mark the relevant option with an "x" -->
14
+
10
15
  - [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
11
16
  - [ ] ✨ New feature (non-breaking change which adds functionality)
12
17
  - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
@@ -17,29 +22,37 @@ Fixes #(issue number)
17
22
  - [ ] 🔧 Configuration change
18
23
 
19
24
  ## Changes Made
25
+
20
26
  <!-- List the specific changes made in this PR -->
21
- -
22
- -
23
- -
27
+
28
+ -
29
+ -
30
+ -
24
31
 
25
32
  ## Testing
33
+
26
34
  <!-- Describe the tests you ran to verify your changes -->
27
35
 
28
36
  ### Test Configuration
37
+
29
38
  - **Node.js version**:
30
39
  - **MCP SDK version**:
31
- - **Operating System**:
40
+ - **Operating System**:
32
41
 
33
42
  ### Test Steps
34
- 1.
35
- 2.
36
- 3.
43
+
44
+ 1.
45
+ 2.
46
+ 3.
37
47
 
38
48
  ### Test Results
49
+
39
50
  <!-- Include any relevant test output or screenshots -->
40
51
 
41
52
  ## Tool-Specific Testing
53
+
42
54
  <!-- If your changes affect specific tools, mark which ones you've tested -->
55
+
43
56
  - [ ] convert_color
44
57
  - [ ] color_distance
45
58
  - [ ] check_contrast
@@ -51,16 +64,21 @@ Fixes #(issue number)
51
64
  - [ ] N/A - Core functionality change
52
65
 
53
66
  ## Breaking Changes
67
+
54
68
  <!-- If this PR introduces breaking changes, describe them here -->
69
+
55
70
  - [ ] This PR includes breaking changes
56
71
 
57
72
  If yes, describe:
73
+
58
74
  - What breaks:
59
75
  - Migration path:
60
76
  - Affected users:
61
77
 
62
78
  ## Documentation
79
+
63
80
  <!-- Mark what documentation needs to be updated -->
81
+
64
82
  - [ ] README.md updated
65
83
  - [ ] API documentation updated
66
84
  - [ ] VitePress docs updated
@@ -69,7 +87,9 @@ If yes, describe:
69
87
  - [ ] No documentation needed
70
88
 
71
89
  ## Checklist
90
+
72
91
  <!-- Ensure all items are completed before submitting the PR -->
92
+
73
93
  - [ ] My code follows the project's style guidelines
74
94
  - [ ] I have performed a self-review of my own code
75
95
  - [ ] I have commented my code, particularly in hard-to-understand areas
@@ -81,17 +101,22 @@ If yes, describe:
81
101
  - [ ] Any dependent changes have been merged and published
82
102
 
83
103
  ## Additional Notes
104
+
84
105
  <!-- Add any additional notes, concerns, or discussion points -->
85
106
 
86
107
  ## Screenshots
108
+
87
109
  <!-- If applicable, add screenshots to help explain your changes -->
88
110
 
89
111
  ## Reviewer Notes
112
+
90
113
  <!-- Any specific areas you'd like reviewers to focus on -->
91
114
 
92
115
  ---
116
+
93
117
  **For Maintainers:**
118
+
94
119
  - [ ] Changes reviewed
95
120
  - [ ] Tests pass
96
121
  - [ ] Documentation complete
97
- - [ ] Ready to merge
122
+ - [ ] Ready to merge
@@ -2,126 +2,129 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main ]
5
+ branches: [main]
6
6
  pull_request:
7
- branches: [ main ]
7
+ branches: [main]
8
8
  workflow_dispatch:
9
9
 
10
10
  jobs:
11
11
  test:
12
12
  runs-on: ${{ matrix.os }}
13
-
13
+
14
14
  strategy:
15
15
  matrix:
16
16
  os: [ubuntu-latest, macos-latest, windows-latest]
17
- node-version: [18.x, 20.x, 22.x]
18
- exclude:
19
- # Skip some combinations to save CI time
20
- - os: windows-latest
21
- node-version: 18.x
22
- - os: macos-latest
23
- node-version: 18.x
24
-
17
+ node-version: [20.x, 22.x]
18
+
25
19
  steps:
26
- - name: Checkout code
27
- uses: actions/checkout@v4
28
-
29
- - name: Setup Node.js ${{ matrix.node-version }}
30
- uses: actions/setup-node@v4
31
- with:
32
- node-version: ${{ matrix.node-version }}
33
- cache: 'npm'
34
-
35
- - name: Install dependencies
36
- run: npm ci
37
-
38
- - name: Lint TypeScript
39
- run: npm run lint
40
-
41
- - name: Build project
42
- run: npm run build
43
-
44
- - name: Run tests
45
- run: npm test
46
- continue-on-error: true
47
-
48
- - name: Verify build output
49
- run: |
50
- if [ ! -f "dist/bin/server.js" ]; then
51
- echo "Build failed: dist/bin/server.js not found"
52
- exit 1
53
- fi
54
- shell: bash
55
- if: runner.os != 'Windows'
56
-
57
- - name: Verify build output (Windows)
58
- run: |
59
- if (!(Test-Path "dist/bin/server.js")) {
60
- Write-Error "Build failed: dist/bin/server.js not found"
61
- exit 1
62
- }
63
- shell: pwsh
64
- if: runner.os == 'Windows'
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Setup pnpm
24
+ uses: pnpm/action-setup@v4
25
+
26
+ - name: Setup Node.js ${{ matrix.node-version }}
27
+ uses: actions/setup-node@v4
28
+ with:
29
+ node-version: ${{ matrix.node-version }}
30
+ cache: "pnpm"
31
+
32
+ - name: Install dependencies
33
+ run: pnpm install --frozen-lockfile
34
+
35
+ - name: Lint TypeScript
36
+ run: pnpm run lint
37
+
38
+ - name: Build project
39
+ run: pnpm run build
40
+
41
+ - name: Run tests
42
+ run: pnpm test
43
+ continue-on-error: true
44
+
45
+ - name: Verify build output
46
+ run: |
47
+ if [ ! -f "dist/bin/server.js" ]; then
48
+ echo "Build failed: dist/bin/server.js not found"
49
+ exit 1
50
+ fi
51
+ shell: bash
52
+ if: runner.os != 'Windows'
53
+
54
+ - name: Verify build output (Windows)
55
+ run: |
56
+ if (!(Test-Path "dist/bin/server.js")) {
57
+ Write-Error "Build failed: dist/bin/server.js not found"
58
+ exit 1
59
+ }
60
+ shell: pwsh
61
+ if: runner.os == 'Windows'
65
62
 
66
63
  package-validation:
67
64
  runs-on: ubuntu-latest
68
65
  needs: test
69
-
66
+
70
67
  steps:
71
- - name: Checkout code
72
- uses: actions/checkout@v4
73
-
74
- - name: Setup Node.js
75
- uses: actions/setup-node@v4
76
- with:
77
- node-version: '20.x'
78
- cache: 'npm'
79
-
80
- - name: Install dependencies
81
- run: npm ci
82
-
83
- - name: Build
84
- run: npm run build
85
-
86
- - name: Test npm pack
87
- run: |
88
- npm pack
89
- ls -la *.tgz
90
-
91
- - name: Validate package contents
92
- run: |
93
- tar -tzf *.tgz | grep -E "(dist/|README|LICENSE|package.json)"
94
-
95
- - name: Check package size
96
- run: |
97
- SIZE=$(stat -c%s *.tgz)
98
- echo "Package size: $SIZE bytes"
99
- if [ $SIZE -gt 10485760 ]; then
100
- echo "Warning: Package size exceeds 10MB"
101
- fi
68
+ - name: Checkout code
69
+ uses: actions/checkout@v4
70
+
71
+ - name: Setup pnpm
72
+ uses: pnpm/action-setup@v4
73
+
74
+ - name: Setup Node.js
75
+ uses: actions/setup-node@v4
76
+ with:
77
+ node-version: "20.x"
78
+ cache: "pnpm"
79
+
80
+ - name: Install dependencies
81
+ run: pnpm install --frozen-lockfile
82
+
83
+ - name: Build
84
+ run: pnpm run build
85
+
86
+ - name: Test pnpm pack
87
+ run: |
88
+ pnpm pack
89
+ ls -la *.tgz
90
+
91
+ - name: Validate package contents
92
+ run: |
93
+ tar -tzf *.tgz | grep -E "(dist/|README|LICENSE|package.json)"
94
+
95
+ - name: Check package size
96
+ run: |
97
+ SIZE=$(stat -c%s *.tgz)
98
+ echo "Package size: $SIZE bytes"
99
+ if [ $SIZE -gt 10485760 ]; then
100
+ echo "Warning: Package size exceeds 10MB"
101
+ fi
102
102
 
103
103
  docs-build:
104
104
  runs-on: ubuntu-latest
105
-
105
+
106
106
  steps:
107
- - name: Checkout code
108
- uses: actions/checkout@v4
109
-
110
- - name: Setup Node.js
111
- uses: actions/setup-node@v4
112
- with:
113
- node-version: '20.x'
114
- cache: 'npm'
115
-
116
- - name: Install dependencies
117
- run: npm ci
118
-
119
- - name: Build documentation
120
- run: npm run docs:build
121
-
122
- - name: Verify docs build
123
- run: |
124
- if [ ! -d "docs/.vitepress/dist" ]; then
125
- echo "Documentation build failed"
126
- exit 1
127
- fi
107
+ - name: Checkout code
108
+ uses: actions/checkout@v4
109
+
110
+ - name: Setup pnpm
111
+ uses: pnpm/action-setup@v4
112
+
113
+ - name: Setup Node.js
114
+ uses: actions/setup-node@v4
115
+ with:
116
+ node-version: "20.x"
117
+ cache: "pnpm"
118
+
119
+ - name: Install dependencies
120
+ run: pnpm install --frozen-lockfile
121
+
122
+ - name: Build documentation
123
+ run: pnpm run docs:build
124
+
125
+ - name: Verify docs build
126
+ run: |
127
+ if [ ! -d "docs/.vitepress/dist" ]; then
128
+ echo "Documentation build failed"
129
+ exit 1
130
+ fi
@@ -17,27 +17,30 @@ concurrency:
17
17
  jobs:
18
18
  build:
19
19
  runs-on: ubuntu-latest
20
-
20
+
21
21
  steps:
22
22
  - name: Checkout
23
23
  uses: actions/checkout@v4
24
24
  with:
25
25
  fetch-depth: 0 # For lastUpdated feature
26
-
26
+
27
+ - name: Setup pnpm
28
+ uses: pnpm/action-setup@v4
29
+
27
30
  - name: Setup Node.js
28
31
  uses: actions/setup-node@v4
29
32
  with:
30
- node-version: '20'
31
- cache: 'npm'
32
-
33
+ node-version: "20"
34
+ cache: "pnpm"
35
+
33
36
  - name: Install dependencies
34
- run: npm ci
35
-
37
+ run: pnpm install --frozen-lockfile
38
+
36
39
  - name: Build VitePress site
37
- run: npm run docs:build
40
+ run: pnpm run docs:build
38
41
  env:
39
42
  NODE_ENV: production
40
-
43
+
41
44
  - name: Upload artifact
42
45
  uses: actions/upload-pages-artifact@v3
43
46
  with:
@@ -49,8 +52,8 @@ jobs:
49
52
  url: ${{ steps.deployment.outputs.page_url }}
50
53
  needs: build
51
54
  runs-on: ubuntu-latest
52
-
55
+
53
56
  steps:
54
57
  - name: Deploy to GitHub Pages
55
58
  id: deployment
56
- uses: actions/deploy-pages@v4
59
+ uses: actions/deploy-pages@v4
@@ -3,11 +3,11 @@ name: Release
3
3
  on:
4
4
  push:
5
5
  tags:
6
- - 'v*.*.*'
6
+ - "v*.*.*"
7
7
  workflow_dispatch:
8
8
  inputs:
9
9
  version:
10
- description: 'Release version (e.g., 1.0.0)'
10
+ description: "Release version (e.g., 1.0.0)"
11
11
  required: true
12
12
  type: string
13
13
 
@@ -18,20 +18,23 @@ permissions:
18
18
  jobs:
19
19
  publish:
20
20
  runs-on: ubuntu-latest
21
-
21
+
22
22
  steps:
23
23
  - name: Checkout code
24
24
  uses: actions/checkout@v4
25
25
  with:
26
26
  fetch-depth: 0
27
-
27
+
28
+ - name: Setup pnpm
29
+ uses: pnpm/action-setup@v4
30
+
28
31
  - name: Setup Node.js
29
32
  uses: actions/setup-node@v4
30
33
  with:
31
- node-version: '20'
32
- registry-url: 'https://registry.npmjs.org'
33
- cache: 'npm'
34
-
34
+ node-version: "20"
35
+ registry-url: "https://registry.npmjs.org"
36
+ cache: "pnpm"
37
+
35
38
  - name: Verify package name
36
39
  run: |
37
40
  PACKAGE_NAME=$(node -p "require('./package.json').name")
@@ -39,16 +42,16 @@ jobs:
39
42
  echo "❌ Package name mismatch. Expected @trishchuk/coolors-mcp, got $PACKAGE_NAME"
40
43
  exit 1
41
44
  fi
42
-
45
+
43
46
  - name: Install dependencies
44
- run: npm ci
45
-
47
+ run: pnpm install --frozen-lockfile
48
+
46
49
  - name: Run tests and build
47
50
  run: |
48
- npm run lint
49
- npm run build
50
- npm test || true
51
-
51
+ pnpm run lint
52
+ pnpm run build
53
+ pnpm test || true
54
+
52
55
  - name: Verify build output
53
56
  run: |
54
57
  if [ ! -f "dist/bin/server.js" ]; then
@@ -56,22 +59,21 @@ jobs:
56
59
  exit 1
57
60
  fi
58
61
  echo "✅ Build output verified"
59
-
62
+
60
63
  - name: Create tarball and check size
61
64
  run: |
62
- npm pack --dry-run
63
- SIZE=$(npm pack --json | jq '.[0].size')
65
+ pnpm pack
66
+ SIZE=$(stat -c%s *.tgz)
64
67
  echo "📦 Package size: $SIZE bytes"
65
68
  if [ $SIZE -gt 10485760 ]; then
66
69
  echo "⚠️ Warning: Package size exceeds 10MB"
67
70
  fi
68
-
71
+
69
72
  - name: Publish to npm
70
- run: |
71
- npm publish --access public
73
+ run: pnpm publish --access public --no-git-checks
72
74
  env:
73
75
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
74
-
76
+
75
77
  - name: Create GitHub Release
76
78
  uses: softprops/action-gh-release@v2
77
79
  with:
@@ -96,4 +98,4 @@ jobs:
96
98
  ### Links
97
99
  - 📦 [NPM Package](https://www.npmjs.com/package/@trishchuk/coolors-mcp)
98
100
  - 📖 [Documentation](https://x51xxx.github.io/coolors-mcp/)
99
- - 🐛 [Report Issues](https://github.com/x51xxx/coolors-mcp/issues)
101
+ - 🐛 [Report Issues](https://github.com/x51xxx/coolors-mcp/issues)