@gesslar/lpc-mcp 1.1.0 → 1.1.2

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.
@@ -14,16 +14,23 @@ jobs:
14
14
  #
15
15
  ### PACKAGE MANAGER
16
16
  #
17
- # Set the package manager to use: 'npm' or 'pnpm'
17
+ # Set the package manager to use: "auto", "npm" or "pnpm
18
18
  # This will configure the appropriate setup and commands throughout
19
19
  # the workflow.
20
20
  #
21
- # Example: PACKAGE_MANAGER="pnpm"
21
+ # If set to "auto", this workflow will attempt to read the "packageManager"
22
+ # value of the package.json. So, make sure you have one and that you have
23
+ # also set this value. If it discovers pnpm, it will use that and falls
24
+ # back to npm if missing.
25
+ #
26
+ # Example:
27
+ # PACKAGE_MANAGER="auto"
28
+ # PACKAGE_MANAGER="pnpm"
22
29
  # PACKAGE_MANAGER="npm"
23
30
  #
24
31
  ### LINTING #########################################################
25
32
  #
26
- # If we need to perform linting, set the value to 'yes'. Any other
33
+ # If we need to perform linting, set the value to "yes". Any other
27
34
  # value will skip linting.
28
35
  #
29
36
  # Example: PERFORM_LINTING="yes"
@@ -31,7 +38,7 @@ jobs:
31
38
  #
32
39
  ### TESTING #########################################################
33
40
  #
34
- # If we need to perform testing, set the value to 'yes'. Any other
41
+ # If we need to perform testing, set the value to "yes". Any other
35
42
  # value will skip testing.
36
43
  #
37
44
  # Example: PERFORM_TESTING="yes"
@@ -43,34 +50,78 @@ jobs:
43
50
  runs-on: ubuntu-latest
44
51
  permissions: {}
45
52
  outputs:
46
- perform_testing: ${{ steps.cfg.outputs.perform_testing }}
47
- perform_linting: ${{ steps.cfg.outputs.perform_linting }}
48
- package_manager: ${{ steps.cfg.outputs.package_manager }}
49
- pm_install_cmd: ${{ steps.cfg.outputs.pm_install_cmd }}
53
+ perform_linting: ${{ steps.cfg1.outputs.perform_linting }}
54
+ perform_testing: ${{ steps.cfg1.outputs.perform_testing }}
55
+ package_manager: ${{ steps.cfg2.outputs.package_manager }}
56
+ pm_install_cmd: ${{ steps.cfg2.outputs.pm_install_cmd }}
57
+ pm_default: ${{ steps.cfg1.outputs.pm_default }}
58
+ pm_version: ${{ steps.cfg2.outputs.pm_version }}
50
59
 
51
60
  steps:
52
- - name: Configure workflow
53
- id: cfg
61
+ - name: Configure Linting and Testing
62
+ id: cfg1
54
63
  run: |+
55
64
  #############################################################
56
- PACKAGE_MANAGER="pnpm"
65
+ PACKAGE_MANAGER="auto"
57
66
  PERFORM_LINTING="yes"
58
67
  PERFORM_TESTING="no"
59
68
  #############################################################
60
69
 
61
- # Apply configuration
62
- PACKAGE_MANAGER="pnpm"
70
+ echo "perform_linting=${PERFORM_LINTING}" >> "$GITHUB_OUTPUT"
71
+ echo "perform_testing=${PERFORM_TESTING}" >> "$GITHUB_OUTPUT"
72
+ echo "package_manager=${PACKAGE_MANAGER}" >> "$GITHUB_OUTPUT"
73
+ echo "pm_default=npm" >> "$GITHUB_OUTPUT"
74
+
75
+ - name: Check out repository
76
+ if: ${{ steps.cfg1.outputs.package_manager == 'auto' }}
77
+ uses: actions/checkout@v6
78
+
79
+ - name: Configure Package Manager
80
+ id: cfg2
81
+ run: |+
82
+ PM_DEFAULT="${{ steps.cfg1.outputs.pm_default }}"
83
+ PACKAGE_MANAGER="${{ steps.cfg1.outputs.package_manager }}"
84
+
85
+ if [[ "$PACKAGE_MANAGER" = "auto" ]]; then
86
+ printf "Package manager set to 'auto'.\n"
87
+ printf "Detecting: "
88
+
89
+ PM=$(jq -r .packageManager package.json 2>/dev/null)
90
+ printf "PM=%s\n" "$PM"
91
+
92
+ if [[ ! "$PM" ]]; then
93
+ PACKAGE_MANAGER="$PM_DEFAULT"
94
+ elif [[ "$PM" =~ ^(pnpm)@([[:digit:]]+.[[:digit:]]+.[[:digit:]]+)$ ]]; then
95
+ PACKAGE_MANAGER="${BASH_REMATCH[1]}"
96
+ PM_VERSION="${BASH_REMATCH[2]}"
97
+ else
98
+ PACKAGE_MANAGER="$PM_DEFAULT"
99
+ PM_VERSION=""
100
+ fi
101
+ fi
102
+
63
103
  echo "package_manager=${PACKAGE_MANAGER}" >> "$GITHUB_OUTPUT"
