-
Notifications
You must be signed in to change notification settings - Fork 261
/
Copy pathpackage.json
291 lines (291 loc) · 9.04 KB
/
package.json
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
{
"name": "typespec-vscode",
"version": "0.67.1",
"author": "Microsoft Corporation",
"description": "TypeSpec language support for VS Code",
"homepage": "https://typespec.io",
"readme": "https://github.com/microsoft/typespec/blob/main/README.md",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/microsoft/typespec.git"
},
"bugs": {
"url": "https://github.com/microsoft/typespec/issues"
},
"keywords": [
"typespec"
],
"preview": false,
"publisher": "typespec",
"displayName": "TypeSpec",
"categories": [
"Programming Languages",
"Snippets"
],
"type": "module",
"main": "./dist/src/extension.cjs",
"browser": "./dist/src/web/extension.js",
"engines": {
"vscode": "^1.98.0"
},
"activationEvents": [
"onLanguage:typespec",
"onCommand:typespec.restartServer",
"onCommand:typespec.createProject",
"workspaceContains:**/tspconfig.yaml"
],
"icon": "./icons/logo.png",
"telemetryKey": "00000000-0000-0000-0000-000000000000",
"contributes": {
"viewsWelcome": [
{
"view": "explorer",
"contents": "You may [open a folder](command:vscode.openFolder) of an existing TypeSpec project; or create a new TypeSpec project in VS Code.\n[Create TypeSpec Project](command:typespec.createProject)\nTo manually create a TypeSpec project, follow [this guide](https://typespec.io/docs/).",
"when": "!workspaceFolderCount"
}
],
"languages": [
{
"id": "typespec",
"aliases": [
"TypeSpec",
"TYPESPEC"
],
"extensions": [
".tsp"
],
"icon": {
"light": "./icons/tsp-file.light.svg",
"dark": "./icons/tsp-file.dark.svg"
},
"configuration": "./dist/language-configuration.json"
},
{
"id": "markdown-typespec"
}
],
"configuration": [
{
"title": "TypeSpec",
"properties": {
"typespec.tsp-server.path": {
"type": "string",
"default": "",
"description": "Path to 'tsp-server' command that runs the TypeSpec language server. If not specified, then 'tsp-server' will be resolved in following sequence:\n\n1. from workspace node_modules folder\nExample: ${workspaceFolder}/node_modules/@typespec/compiler\n\n2. from PATH environment variable\nExample: /usr/local/bin/tsp-server",
"scope": "machine-overridable"
},
"typespec.initTemplatesUrls": {
"type": "array",
"default": [],
"description": "List of URLs to fetch templates from when creating a new project.\n\nExample:\n\"typespec.initTemplatesUrls\": [{\n\"name\": \"displayName\",\n\"url\": \"https://urlToTheFileContainsTemplates\"\n}],",
"scope": "machine-overridable",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the template."
},
"url": {
"type": "string",
"description": "URL to fetch the template from."
}
},
"additionalProperties": false
}
},
"typespec.trace.server": {
"scope": "window",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Define whether/how the TypeSpec language server should send traces to client. For the traces to show properly in vscode Output, make sure 'Log Level' is also set to 'Trace' so that they won't be filtered at client side, which can be set through 'Developer: Set Log Level...' command."
}
}
}
],
"menus": {
"explorer/context": [
{
"command": "typespec.importFromOpenApi3",
"group": "typespec@3"
},
{
"command": "typespec.emitCode",
"when": "explorerResourceIsFolder || resourceLangId == typespec",
"group": "typespec@1"
},
{
"command": "typespec.showOpenApi3",
"when": "resourceLangId == typespec",
"group": "typespec@2"
}
],
"editor/context": [
{
"command": "typespec.emitCode",
"when": "resourceLangId == typespec",
"group": "typespec@1"
},
{
"command": "typespec.showOpenApi3",
"when": "resourceLangId == typespec",
"group": "typespec@2"
}
]
},
"grammars": [
{
"language": "typespec",
"scopeName": "source.tsp",
"path": "./dist/typespec.tmLanguage"
},
{
"language": "markdown-typespec",
"scopeName": "markdown.tsp.codeblock",
"path": "./markdown-typespec.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.tsp": "typespec"
}
}
],
"commands": [
{
"command": "typespec.restartServer",
"title": "Restart TypeSpec server",
"category": "TypeSpec"
},
{
"command": "typespec.showOutputChannel",
"title": "Show Output Channel",
"category": "TypeSpec"
},
{
"command": "typespec.emitCode",
"title": "Emit from TypeSpec",
"category": "TypeSpec"
},
{
"command": "typespec.createProject",
"title": "Create TypeSpec Project",
"category": "TypeSpec"
},
{
"command": "typespec.installGlobalCompilerCli",
"title": "Install TypeSpec Compiler/CLI globally",
"category": "TypeSpec"
},
{
"command": "typespec.importFromOpenApi3",
"title": "Import TypeSpec from OpenAPI 3",
"category": "TypeSpec"
},
{
"command": "typespec.showOpenApi3",
"title": "Preview API Documentation",
"category": "TypeSpec"
}
],
"semanticTokenScopes": [
{
"scopes": {
"keyword": [
"keyword.other.tsp"
],
"macro": [
"entity.name.tag.tsp"
],
"docCommentTag": [
"keyword.other.tsp"
]
}
}
],
"taskDefinitions": [
{
"type": "typespec",
"when": "shellExecutionSupported",
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"description": "The path to trigger tsp compile"
},
"args": {
"type": "string",
"description": "The arguments to tsp compile"
}
}
}
],
"snippets": [
{
"language": "typespec",
"path": "./snippets.json"
}
]
},
"scripts": {
"clean": "rimraf ./dist ./temp",
"build": "npm run compile && npm run copy-templates && npm run copy-tmlanguage && npm run generate-language-configuration && npm run generate-third-party-notices && npm run package-vsix",
"compile": "rollup --config rollup.config.ts --configPlugin typescript --failAfterWarnings 2>&1",
"watch": "rollup --config rollup.config.ts --configPlugin typescript --watch",
"dogfood": "node scripts/dogfood.js",
"copy-templates": "node scripts/copy-templates.js",
"copy-tmlanguage": "node scripts/copy-tmlanguage.js",
"generate-language-configuration": "node scripts/generate-language-configuration.js",
"generate-third-party-notices": "typespec-build-tool generate-third-party-notices",
"update-telemetry-key": "node scripts/update-telemetry-key.js",
"package-vsix": "vsce package",
"deploy": "vsce publish",
"open-in-browser": "vscode-test-web --extensionDevelopmentPath=. .",
"test:e2e": "pnpm test:web",
"test:web": "vscode-test-web --extensionDevelopmentPath=. --headless --extensionTestsPath=dist/test/web/suite.js ./test/web/data"
},
"devDependencies": {
"@rollup/plugin-commonjs": "~28.0.3",
"@rollup/plugin-json": "~6.1.0",
"@rollup/plugin-node-resolve": "~16.0.1",
"@rollup/plugin-typescript": "~12.1.2",
"@types/mocha": "^10.0.9",
"@types/node": "~22.13.11",
"@types/semver": "^7.5.8",
"@types/vscode": "~1.98.0",
"@types/which": "^3.0.4",
"@typespec/compiler": "workspace:^",
"@typespec/internal-build-utils": "workspace:^",
"@vitest/coverage-v8": "^3.0.9",
"@vitest/ui": "^3.0.9",
"@vscode/extension-telemetry": "^0.9.8",
"@vscode/test-web": "^0.0.67",
"@vscode/vsce": "~3.3.0",
"playwright": "^1.51.1",
"ajv": "~8.17.1",
"c8": "^10.1.3",
"mocha": "^11.1.0",
"rimraf": "~6.0.1",
"rollup": "~4.36.0",
"rollup-plugin-copy": "^3.5.0",
"semver": "^7.7.1",
"swagger-ui-dist": "^5.20.1",
"typescript": "~5.8.2",
"vitest": "^3.0.9",
"vscode-languageclient": "~9.0.1",
"which": "^5.0.0",
"yaml": "~2.7.0"
}
}