Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
368 lines (368 loc) · 14.2 KB
/
Copy pathpackage.json
File metadata and controls
368 lines (368 loc) · 14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
{
"name": "gitlab-component-helper",
"displayName": "GitLab Component Helper",
"description": "Provides intellisense for GitLab CI components",
"version": "0.18.1",
"icon": "images/icon.png",
"engines": {
"node": ">=22.0.0",
"vscode": ">=1.120.0"
},
"publisher": "eFAILution",
"repository": {
"type": "git",
"url": "https://github.com/eFAILution/gitlab-component-helper.git"
},
"main": "./out/extension.js",
"activationEvents": [
"onLanguage:yaml",
"onLanguage:shellscript",
"workspaceContains:**/.gitlab-ci.yml",
"workspaceContains:**/.gitlab-ci.yaml",
"workspaceContains:**/.gitlab/**/*.yml",
"workspaceContains:**/.gitlab/**/*.yaml"
],
"extensionPack": [
"redhat.vscode-yaml"
],
"contributes": {
"configuration": {
"title": "GitLab Component Helper",
"properties": {
"gitlabComponentHelper.gitlabToken": {
"type": "string",
"default": "",
"description": "GitLab API access token (DEPRECATED - stored in plain text). Use the 'GitLab CI: Add Component Project/Group' command instead, which stores tokens encrypted via VS Code SecretStorage.",
"deprecationMessage": "Tokens stored here live in plain text in settings.json. Run the 'GitLab CI: Add Component Project/Group' command to migrate to encrypted SecretStorage, then clear this field.",
"markdownDescription": "**Deprecated:** Tokens stored here live in plain text in `settings.json`. Run the **GitLab CI: Add Component Project/Group** command instead - it stores tokens encrypted via VS Code SecretStorage. Once migrated, clear this field."
},
"gitlabComponentHelper.cacheTime": {
"type": "number",
"default": 3600,
"description": "Cache time for components in seconds"
},
"gitlabComponentHelper.logLevel": {
"type": "string",
"enum": [
"DEBUG",
"INFO",
"WARN",
"ERROR"
],
"default": "ERROR",
"description": "Logging level for component service"
},
"gitlabComponentHelper.autoShowOutput": {
"type": "boolean",
"default": false,
"description": "Automatically show output channel when log level changes (disabled during development)"
},
"gitlabComponentHelper.httpTimeout": {
"type": "number",
"default": 10000,
"description": "HTTP request timeout in milliseconds"
},
"gitlabComponentHelper.retryAttempts": {
"type": "number",
"default": 3,
"description": "Number of retry attempts for failed HTTP requests"
},
"gitlabComponentHelper.batchSize": {
"type": "number",
"default": 5,
"description": "Number of components to process in parallel batches"
},
"gitlabComponentHelper.componentSources": {
"type": "array",
"default": [
{
"name": "GitLab CI Examples",
"path": "gitlab-org/gitlab-foss",
"gitlabInstance": "gitlab.com"
},
{
"name": "OpenTofu Components",
"path": "components/opentofu",
"gitlabInstance": "gitlab.com"
},
{
"name": "Detect Secrets Components",
"path": "components/detect-secrets",
"gitlabInstance": "gitlab.com"
}
],
"description": "GitLab repositories containing reusable CI/CD components",
"items": {
"type": "object",
"required": [
"name",
"path"
],
"properties": {
"name": {
"type": "string",
"description": "Display name for the component source"
},
"path": {
"type": "string",
"description": "GitLab project path (e.g., 'group/project')"
},
"gitlabInstance": {
"type": "string",
"default": "gitlab.com",
"description": "GitLab instance hostname"
},
"tagPattern": {
"type": "string",
"description": "Tag pattern for a tag-per-component monorepo, describing how tags embed the component name and version. Use the tokens {name} (the component/directory name) and {version} (the version shown in the dropdown); {version} matches anything starting with a digit. Examples: '{name}-{version}', 'apps/{name}/v{version}', '{name}_{version}'. When set, each component's versions are scoped to its own tags; leave unset for ordinary single-component repositories."
},
"discovery": {
"type": "object",
"description": "Per-source discovery overrides (uses gitlabComponentHelper.discovery.* defaults if omitted)",
"properties": {
"templateRoots": {
"type": "array",
"items": {
"type": "string"
},
"description": "Repository directories to scan for components"
},
"maxDepth": {
"type": "number",
"minimum": 0,
"maximum": 3,
"description": "Subdirectory depth to recurse under each template root"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Filename globs (e.g. '*.yml'); path globs are not supported"
},
"templateFileNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "Filenames recognised inside per-component subfolders (e.g. 'template.yml')"
}
}
}
}
}
},
"gitlabComponentHelper.discovery.templateRoots": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"templates"
],
"description": "Repository directories scanned for components when cataloguing a source. Up to 5 entries.",
"maxItems": 5
},
"gitlabComponentHelper.discovery.maxDepth": {
"type": "number",
"default": 1,
"minimum": 0,
"maximum": 3,
"description": "Subdirectory depth to recurse under each template root. 0 = root only, 1 = one level (default, matches GitLab spec)."
},
"gitlabComponentHelper.discovery.filePatterns": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"*.yml",
"*.yaml"
],
"description": "Filename globs identifying component template files. Filename only, no path globs."
},
"gitlabComponentHelper.discovery.templateFileNames": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"template.yml",
"template.yaml"
],
"description": "Filenames recognised inside per-component subfolders, e.g. 'templates/foo/template.yml'."
},
"gitlabComponentHelper.additionalFileGlobs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Extra GitLab CI file globs, merged with the built-in defaults. Patterns match at any directory depth (e.g. 'ci/*.yml' is treated as '**/ci/*.yml')."
},
"gitlabComponentHelper.versionCheck.enabled": {
"type": "boolean",
"default": true,
"description": "Warn when a component pinned to a semantic version (X.Y.Z) has a newer stable release available. Checked when a GitLab CI file is opened or saved."
},
"gitlabComponentHelper.versionCheck.severity": {
"type": "string",
"enum": [
"warning",
"information"
],
"default": "warning",
"description": "Severity of the 'newer component version available' diagnostic."
},
"gitlabComponentHelper.versionPreferences": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"default": {},
"markdownDescription": "Version that completion and the Component Browser offer for a component, keyed by `<instance>/<project path>/<component>`, for example `gitlab.com/components/opentofu/full-pipeline`. The value is a version, or `~latest` for the highest stable version available when you insert. Set from the Component Browser by right-clicking a version dropdown and choosing **Set as Default Version** or **Always Use Latest**."
}
}
},
"commands": [
{
"command": "gitlab-component-helper.browseComponents",
"title": "GitLab CI: Browse Components"
},
{
"command": "gitlab-component-helper.refreshComponents",
"title": "GitLab CI: Refresh Components Cache"
},
{
"command": "gitlab-component-helper.updateCache",
"title": "GitLab CI: Update Cache"
},
{
"command": "gitlab-component-helper.resetCache",
"title": "GitLab CI: Reset Cache"
},
{
"command": "gitlab-component-helper.showCacheStatus",
"title": "GitLab CI: Show Cache Status"
},
{
"command": "gitlab-component-helper.debugCache",
"title": "GitLab CI: Debug Cache (Detailed)"
},
{
"command": "gitlab-component-helper.testProviders",
"title": "GitLab CI: Test Providers"
},
{
"command": "gitlabComponentHelper.addProjectToken",
"title": "GitLab CI: Add Component Project/Group"
},
{
"command": "gitlab-component-helper.showPerformanceStats",
"title": "GitLab CI: Show Performance Statistics"
},
{
"command": "gitlab-component-helper.updateAllComponentVersions",
"title": "GitLab CI: Update All Component Versions to Latest"
}
],
"menus": {
"editor/context": [
{
"when": "gitlabComponentHelper.isCiFile",
"command": "gitlab-component-helper.browseComponents",
"group": "navigation"
},
{
"when": "gitlabComponentHelper.isCiFile",
"command": "gitlab-component-helper.updateAllComponentVersions",
"group": "navigation"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "npm run check-types && node esbuild.js",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "npm run check-types && node esbuild.js --production",
"check-types": "tsc --noEmit && tsc --noEmit --project tsconfig.tests.json && tsc --noEmit --project src/webview/client",
"lint": "npm-run-all -c lint:eslint lint:stylelint",
"lint:eslint": "eslint --max-warnings 0",
"lint:stylelint": "stylelint \"src/webview/**/*.css\"",
"lint:ci": "npm-run-all -c lint:ci:*",
"lint:ci:eslint": "eslint --max-warnings 0 --format gha",
"lint:ci:stylelint": "stylelint \"src/webview/**/*.css\" --custom-formatter @csstools/stylelint-formatter-github",
"pretest": "npm run compile",
"prepare": "husky",
"test": "mocha",
"test:all": "npm test && npm run test:extension-host",
"pretest:extension-host": "rm -rf out-test && npm run compile && tsc --project tsconfig.test.json",
"test:extension-host": "node out-test/runTest.js",
"release": "release-it",
"release:beta": "release-it --config .release-it.beta.json",
"release:main": "release-it --config .release-it.json",
"release:beta:dry": "release-it --config .release-it.beta.json --dry-run",
"release:main:dry": "release-it --config .release-it.json --dry-run",
"setup:github-token": "./scripts/setup-github-token.sh",
"release:version-only": "node scripts/version-bump.js",
"release:dry": "node scripts/manual-release.js --dry-run",
"release:local": "./scripts/release.sh",
"release:local-only": "npm run release:manual",
"release:manual": "node scripts/manual-release.js",
"release:publish": "./scripts/publish-release.sh",
"release:complete": "./scripts/release-and-publish.sh",
"commitizen": "commitizen init cz-conventional-changelog --save-dev --save-exact --force"
},
"devDependencies": {
"@commitlint/cli": "^21.2.3",
"@commitlint/config-conventional": "^21.0.2",
"@csstools/stylelint-formatter-github": "^2.0.0",
"@digitalroute/cz-conventional-changelog-for-jira": "^8.0.1",
"@eslint/js": "^10.0.1",
"@octokit/core": "^7.0.8",
"@octokit/plugin-paginate-rest": "^15.0.0",
"@release-it/conventional-changelog": "^12.0.2",
"@types/glob": "^9.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^26.6.2",
"@types/vscode": "^1.120.0",
"@types/vscode-webview": "^1.57.5",
"@typescript-eslint/eslint-plugin": "^8.70.1",
"@typescript-eslint/parser": "^8.70.1",
"@vscode/test-electron": "^3.1.0",
"commitizen": "^4.3.2",
"conventional-changelog-conventionalcommits": "^9.3.1",
"cz-conventional-changelog": "^3.3.0",
"cz-emoji-conventional": "^1.3.0",
"dateformat": "^5.0.3",
"dotenv": "^18.0.3",
"esbuild": "^0.28.2",
"eslint": "^10.11.0",
"eslint-formatter-gha": "^2.0.1",
"globals": "^17.12.0",
"husky": "^9.1.6",
"is-ci": "^4.0.0",
"js-yaml": "^5.4.2",
"minimatch": "^10.2.6",
"mocha": "^12.0.2",
"npm-run-all": "^4.1.5",
"release-it": "^21.1.0",
"semver": "^7.8.5",
"stylelint": "^17.15.0",
"stylelint-config-standard": "^40.0.0",
"tsx": "^4.23.15",
"typescript": "^6.0.3",
"typescript-eslint": "^8.70.1"
},
"keywords": [],
"author": "eFAILution",
"license": "MIT",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}