104
+ echo "pm_version=${PM_VERSION}" >> "$GITHUB_OUTPUT"
64
105
 
65
- # Set package manager specific commands and versions
66
- if [ "$PACKAGE_MANAGER" = "pnpm" ]; then
106
+ if [[ "$PACKAGE_MANAGER" = "pnpm" ]]; then
67
107
  echo "pm_install_cmd=pnpm install --frozen-lockfile" >> "$GITHUB_OUTPUT"
68
108
  else
69
109
  echo "pm_install_cmd=npm ci" >> "$GITHUB_OUTPUT"
70
110
  fi
71
111
 
72
- echo "perform_linting=${PERFORM_LINTING}" >> "$GITHUB_OUTPUT"
73
- echo "perform_testing=${PERFORM_TESTING}" >> "$GITHUB_OUTPUT"
112
+ - name: Display Configuration
113
+ run: |+
114
+ printf "Linting: %s\n" "${{ steps.cfg1.outputs.perform_linting }}"
115
+ printf "Testing: %s\n" "${{ steps.cfg1.outputs.perform_testing }}"
116
+ printf "Package Manager: %s" "${{ steps.cfg2.outputs.package_manager }}"
117
+
118
+ if [[ "${{ steps.cfg2.outputs.package_manager }}" = "pnpm" ]]; then
119
+ printf " (%s)\n" "${{ steps.cfg2.outputs.pm_version }}"
120
+ else
121
+ printf "\n"
122
+ fi
123
+
124
+ printf "Package Manager Install: %s\n" "${{ steps.cfg2.outputs.pm_install_cmd }}"
74
125
 
75
126
  Lint:
76
127
  needs: ConfigureWorkflow
@@ -89,8 +140,12 @@ jobs:
89
140
  uses: actions/checkout@v6
90
141
 
91
142
  - name: Install pnpm
92
- if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' && needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
143
+ if: >
144
+ ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' &&
145
+ needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
93
146
  uses: pnpm/action-setup@v4
147
+ with:
148
+ version: ${{ needs.ConfigureWorkflow.outputs.pm_version }}
94
149
 
95
150
  - name: Using Node v${{ matrix.node-version }}
96
151
  if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' }}
@@ -124,8 +179,12 @@ jobs:
124
179
  uses: actions/checkout@v6
125
180
 
126
181
  - name: Install pnpm
127
- if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' && needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
182
+ if: >
183
+ ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' &&
184
+ needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
128
185
  uses: pnpm/action-setup@v4
186
+ with:
187
+ version: ${{ needs.ConfigureWorkflow.outputs.pm_version }}
129
188
 
130
189
  - name: Using Node v${{ matrix.node-version }}
131
190
  if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' }}
@@ -197,7 +197,7 @@ jobs:
197
197
 
198
198
  - name: Create Release
199
199
  env:
200
- GH_TOKEN: ${{ secrets. GITHUB_TOKEN }}
200
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
201
201
  run: >
202
202
  gh release create "${{ env.NEW_TAG }}"
203
203
  --title "Release ${{ env.NEW_TAG }}"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gesslar/lpc-mcp",
3
3
  "description": "MCP server for LPC language server",
4
4
  "author": "gesslar",
5
- "version": "1.1.0",
5
+ "version": "1.1.2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/gesslar/lpc-mcp.git"