@gesslar/lpc-mcp 1.0.3 → 1.1.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.
- package/.github/workflows/Quality.yaml +106 -56
- package/.github/workflows/Release.yaml +45 -31
- package/package.json +1 -1
|
@@ -10,48 +10,118 @@ on:
|
|
|
10
10
|
- cron: "20 14 * * 1"
|
|
11
11
|
|
|
12
12
|
jobs:
|
|
13
|
+
### CONFIGURATION ###################################################
|
|
14
|
+
#
|
|
15
|
+
### PACKAGE MANAGER
|
|
16
|
+
#
|
|
17
|
+
# Set the package manager to use: "auto", "npm" or "pnpm
|
|
18
|
+
# This will configure the appropriate setup and commands throughout
|
|
19
|
+
# the workflow.
|
|
20
|
+
#
|
|
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"
|
|
29
|
+
# PACKAGE_MANAGER="npm"
|
|
30
|
+
#
|
|
31
|
+
### LINTING #########################################################
|
|
32
|
+
#
|
|
33
|
+
# If we need to perform linting, set the value to "yes". Any other
|
|
34
|
+
# value will skip linting.
|
|
35
|
+
#
|
|
36
|
+
# Example: PERFORM_LINTING="yes"
|
|
37
|
+
# PERFORM_LINTING="no"
|
|
38
|
+
#
|
|
39
|
+
### TESTING #########################################################
|
|
40
|
+
#
|
|
41
|
+
# If we need to perform testing, set the value to "yes". Any other
|
|
42
|
+
# value will skip testing.
|
|
43
|
+
#
|
|
44
|
+
# Example: PERFORM_TESTING="yes"
|
|
45
|
+
# PERFORM_TESTING="no"
|
|
46
|
+
#
|
|
47
|
+
#####################################################################
|
|
48
|
+
|
|
13
49
|
ConfigureWorkflow:
|
|
14
50
|
runs-on: ubuntu-latest
|
|
15
51
|
permissions: {}
|
|
16
52
|
outputs:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
package_manager: ${{ steps.
|
|
20
|
-
pm_install_cmd: ${{ steps.
|
|
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 }}
|
|
21
59
|
|
|
22
60
|
steps:
|
|
23
|
-
- name: Configure
|
|
24
|
-
id:
|
|
61
|
+
- name: Configure Linting and Testing
|
|
62
|
+
id: cfg1
|
|
25
63
|
run: |+
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
64
|
+
#############################################################
|
|
65
|
+
PACKAGE_MANAGER="auto"
|
|
66
|
+
PERFORM_LINTING="yes"
|
|
67
|
+
PERFORM_TESTING="no"
|
|
68
|
+
#############################################################
|
|
69
|
+
|
|
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
|
|
31
102
|
|
|
32
|
-
PACKAGE_MANAGER="pnpm"
|
|
33
103
|
echo "package_manager=${PACKAGE_MANAGER}" >> "$GITHUB_OUTPUT"
|
|
104
|
+
echo "pm_version=${PM_VERSION}" >> "$GITHUB_OUTPUT"
|
|
34
105
|
|
|
35
|
-
|
|
36
|
-
if [ "$PACKAGE_MANAGER" = "pnpm" ]; then
|
|
106
|
+
if [[ "$PACKAGE_MANAGER" = "pnpm" ]]; then
|
|
37
107
|
echo "pm_install_cmd=pnpm install --frozen-lockfile" >> "$GITHUB_OUTPUT"
|
|
38
108
|
else
|
|
39
109
|
echo "pm_install_cmd=npm ci" >> "$GITHUB_OUTPUT"
|
|
40
110
|
fi
|
|
41
111
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
echo "perform_linting=yes" >> "$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 }}"
|
|
48
117
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
118
|
+
if [[ "${{ steps.cfg2.outputs.package_manager }}" = "pnpm" ]]; then
|
|
119
|
+
printf " (%s)\n" "${{ steps.cfg2.outputs.package_manager }}"
|
|
120
|
+
else
|
|
121
|
+
printf "\n"
|
|
122
|
+
fi
|
|
53
123
|
|
|
54
|
-
|
|
124
|
+
printf "Package Manager Install: %s\n" "${{ steps.cfg2.outputs.pm_install_cmd }}"
|
|
55
125
|
|
|
56
126
|
Lint:
|
|
57
127
|
needs: ConfigureWorkflow
|
|
@@ -70,8 +140,12 @@ jobs:
|
|
|
70
140
|
uses: actions/checkout@v6
|
|
71
141
|
|
|
72
142
|
- name: Install pnpm
|
|
73
|
-
if:
|
|
143
|
+
if: >
|
|
144
|
+
${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' &&
|
|
145
|
+
needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
|
|
74
146
|
uses: pnpm/action-setup@v4
|
|
147
|
+
with:
|
|
148
|
+
version: ${{ needs.ConfigureWorkflow.outputs.pm_version }}
|
|
75
149
|
|
|
76
150
|
- name: Using Node v${{ matrix.node-version }}
|
|
77
151
|
if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' }}
|
|
@@ -105,8 +179,12 @@ jobs:
|
|
|
105
179
|
uses: actions/checkout@v6
|
|
106
180
|
|
|
107
181
|
- name: Install pnpm
|
|
108
|
-
if:
|
|
182
|
+
if: >
|
|
183
|
+
${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' &&
|
|
184
|
+
needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
|
|
109
185
|
uses: pnpm/action-setup@v4
|
|
186
|
+
with:
|
|
187
|
+
version: ${{ needs.ConfigureWorkflow.outputs.pm_version }}
|
|
110
188
|
|
|
111
189
|
- name: Using Node v${{ matrix.node-version }}
|
|
112
190
|
if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' }}
|
|
@@ -150,42 +228,14 @@ jobs:
|
|
|
150
228
|
- name: Checkout repository
|
|
151
229
|
uses: actions/checkout@v4
|
|
152
230
|
|
|
153
|
-
# Add any setup steps before running the `github/codeql-action/init` action.
|
|
154
|
-
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
|
155
|
-
# or others). This is typically only required for manual builds.
|
|
156
|
-
# - name: Setup runtime (example)
|
|
157
|
-
# uses: actions/setup-example@v1
|
|
158
|
-
|
|
159
|
-
# Initializes the CodeQL tools for scanning.
|
|
160
231
|
- name: Initialize CodeQL
|
|
161
232
|
uses: github/codeql-action/init@v4
|
|
162
233
|
with:
|
|
163
234
|
languages: ${{ matrix.language }}
|
|
164
235
|
build-mode: ${{ matrix.build-mode }}
|
|
165
|
-
#
|
|
166
|
-
# By default, queries listed here will override any specified in a config file.
|
|
167
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
168
|
-
|
|
169
|
-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-[...]
|
|
236
|
+
# Uncomment to enable stricter security queries:
|
|
170
237
|
# queries: security-extended,security-and-quality
|
|
171
238
|
|
|
172
|
-
# If the analyze step fails for one of the languages you are analyzing with
|
|
173
|
-
# "We were unable to automatically build your code", modify the matrix above
|
|
174
|
-
# to set the build mode to "manual" for that language. Then modify this step
|
|
175
|
-
# to build your code.
|
|
176
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
|
177
|
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
178
|
-
- name: Run manual build steps
|
|
179
|
-
if: matrix.build-mode == 'manual'
|
|
180
|
-
shell: bash
|
|
181
|
-
run: |
|
|
182
|
-
echo 'If you are using a "manual" build mode for one or more of the' \
|
|
183
|
-
'languages you are analyzing, replace this with the commands to build' \
|
|
184
|
-
'your code, for example:'
|
|
185
|
-
echo ' make bootstrap'
|
|
186
|
-
echo ' make release'
|
|
187
|
-
exit 1
|
|
188
|
-
|
|
189
239
|
- name: Perform CodeQL Analysis
|
|
190
240
|
uses: github/codeql-action/analyze@v4
|
|
191
241
|
with:
|
|
@@ -11,22 +11,47 @@ on:
|
|
|
11
11
|
- main
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
|
+
### CONFIGURATION ###################################################
|
|
15
|
+
#
|
|
16
|
+
### QUALITY CHECK WORKFLOW
|
|
17
|
+
#
|
|
18
|
+
# If you want to wait for a quality workflow to complete before
|
|
19
|
+
# creating a release, specify its name here. Leave empty to skip.
|
|
20
|
+
#
|
|
21
|
+
# Example: QUALITY_CHECK="CodeQL, Linting, Testing"
|
|
22
|
+
# QUALITY_CHECK=""
|
|
23
|
+
#
|
|
24
|
+
### GIT CONFIGURATION
|
|
25
|
+
#
|
|
26
|
+
# Configure the Git user for tagging operations.
|
|
27
|
+
#
|
|
28
|
+
# Example: GIT_USER_NAME="github-actions"
|
|
29
|
+
# GIT_USER_EMAIL="github-actions@github.com"
|
|
30
|
+
#
|
|
31
|
+
#####################################################################
|
|
32
|
+
|
|
14
33
|
ConfigureWorkflow:
|
|
15
34
|
runs-on: ubuntu-latest
|
|
16
35
|
|
|
17
36
|
outputs:
|
|
18
37
|
quality_check: ${{ steps.cfg.outputs.quality_check }}
|
|
38
|
+
git_user_name: ${{ steps.cfg.outputs.git_user_name }}
|
|
39
|
+
git_user_email: ${{ steps.cfg.outputs.git_user_email }}
|
|
19
40
|
|
|
20
41
|
steps:
|
|
21
42
|
- name: Configure workflow
|
|
22
43
|
id: cfg
|
|
23
44
|
run: |+
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
45
|
+
#############################################################
|
|
46
|
+
QUALITY_CHECK="CodeQL, Linting, Testing"
|
|
47
|
+
GIT_USER_NAME="github-actions"
|
|
48
|
+
GIT_USER_EMAIL="github-actions@github.com"
|
|
49
|
+
#############################################################
|
|
28
50
|
|
|
29
|
-
|
|
51
|
+
# Apply configuration
|
|
52
|
+
echo "quality_check=${QUALITY_CHECK}" >> "$GITHUB_OUTPUT"
|
|
53
|
+
echo "git_user_name=${GIT_USER_NAME}" >> "$GITHUB_OUTPUT"
|
|
54
|
+
echo "git_user_email=${GIT_USER_EMAIL}" >> "$GITHUB_OUTPUT"
|
|
30
55
|
|
|
31
56
|
WaitForQuality:
|
|
32
57
|
needs: ConfigureWorkflow
|
|
@@ -86,10 +111,6 @@ jobs:
|
|
|
86
111
|
permissions:
|
|
87
112
|
contents: write
|
|
88
113
|
|
|
89
|
-
env:
|
|
90
|
-
GIT_USER_NAME: "github-actions"
|
|
91
|
-
GIT_USER_EMAIL: "github-actions@github.com"
|
|
92
|
-
|
|
93
114
|
outputs:
|
|
94
115
|
new_tag: ${{ steps.check_tag.outputs.new_tag }}
|
|
95
116
|
|
|
@@ -99,15 +120,13 @@ jobs:
|
|
|
99
120
|
|
|
100
121
|
- name: Setup Git Variables
|
|
101
122
|
run: |+
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
git config user.name "${GIT_USER_NAME}"
|
|
105
|
-
git config user.email "${GIT_USER_EMAIL}"
|
|
123
|
+
git config user.name "${{ needs.ConfigureWorkflow.outputs.git_user_name }}"
|
|
124
|
+
git config user.email "${{ needs.ConfigureWorkflow.outputs.git_user_email }}"
|
|
106
125
|
|
|
107
126
|
- name: Set up Node.js
|
|
108
127
|
uses: actions/setup-node@v6
|
|
109
128
|
with:
|
|
110
|
-
node-version:
|
|
129
|
+
node-version: 22
|
|
111
130
|
|
|
112
131
|
- name: Install dependencies
|
|
113
132
|
run: npm install
|
|
@@ -140,7 +159,7 @@ jobs:
|
|
|
140
159
|
fi
|
|
141
160
|
|
|
142
161
|
PrepareGitHubRelease:
|
|
143
|
-
needs: CreateTag
|
|
162
|
+
needs: [ConfigureWorkflow, CreateTag]
|
|
144
163
|
runs-on: ubuntu-latest
|
|
145
164
|
if: ${{ needs.CreateTag.outputs.new_tag != '🙅🏻♂️' }}
|
|
146
165
|
|
|
@@ -149,8 +168,6 @@ jobs:
|
|
|
149
168
|
|
|
150
169
|
env:
|
|
151
170
|
NEW_TAG: ${{ needs.CreateTag.outputs.new_tag }}
|
|
152
|
-
GIT_USER_NAME: "github-actions"
|
|
153
|
-
GIT_USER_EMAIL: "github-actions@github.com"
|
|
154
171
|
|
|
155
172
|
steps:
|
|
156
173
|
- name: Setup New Tag
|
|
@@ -162,15 +179,13 @@ jobs:
|
|
|
162
179
|
|
|
163
180
|
- name: Setup Git Variables
|
|
164
181
|
run: |
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
git config user.name "${GIT_USER_NAME}"
|
|
168
|
-
git config user.email "${GIT_USER_EMAIL}"
|
|
182
|
+
git config user.name "${{ needs.ConfigureWorkflow.outputs.git_user_name }}"
|
|
183
|
+
git config user.email "${{ needs.ConfigureWorkflow.outputs.git_user_email }}"
|
|
169
184
|
|
|
170
185
|
- name: Set up Node.js
|
|
171
186
|
uses: actions/setup-node@v6
|
|
172
187
|
with:
|
|
173
|
-
node-version:
|
|
188
|
+
node-version: 22
|
|
174
189
|
|
|
175
190
|
- name: Install dependencies
|
|
176
191
|
run: npm install
|
|
@@ -181,14 +196,13 @@ jobs:
|
|
|
181
196
|
echo "ARTEFACT=${ARTEFACT}" >> $GITHUB_ENV
|
|
182
197
|
|
|
183
198
|
- name: Create Release
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
generateReleaseNotes: true
|
|
199
|
+
env:
|
|
200
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
201
|
+
run: >
|
|
202
|
+
gh release create "${{ env.NEW_TAG }}"
|
|
203
|
+
--title "Release ${{ env.NEW_TAG }}"
|
|
204
|
+
--generate-notes
|
|
205
|
+
"${{ env.ARTEFACT }}"
|
|
192
206
|
|
|
193
207
|
PublishToNPM:
|
|
194
208
|
needs: DetermineVersion
|
|
@@ -207,7 +221,7 @@ jobs:
|
|
|
207
221
|
- name: Set up Node.js
|
|
208
222
|
uses: actions/setup-node@v6
|
|
209
223
|
with:
|
|
210
|
-
node-version:
|
|
224
|
+
node-version: 22
|
|
211
225
|
|
|
212
226
|
- name: Ship it
|
|
213
227
|
run: |
|
package/package.json
CHANGED