@gesslar/lpc-mcp 0.1.5 → 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.
- package/.github/workflows/Quality.yaml +183 -0
- package/.github/workflows/Release.yaml +228 -0
- package/eslint.config.js +8 -164
- package/package.json +28 -19
- package/src/index.js +0 -0
- package/test.txt +3 -0
- package/.github/workflows/ci.yml +0 -33
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
name: CodeQL, Linting, Testing
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: "20 14 * * 1"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
### CONFIGURATION ###################################################
|
|
14
|
+
#
|
|
15
|
+
### PACKAGE MANAGER
|
|
16
|
+
#
|
|
17
|
+
# Set the package manager to use: 'npm' or 'pnpm'
|
|
18
|
+
# This will configure the appropriate setup and commands throughout
|
|
19
|
+
# the workflow.
|
|
20
|
+
#
|
|
21
|
+
# Example: PACKAGE_MANAGER="pnpm"
|
|
22
|
+
# PACKAGE_MANAGER="npm"
|
|
23
|
+
#
|
|
24
|
+
### LINTING #########################################################
|
|
25
|
+
#
|
|
26
|
+
# If we need to perform linting, set the value to 'yes'. Any other
|
|
27
|
+
# value will skip linting.
|
|
28
|
+
#
|
|
29
|
+
# Example: PERFORM_LINTING="yes"
|
|
30
|
+
# PERFORM_LINTING="no"
|
|
31
|
+
#
|
|
32
|
+
### TESTING #########################################################
|
|
33
|
+
#
|
|
34
|
+
# If we need to perform testing, set the value to 'yes'. Any other
|
|
35
|
+
# value will skip testing.
|
|
36
|
+
#
|
|
37
|
+
# Example: PERFORM_TESTING="yes"
|
|
38
|
+
# PERFORM_TESTING="no"
|
|
39
|
+
#
|
|
40
|
+
#####################################################################
|
|
41
|
+
|
|
42
|
+
ConfigureWorkflow:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
permissions: {}
|
|
45
|
+
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 }}
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Configure workflow
|
|
53
|
+
id: cfg
|
|
54
|
+
run: |+
|
|
55
|
+
#############################################################
|
|
56
|
+
PACKAGE_MANAGER="pnpm"
|
|
57
|
+
PERFORM_LINTING="yes"
|
|
58
|
+
PERFORM_TESTING="no"
|
|
59
|
+
#############################################################
|
|
60
|
+
|
|
61
|
+
# Apply configuration
|
|
62
|
+
PACKAGE_MANAGER="pnpm"
|
|
63
|
+
echo "package_manager=${PACKAGE_MANAGER}" >> "$GITHUB_OUTPUT"
|
|
64
|
+
|
|
65
|
+
# Set package manager specific commands and versions
|
|
66
|
+
if [ "$PACKAGE_MANAGER" = "pnpm" ]; then
|
|
67
|
+
echo "pm_install_cmd=pnpm install --frozen-lockfile" >> "$GITHUB_OUTPUT"
|
|
68
|
+
else
|
|
69
|
+
echo "pm_install_cmd=npm ci" >> "$GITHUB_OUTPUT"
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
echo "perform_linting=${PERFORM_LINTING}" >> "$GITHUB_OUTPUT"
|
|
73
|
+
echo "perform_testing=${PERFORM_TESTING}" >> "$GITHUB_OUTPUT"
|
|
74
|
+
|
|
75
|
+
Lint:
|
|
76
|
+
needs: ConfigureWorkflow
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
|
|
79
|
+
permissions:
|
|
80
|
+
contents: read
|
|
81
|
+
|
|
82
|
+
strategy:
|
|
83
|
+
matrix:
|
|
84
|
+
node-version: [22.x]
|
|
85
|
+
|
|
86
|
+
steps:
|
|
87
|
+
- name: Check out repository
|
|
88
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' }}
|
|
89
|
+
uses: actions/checkout@v6
|
|
90
|
+
|
|
91
|
+
- name: Install pnpm
|
|
92
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' && needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
|
|
93
|
+
uses: pnpm/action-setup@v4
|
|
94
|
+
|
|
95
|
+
- name: Using Node v${{ matrix.node-version }}
|
|
96
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' }}
|
|
97
|
+
uses: actions/setup-node@v6
|
|
98
|
+
with:
|
|
99
|
+
node-version: ${{ matrix.node-version }}
|
|
100
|
+
cache: ${{ needs.ConfigureWorkflow.outputs.package_manager }}
|
|
101
|
+
|
|
102
|
+
- name: Install dependencies
|
|
103
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' }}
|
|
104
|
+
run: ${{ needs.ConfigureWorkflow.outputs.pm_install_cmd }}
|
|
105
|
+
|
|
106
|
+
- name: Perform lint check
|
|
107
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_linting == 'yes' }}
|
|
108
|
+
run: ${{ needs.ConfigureWorkflow.outputs.package_manager }} run lint
|
|
109
|
+
|
|
110
|
+
Test:
|
|
111
|
+
needs: ConfigureWorkflow
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
|
|
114
|
+
permissions:
|
|
115
|
+
contents: read
|
|
116
|
+
|
|
117
|
+
strategy:
|
|
118
|
+
matrix:
|
|
119
|
+
node-version: [22.x]
|
|
120
|
+
|
|
121
|
+
steps:
|
|
122
|
+
- name: Check out repository
|
|
123
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' }}
|
|
124
|
+
uses: actions/checkout@v6
|
|
125
|
+
|
|
126
|
+
- name: Install pnpm
|
|
127
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' && needs.ConfigureWorkflow.outputs.package_manager == 'pnpm' }}
|
|
128
|
+
uses: pnpm/action-setup@v4
|
|
129
|
+
|
|
130
|
+
- name: Using Node v${{ matrix.node-version }}
|
|
131
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' }}
|
|
132
|
+
uses: actions/setup-node@v6
|
|
133
|
+
with:
|
|
134
|
+
node-version: ${{ matrix.node-version }}
|
|
135
|
+
cache: ${{ needs.ConfigureWorkflow.outputs.package_manager }}
|
|
136
|
+
|
|
137
|
+
- name: Install dependencies
|
|
138
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' }}
|
|
139
|
+
run: ${{ needs.ConfigureWorkflow.outputs.pm_install_cmd }}
|
|
140
|
+
|
|
141
|
+
- name: Definitely don't cheat on tests
|
|
142
|
+
if: ${{ needs.ConfigureWorkflow.outputs.perform_testing == 'yes' }}
|
|
143
|
+
run: ${{ needs.ConfigureWorkflow.outputs.package_manager }} test
|
|
144
|
+
|
|
145
|
+
Analyze:
|
|
146
|
+
name: Analyze (${{ matrix.language }})
|
|
147
|
+
needs: ["Lint", "Test"]
|
|
148
|
+
runs-on: ubuntu-latest
|
|
149
|
+
permissions:
|
|
150
|
+
# required for all workflows
|
|
151
|
+
security-events: write
|
|
152
|
+
|
|
153
|
+
# required to fetch internal or private CodeQL packs
|
|
154
|
+
packages: read
|
|
155
|
+
|
|
156
|
+
# only required for workflows in private repositories
|
|
157
|
+
actions: read
|
|
158
|
+
contents: read
|
|
159
|
+
|
|
160
|
+
strategy:
|
|
161
|
+
fail-fast: false
|
|
162
|
+
matrix:
|
|
163
|
+
include:
|
|
164
|
+
- language: actions
|
|
165
|
+
build-mode: none
|
|
166
|
+
- language: javascript-typescript
|
|
167
|
+
build-mode: none
|
|
168
|
+
steps:
|
|
169
|
+
- name: Checkout repository
|
|
170
|
+
uses: actions/checkout@v4
|
|
171
|
+
|
|
172
|
+
- name: Initialize CodeQL
|
|
173
|
+
uses: github/codeql-action/init@v4
|
|
174
|
+
with:
|
|
175
|
+
languages: ${{ matrix.language }}
|
|
176
|
+
build-mode: ${{ matrix.build-mode }}
|
|
177
|
+
# Uncomment to enable stricter security queries:
|
|
178
|
+
# queries: security-extended,security-and-quality
|
|
179
|
+
|
|
180
|
+
- name: Perform CodeQL Analysis
|
|
181
|
+
uses: github/codeql-action/analyze@v4
|
|
182
|
+
with:
|
|
183
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
pull_request:
|
|
8
|
+
types:
|
|
9
|
+
- closed
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
|
|
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
|
+
|
|
33
|
+
ConfigureWorkflow:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
|
|
36
|
+
outputs:
|
|
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 }}
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- name: Configure workflow
|
|
43
|
+
id: cfg
|
|
44
|
+
run: |+
|
|
45
|
+
#############################################################
|
|
46
|
+
QUALITY_CHECK="CodeQL, Linting, Testing"
|
|
47
|
+
GIT_USER_NAME="github-actions"
|
|
48
|
+
GIT_USER_EMAIL="github-actions@github.com"
|
|
49
|
+
#############################################################
|
|
50
|
+
|
|
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"
|
|
55
|
+
|
|
56
|
+
WaitForQuality:
|
|
57
|
+
needs: ConfigureWorkflow
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
if: ${{ github.event.pull_request.merged == true }}
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- name: Wait for Quality workflow to complete
|
|
63
|
+
if: ${{ needs.ConfigureWorkflow.outputs.quality_check != '' }}
|
|
64
|
+
uses: lewagon/wait-on-check-action@v1.3.4
|
|
65
|
+
with:
|
|
66
|
+
ref: ${{ github.ref }}
|
|
67
|
+
running-workflow-name: ${{ needs.ConfigureWorkflow.outputs.quality_check }}
|
|
68
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
69
|
+
wait-interval: 10
|
|
70
|
+
|
|
71
|
+
- name: Skipping wait (no quality_check configured)
|
|
72
|
+
if: ${{ needs.ConfigureWorkflow.outputs.quality_check == '' }}
|
|
73
|
+
run: echo "No quality check configured; continuing."
|
|
74
|
+
|
|
75
|
+
DetermineVersion:
|
|
76
|
+
needs: WaitForQuality
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
if: ${{ github.event.pull_request.merged == true }}
|
|
79
|
+
|
|
80
|
+
outputs:
|
|
81
|
+
version: ${{ steps.version.outputs.VERSION }}
|
|
82
|
+
|
|
83
|
+
steps:
|
|
84
|
+
- uses: actions/checkout@v4
|
|
85
|
+
with:
|
|
86
|
+
fetch-depth: 0
|
|
87
|
+
|
|
88
|
+
- name: Determine version
|
|
89
|
+
id: check_version
|
|
90
|
+
uses: gesslar/new-version-questionmark@v1.5.5
|
|
91
|
+
with:
|
|
92
|
+
source: package.json
|
|
93
|
+
version_pattern: "^v\\d+\\.\\d+\\.\\d+$"
|
|
94
|
+
|
|
95
|
+
- name: Show result
|
|
96
|
+
id: version
|
|
97
|
+
run: |+
|
|
98
|
+
UPDATED_VERSION="${{ steps.check_version.outputs.updated_version }}"
|
|
99
|
+
|
|
100
|
+
if [[ "$UPDATED_VERSION" == "no changes" ]]; then
|
|
101
|
+
echo "VERSION=🙅🏻♂️" >> "$GITHUB_OUTPUT"
|
|
102
|
+
else
|
|
103
|
+
echo "VERSION=${UPDATED_VERSION}" >> "$GITHUB_OUTPUT"
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
CreateTag:
|
|
107
|
+
needs: DetermineVersion
|
|
108
|
+
if: ${{ needs.DetermineVersion.outputs.version != '🙅🏻♂️' }}
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
|
|
111
|
+
permissions:
|
|
112
|
+
contents: write
|
|
113
|
+
|
|
114
|
+
outputs:
|
|
115
|
+
new_tag: ${{ steps.check_tag.outputs.new_tag }}
|
|
116
|
+
|
|
117
|
+
steps:
|
|
118
|
+
- name: Checkout code
|
|
119
|
+
uses: actions/checkout@v6
|
|
120
|
+
|
|
121
|
+
- name: Setup Git Variables
|
|
122
|
+
run: |+
|
|
123
|
+
git config user.name "${{ needs.ConfigureWorkflow.outputs.git_user_name }}"
|
|
124
|
+
git config user.email "${{ needs.ConfigureWorkflow.outputs.git_user_email }}"
|
|
125
|
+
|
|
126
|
+
- name: Set up Node.js
|
|
127
|
+
uses: actions/setup-node@v6
|
|
128
|
+
with:
|
|
129
|
+
node-version: 22
|
|
130
|
+
|
|
131
|
+
- name: Install dependencies
|
|
132
|
+
run: npm install
|
|
133
|
+
|
|
134
|
+
- name: Read version from package.json
|
|
135
|
+
id: get_version
|
|
136
|
+
run: |
|
|
137
|
+
CURRENT_VERSION=${{ needs.DetermineVersion.outputs.version }}
|
|
138
|
+
|
|
139
|
+
- name: Fetch all tags
|
|
140
|
+
run: git fetch --tags
|
|
141
|
+
|
|
142
|
+
- name: Check for existing tag and create if it does not exist
|
|
143
|
+
id: check_tag
|
|
144
|
+
run: |+
|
|
145
|
+
CURRENT_VERSION="${{ needs.DetermineVersion.outputs.version }}"
|
|
146
|
+
TAG_EXISTS=$(git tag -l "v${CURRENT_VERSION}")
|
|
147
|
+
|
|
148
|
+
echo "Value of TAG_EXISTS: $TAG_EXISTS"
|
|
149
|
+
|
|
150
|
+
if [ -z "$TAG_EXISTS" ]; then
|
|
151
|
+
echo "Tag does not exist for version v${CURRENT_VERSION}. Creating tag."
|
|
152
|
+
git tag "v${CURRENT_VERSION}"
|
|
153
|
+
git push origin "v${CURRENT_VERSION}"
|
|
154
|
+
echo "new_tag=v${CURRENT_VERSION}" >> $GITHUB_OUTPUT
|
|
155
|
+
else
|
|
156
|
+
echo "Tag already exists for version v${CURRENT_VERSION}. Skipping tag creation."
|
|
157
|
+
echo "new_tag=🙅🏻♂️" >> $GITHUB_OUTPUT
|
|
158
|
+
exit 0
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
PrepareGitHubRelease:
|
|
162
|
+
needs: [ConfigureWorkflow, CreateTag]
|
|
163
|
+
runs-on: ubuntu-latest
|
|
164
|
+
if: ${{ needs.CreateTag.outputs.new_tag != '🙅🏻♂️' }}
|
|
165
|
+
|
|
166
|
+
permissions:
|
|
167
|
+
contents: write
|
|
168
|
+
|
|
169
|
+
env:
|
|
170
|
+
NEW_TAG: ${{ needs.CreateTag.outputs.new_tag }}
|
|
171
|
+
|
|
172
|
+
steps:
|
|
173
|
+
- name: Setup New Tag
|
|
174
|
+
run: |
|
|
175
|
+
echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
|
|
176
|
+
|
|
177
|
+
- name: Checkout code
|
|
178
|
+
uses: actions/checkout@v6
|
|
179
|
+
|
|
180
|
+
- name: Setup Git Variables
|
|
181
|
+
run: |
|
|
182
|
+
git config user.name "${{ needs.ConfigureWorkflow.outputs.git_user_name }}"
|
|
183
|
+
git config user.email "${{ needs.ConfigureWorkflow.outputs.git_user_email }}"
|
|
184
|
+
|
|
185
|
+
- name: Set up Node.js
|
|
186
|
+
uses: actions/setup-node@v6
|
|
187
|
+
with:
|
|
188
|
+
node-version: 22
|
|
189
|
+
|
|
190
|
+
- name: Install dependencies
|
|
191
|
+
run: npm install
|
|
192
|
+
|
|
193
|
+
- name: Build artefact
|
|
194
|
+
run: |
|
|
195
|
+
ARTEFACT=$(npm pack 2>/dev/null | tail -1)
|
|
196
|
+
echo "ARTEFACT=${ARTEFACT}" >> $GITHUB_ENV
|
|
197
|
+
|
|
198
|
+
- name: Create Release
|
|
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 }}"
|
|
206
|
+
|
|
207
|
+
PublishToNPM:
|
|
208
|
+
needs: DetermineVersion
|
|
209
|
+
if: ${{ github.event.pull_request.merged == true && needs.DetermineVersion.outputs.version != '🙅🏻♂️' }}
|
|
210
|
+
runs-on: ubuntu-latest
|
|
211
|
+
|
|
212
|
+
permissions:
|
|
213
|
+
contents: write
|
|
214
|
+
env:
|
|
215
|
+
TOKEN: ${{ secrets.NPM_GITHUB_CD_ACCESS_TOKEN }}
|
|
216
|
+
|
|
217
|
+
steps:
|
|
218
|
+
- name: Checkout code
|
|
219
|
+
uses: actions/checkout@v6
|
|
220
|
+
|
|
221
|
+
- name: Set up Node.js
|
|
222
|
+
uses: actions/setup-node@v6
|
|
223
|
+
with:
|
|
224
|
+
node-version: 22
|
|
225
|
+
|
|
226
|
+
- name: Ship it
|
|
227
|
+
run: |
|
|
228
|
+
npm publish --access public --//registry.npmjs.org/:_authToken=${TOKEN}
|
package/eslint.config.js
CHANGED
|
@@ -1,167 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import jsdoc from "eslint-plugin-jsdoc"
|
|
3
|
-
import stylistic from "@stylistic/eslint-plugin"
|
|
4
|
-
import globals from "globals"
|
|
1
|
+
import uglify from "@gesslar/uglier"
|
|
5
2
|
|
|
6
3
|
export default [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ecmaVersion: "latest",
|
|
15
|
-
sourceType: "module",
|
|
16
|
-
globals: {
|
|
17
|
-
...globals.node,
|
|
18
|
-
fetch: "readonly",
|
|
19
|
-
Headers: "readonly",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
// Add override for webview files to include browser globals
|
|
24
|
-
{
|
|
25
|
-
name: "gesslar/uglier/webview-env",
|
|
26
|
-
files: ["src/webview/**/*.{js,mjs,cjs}"],
|
|
27
|
-
languageOptions: {
|
|
28
|
-
globals: {
|
|
29
|
-
...globals.browser,
|
|
30
|
-
acquireVsCodeApi: "readonly"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
// Add override for .cjs files to treat as CommonJS
|
|
35
|
-
{
|
|
36
|
-
name: "gesslar/uglier/cjs-override",
|
|
37
|
-
files: ["src/**/*.cjs"],
|
|
38
|
-
languageOptions: {
|
|
39
|
-
sourceType: "script",
|
|
40
|
-
ecmaVersion: 2021
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
// Add override for .mjs files to treat as ES modules
|
|
44
|
-
{
|
|
45
|
-
name: "gesslar/uglier/mjs-override",
|
|
46
|
-
files: ["src/**/*.mjs"],
|
|
47
|
-
languageOptions: {
|
|
48
|
-
sourceType: "module",
|
|
49
|
-
ecmaVersion: 2021
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "gesslar/uglier/lints-js",
|
|
54
|
-
files: ["{work,src}/**/*.{mjs,cjs,js}"],
|
|
55
|
-
plugins: {
|
|
56
|
-
"@stylistic": stylistic,
|
|
57
|
-
},
|
|
58
|
-
rules: {
|
|
59
|
-
"@stylistic/arrow-parens": ["error", "as-needed"],
|
|
60
|
-
"@stylistic/arrow-spacing": ["error", { before: true, after: true }],
|
|
61
|
-
"@stylistic/brace-style": ["error", "1tbs", {allowSingleLine: false}],
|
|
62
|
-
"@stylistic/nonblock-statement-body-position": ["error", "below"],
|
|
63
|
-
"@stylistic/padding-line-between-statements": [
|
|
64
|
-
"error",
|
|
65
|
-
{blankLine: "always", prev: "if", next: "*"},
|
|
66
|
-
{blankLine: "always", prev: "*", next: "return"},
|
|
67
|
-
{blankLine: "always", prev: "while", next: "*"},
|
|
68
|
-
{blankLine: "always", prev: "for", next: "*"},
|
|
69
|
-
{blankLine: "always", prev: "switch", next: "*"},
|
|
70
|
-
{blankLine: "always", prev: "do", next: "*"},
|
|
71
|
-
// {blankLine: "always", prev: ["const", "let", "var"], next: "*"},
|
|
72
|
-
// {blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]},
|
|
73
|
-
{blankLine: "always", prev: "directive", next: "*" },
|
|
74
|
-
{blankLine: "any", prev: "directive", next: "directive" },
|
|
75
|
-
],
|
|
76
|
-
"@stylistic/eol-last": ["error", "always"],
|
|
77
|
-
"@stylistic/indent": ["error", 2, {
|
|
78
|
-
SwitchCase: 1 // Indents `case` statements one level deeper than `switch`
|
|
79
|
-
}],
|
|
80
|
-
"@stylistic/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
81
|
-
"@stylistic/keyword-spacing": ["error", {
|
|
82
|
-
before: false,
|
|
83
|
-
after: true,
|
|
84
|
-
overrides: {
|
|
85
|
-
// Control statements
|
|
86
|
-
return: { before: true, after: true },
|
|
87
|
-
if: { after: false },
|
|
88
|
-
else: { before: true, after: true },
|
|
89
|
-
for: { after: false },
|
|
90
|
-
while: { before: true, after: false },
|
|
91
|
-
do: { after: true },
|
|
92
|
-
switch: { after: false },
|
|
93
|
-
case: { before: true, after: true },
|
|
94
|
-
throw: { before: true, after: false } ,
|
|
95
|
-
|
|
96
|
-
// Keywords
|
|
97
|
-
as: { before: true, after: true },
|
|
98
|
-
of: { before: true, after: true },
|
|
99
|
-
from: { before: true, after: true },
|
|
100
|
-
async: { before: true, after: true },
|
|
101
|
-
await: { before: true, after: false },
|
|
102
|
-
class: { before: true, after: true },
|
|
103
|
-
const: { before: true, after: true },
|
|
104
|
-
let: { before: true, after: true },
|
|
105
|
-
var: { before: true, after: true },
|
|
106
|
-
|
|
107
|
-
// Exception handling
|
|
108
|
-
catch: { before: true, after: true },
|
|
109
|
-
finally: { before: true, after: true },
|
|
110
|
-
}
|
|
111
|
-
}],
|
|
112
|
-
// Blocks
|
|
113
|
-
"@stylistic/space-before-blocks": ["error", "always"],
|
|
114
|
-
"@stylistic/max-len": ["warn", {
|
|
115
|
-
code: 80,
|
|
116
|
-
ignoreComments: true,
|
|
117
|
-
ignoreUrls: true,
|
|
118
|
-
ignoreStrings: true,
|
|
119
|
-
ignoreTemplateLiterals: true,
|
|
120
|
-
ignoreRegExpLiterals: true,
|
|
121
|
-
tabWidth: 2
|
|
122
|
-
}],
|
|
123
|
-
"@stylistic/no-tabs": "error",
|
|
124
|
-
"@stylistic/no-trailing-spaces": ["error"],
|
|
125
|
-
"@stylistic/object-curly-spacing": ["error", "never", {
|
|
126
|
-
objectsInObjects: false,
|
|
127
|
-
arraysInObjects: false
|
|
128
|
-
}],
|
|
129
|
-
"@stylistic/quotes": ["error", "double", {
|
|
130
|
-
avoidEscape: true,
|
|
131
|
-
allowTemplateLiterals: "always"
|
|
132
|
-
}],
|
|
133
|
-
"@stylistic/semi": ["error", "never"],
|
|
134
|
-
"@stylistic/space-before-function-paren": ["error", "never"],
|
|
135
|
-
"@stylistic/yield-star-spacing": ["error", { before: true, after: false }],
|
|
136
|
-
"constructor-super": "error",
|
|
137
|
-
"no-unexpected-multiline": "error",
|
|
138
|
-
"no-unused-vars": ["error", {
|
|
139
|
-
caughtErrors: "all",
|
|
140
|
-
caughtErrorsIgnorePattern: "^_+",
|
|
141
|
-
argsIgnorePattern: "^_+",
|
|
142
|
-
destructuredArrayIgnorePattern: "^_+",
|
|
143
|
-
varsIgnorePattern: "^_+"
|
|
144
|
-
}],
|
|
145
|
-
"no-useless-assignment": "error",
|
|
146
|
-
"prefer-const": "error",
|
|
147
|
-
"@stylistic/no-multiple-empty-lines": ["error", { max: 1 }],
|
|
148
|
-
"@stylistic/array-bracket-spacing": ["error", "never"],
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
name: "gesslar/uglier/lints-jsdoc",
|
|
153
|
-
files: ["{work,src}/**/*.{mjs,cjs,js}"],
|
|
154
|
-
plugins: {
|
|
155
|
-
jsdoc,
|
|
156
|
-
},
|
|
157
|
-
rules: {
|
|
158
|
-
"jsdoc/require-description": "error",
|
|
159
|
-
"jsdoc/tag-lines": ["error", "any", {"startLines":1}],
|
|
160
|
-
"jsdoc/require-jsdoc": ["error", { publicOnly: true }],
|
|
161
|
-
"jsdoc/check-tag-names": "error",
|
|
162
|
-
"jsdoc/check-types": "error",
|
|
163
|
-
"jsdoc/require-param-type": "error",
|
|
164
|
-
"jsdoc/require-returns-type": "error"
|
|
165
|
-
}
|
|
166
|
-
}
|
|
4
|
+
...uglify({
|
|
5
|
+
with: [
|
|
6
|
+
"lints-js", // default files: ["**/*.{js,mjs,cjs}"]
|
|
7
|
+
"lints-jsdoc", // default files: ["**/*.{js,mjs,cjs}"]
|
|
8
|
+
"node", // default files: ["**/*.{js,mjs,cjs}"]
|
|
9
|
+
]
|
|
10
|
+
})
|
|
167
11
|
]
|
package/package.json
CHANGED
|
@@ -1,43 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gesslar/lpc-mcp",
|
|
3
|
-
"version": "0.1.5",
|
|
4
3
|
"description": "MCP server for LPC language server",
|
|
4
|
+
"author": "gesslar",
|
|
5
|
+
"version": "1.1.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/gesslar/lpc-mcp.git"
|
|
9
|
+
},
|
|
5
10
|
"main": "index.js",
|
|
6
11
|
"type": "module",
|
|
7
12
|
"bin": {
|
|
8
13
|
"lpc-mcp": "./src/index.js"
|
|
9
14
|
},
|
|
10
15
|
"engines": {
|
|
11
|
-
"node": ">=
|
|
16
|
+
"node": ">=22"
|
|
12
17
|
},
|
|
18
|
+
"packageManager": "pnpm@10.26.2",
|
|
13
19
|
"scripts": {
|
|
14
20
|
"start": "node src/index.js",
|
|
15
21
|
"types:build": "tsc -p tsconfig.types.json",
|
|
16
22
|
"lint": "eslint src/",
|
|
17
23
|
"lint:fix": "eslint src/ --fix",
|
|
18
|
-
"submit": "
|
|
19
|
-
"update": "
|
|
20
|
-
"pr": "gt submit
|
|
21
|
-
"patch": "
|
|
22
|
-
"minor": "
|
|
23
|
-
"major": "
|
|
24
|
+
"submit": "pnpm publish --access public --//registry.npmjs.org/:_authToken=\"${NPM_ACCESS_TOKEN}\"",
|
|
25
|
+
"update": "pnpm up -L",
|
|
26
|
+
"pr": "gt submit -p --ai",
|
|
27
|
+
"patch": "pnpm version patch",
|
|
28
|
+
"minor": "pnpm version minor",
|
|
29
|
+
"major": "pnpm version major"
|
|
24
30
|
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
"keywords": [
|
|
32
|
+
"fluffos",
|
|
33
|
+
"lpc",
|
|
34
|
+
"mud",
|
|
35
|
+
"mcp",
|
|
36
|
+
"model-context-protocol",
|
|
37
|
+
"shlemiel",
|
|
38
|
+
"schlemazel",
|
|
39
|
+
"hasenpfeffer",
|
|
40
|
+
"incorporated"
|
|
41
|
+
],
|
|
31
42
|
"license": "Unlicense",
|
|
32
43
|
"homepage": "https://github.com/gesslar/lpc-mcp#readme",
|
|
33
44
|
"dependencies": {
|
|
34
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
45
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
35
46
|
"vscode-jsonrpc": "^8.2.1"
|
|
36
47
|
},
|
|
37
48
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"eslint-plugin-jsdoc": "^61.1.11",
|
|
41
|
-
"globals": "^16.5.0"
|
|
49
|
+
"@gesslar/uglier": "^0.0.9",
|
|
50
|
+
"eslint": "^9.39.2"
|
|
42
51
|
}
|
|
43
52
|
}
|
package/src/index.js
CHANGED
|
File without changes
|
package/test.txt
ADDED
package/.github/workflows/ci.yml
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Giddyup
|
|
2
|
-
permissions:
|
|
3
|
-
contents: read
|
|
4
|
-
|
|
5
|
-
on:
|
|
6
|
-
push:
|
|
7
|
-
branches: [main]
|
|
8
|
-
pull_request:
|
|
9
|
-
branches: [main]
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
cowyboysounds:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
strategy:
|
|
16
|
-
matrix:
|
|
17
|
-
node-version: [20.x, 22.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 ESLint
|
|
33
|
-
run: npm run lint
|