typespec-vscode 0.41.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # TypeSpec Language Support for VS Code
2
+
3
+ This provides provides [TypeSpec](https://github.com/microsoft/typespec) language support for VS Code.
4
+
5
+ See https://github.com/microsoft/typespec#installing-vs-code-extension for installation instructions.
6
+
7
+ **NOTE**: The npm package is used as an implementation detail of the `tsp vscode` command that installs the Visual Studio TypeSpec extension, and not intended to be used for other purposes.
8
+
9
+ ## Configure VSCode extension
10
+
11
+ TypeSpec wil interpolate a few variables using this pattern `${<name>}`. For example `${workspaceFolder}`.
12
+
13
+ Available variables:
14
+
15
+ - `workspaceFolder`: Corespond to the root of your Visual Studio workspace.
16
+
17
+ ### `typespec.tsp-server.path`: Configure the server path
18
+
19
+ There are cases where the TypeSpec project is located in a subfolder. In such cases, the TypeSpec extension is not able to find the tsp compiler automatically and needs a little guidance.
20
+ This setting provides the ability to configure where the tsp compiler is located.
21
+
22
+ ```json
23
+ {
24
+ "typespec.tsp-server.path": "${workspaceFolder}/my-nested-project/node_modules/@typespec/compiler"
25
+ }
26
+ ```
@@ -0,0 +1,186 @@
1
+ typespec-vscode
2
+
3
+ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
4
+ Do Not Translate or Localize
5
+
6
+ This project incorporates components from the projects listed below. The
7
+ original copyright notices and the licenses under which Microsoft received such
8
+ components are set forth below. Microsoft reserves all rights not expressly
9
+ granted herein, whether by implication, estoppel or otherwise.
10
+
11
+ 1. balanced-match version 1.0.2 (https://github.com/juliangruber/balanced-match)
12
+ 2. brace-expansion version 1.1.11 (https://github.com/juliangruber/brace-expansion)
13
+ 3. concat-map version 0.0.1 (https://github.com/substack/node-concat-map)
14
+ 4. lru-cache version 6.0.0 (https://github.com/isaacs/node-lru-cache)
15
+ 5. minimatch version 3.1.2 (https://github.com/isaacs/minimatch)
16
+ 6. semver version 7.3.8 (https://github.com/npm/node-semver)
17
+ 7. yallist version 4.0.0 (https://github.com/isaacs/yallist)
18
+
19
+
20
+ %% balanced-match NOTICES AND INFORMATION BEGIN HERE
21
+ =====================================================
22
+ (MIT)
23
+
24
+ Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
25
+
26
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
27
+ this software and associated documentation files (the "Software"), to deal in
28
+ the Software without restriction, including without limitation the rights to
29
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
30
+ of the Software, and to permit persons to whom the Software is furnished to do
31
+ so, subject to the following conditions:
32
+
33
+ The above copyright notice and this permission notice shall be included in all
34
+ copies or substantial portions of the Software.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42
+ SOFTWARE.
43
+
44
+ =====================================================");
45
+ END OF balanced-match NOTICES AND INFORMATION
46
+
47
+
48
+ %% brace-expansion NOTICES AND INFORMATION BEGIN HERE
49
+ =====================================================
50
+ MIT License
51
+
52
+ Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
53
+
54
+ Permission is hereby granted, free of charge, to any person obtaining a copy
55
+ of this software and associated documentation files (the "Software"), to deal
56
+ in the Software without restriction, including without limitation the rights
57
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
58
+ copies of the Software, and to permit persons to whom the Software is
59
+ furnished to do so, subject to the following conditions:
60
+
61
+ The above copyright notice and this permission notice shall be included in all
62
+ copies or substantial portions of the Software.
63
+
64
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
68
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
69
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
70
+ SOFTWARE.
71
+
72
+ =====================================================");
73
+ END OF brace-expansion NOTICES AND INFORMATION
74
+
75
+
76
+ %% concat-map NOTICES AND INFORMATION BEGIN HERE
77
+ =====================================================
78
+ This software is released under the MIT license:
79
+
80
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
81
+ this software and associated documentation files (the "Software"), to deal in
82
+ the Software without restriction, including without limitation the rights to
83
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
84
+ the Software, and to permit persons to whom the Software is furnished to do so,
85
+ subject to the following conditions:
86
+
87
+ The above copyright notice and this permission notice shall be included in all
88
+ copies or substantial portions of the Software.
89
+
90
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
92
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
93
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
94
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
95
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
96
+
97
+ =====================================================");
98
+ END OF concat-map NOTICES AND INFORMATION
99
+
100
+
101
+ %% lru-cache NOTICES AND INFORMATION BEGIN HERE
102
+ =====================================================
103
+ The ISC License
104
+
105
+ Copyright (c) Isaac Z. Schlueter and Contributors
106
+
107
+ Permission to use, copy, modify, and/or distribute this software for any
108
+ purpose with or without fee is hereby granted, provided that the above
109
+ copyright notice and this permission notice appear in all copies.
110
+
111
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
112
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
113
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
114
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
115
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
116
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
117
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
118
+
119
+ =====================================================");
120
+ END OF lru-cache NOTICES AND INFORMATION
121
+
122
+
123
+ %% minimatch NOTICES AND INFORMATION BEGIN HERE
124
+ =====================================================
125
+ The ISC License
126
+
127
+ Copyright (c) Isaac Z. Schlueter and Contributors
128
+
129
+ Permission to use, copy, modify, and/or distribute this software for any
130
+ purpose with or without fee is hereby granted, provided that the above
131
+ copyright notice and this permission notice appear in all copies.
132
+
133
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
134
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
135
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
136
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
137
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
138
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
139
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
140
+
141
+ =====================================================");
142
+ END OF minimatch NOTICES AND INFORMATION
143
+
144
+
145
+ %% semver NOTICES AND INFORMATION BEGIN HERE
146
+ =====================================================
147
+ The ISC License
148
+
149
+ Copyright (c) Isaac Z. Schlueter and Contributors
150
+
151
+ Permission to use, copy, modify, and/or distribute this software for any
152
+ purpose with or without fee is hereby granted, provided that the above
153
+ copyright notice and this permission notice appear in all copies.
154
+
155
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
156
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
157
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
158
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
159
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
160
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
161
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
162
+
163
+ =====================================================");
164
+ END OF semver NOTICES AND INFORMATION
165
+
166
+
167
+ %% yallist NOTICES AND INFORMATION BEGIN HERE
168
+ =====================================================
169
+ The ISC License
170
+
171
+ Copyright (c) Isaac Z. Schlueter and Contributors
172
+
173
+ Permission to use, copy, modify, and/or distribute this software for any
174
+ purpose with or without fee is hereby granted, provided that the above
175
+ copyright notice and this permission notice appear in all copies.
176
+
177
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
178
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
179
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
180
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
181
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
182
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
183
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
184
+
185
+ =====================================================");
186
+ END OF yallist NOTICES AND INFORMATION
package/package.json ADDED
@@ -0,0 +1,139 @@
1
+ {
2
+ "name": "typespec-vscode",
3
+ "version": "0.41.0",
4
+ "author": "Microsoft Corporation",
5
+ "description": "TypeSpec Language Support for VS Code",
6
+ "homepage": "https://microsoft.github.io/typespec",
7
+ "readme": "https://github.com/Microsoft/typespec/blob/master/README.md",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Microsoft/typespec.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Microsoft/typespec/issues"
15
+ },
16
+ "keywords": [
17
+ "typespec"
18
+ ],
19
+ "publisher": "Microsoft",
20
+ "displayName": "TypeSpec Language Support for VS Code",
21
+ "categories": [
22
+ "Programming Languages"
23
+ ],
24
+ "type": "commonjs",
25
+ "main": "./extension-shim.js",
26
+ "engines": {
27
+ "vscode": "^1.53.0"
28
+ },
29
+ "activationEvents": [
30
+ "onLanguage:typespec",
31
+ "onCommand:typespec.restartServer"
32
+ ],
33
+ "files": [
34
+ "typespec-vscode-*.vsix",
35
+ "ThirdPartyNotices.txt"
36
+ ],
37
+ "contributes": {
38
+ "languages": [
39
+ {
40
+ "id": "typespec",
41
+ "aliases": [
42
+ "TypeSpec",
43
+ "TYPESPEC"
44
+ ],
45
+ "extensions": [
46
+ ".tsp"
47
+ ],
48
+ "configuration": "./dist/language-configuration.json"
49
+ },
50
+ {
51
+ "id": "markdown-typespec"
52
+ }
53
+ ],
54
+ "configuration": [
55
+ {
56
+ "title": "TypeSpec Language Server Path",
57
+ "properties": {
58
+ "typespec.tsp-server.path": {
59
+ "type": "string",
60
+ "default": "",
61
+ "description": "Path to `tsp-server` command that runs the TypeSpec language server.\n\nIf not specified, then `tsp-server` found on PATH is used.\n\nExample (User): /usr/local/bin/tsp-server\nExample (Workspace): ${workspaceFolder}/node_modules/@typespec/compiler",
62
+ "scope": "machine-overridable"
63
+ }
64
+ }
65
+ }
66
+ ],
67
+ "grammars": [
68
+ {
69
+ "language": "typespec",
70
+ "scopeName": "source.tsp",
71
+ "path": "./dist/typespec.tmLanguage"
72
+ },
73
+ {
74
+ "language": "markdown-typespec",
75
+ "scopeName": "markdown.tsp.codeblock",
76
+ "path": "./markdown-typespec.json",
77
+ "injectTo": [
78
+ "text.html.markdown"
79
+ ],
80
+ "embeddedLanguages": {
81
+ "meta.embedded.block.tsp": "typespec"
82
+ }
83
+ }
84
+ ],
85
+ "commands": [
86
+ {
87
+ "command": "typespec.restartServer",
88
+ "title": "Restart TypeSpec server",
89
+ "category": "TypeSpec"
90
+ }
91
+ ],
92
+ "semanticTokenScopes": [
93
+ {
94
+ "scopes": {
95
+ "keyword": [
96
+ "keyword.other.tsp"
97
+ ],
98
+ "macro": [
99
+ "entity.name.tag.tsp"
100
+ ]
101
+ }
102
+ }
103
+ ]
104
+ },
105
+ "devDependencies": {
106
+ "@rollup/plugin-commonjs": "~23.0.2",
107
+ "@rollup/plugin-node-resolve": "~15.0.1",
108
+ "@types/mkdirp": "~1.0.1",
109
+ "@types/mocha": "~10.0.0",
110
+ "@types/node": "~18.11.9",
111
+ "@types/vscode": "~1.53.0",
112
+ "@typespec/compiler": "~0.41.0",
113
+ "@typespec/eslint-config-typespec": "~0.6.0",
114
+ "@typespec/internal-build-utils": "~0.4.0",
115
+ "eslint": "^8.12.0",
116
+ "c8": "~7.12.0",
117
+ "mkdirp": "~1.0.4",
118
+ "mocha": "~10.1.0",
119
+ "mocha-junit-reporter": "~2.2.0",
120
+ "mocha-multi-reporters": "~1.5.1",
121
+ "rimraf": "~3.0.2",
122
+ "rollup": "~3.4.0",
123
+ "typescript": "~4.9.3",
124
+ "@vscode/vsce": "~2.15.0",
125
+ "vscode-languageclient": "~8.0.0"
126
+ },
127
+ "scripts": {
128
+ "clean": "rimraf ./dist ./dist-dev ./temp",
129
+ "build": "npm run compile && npm run rollup && npm run copy-tmlanguage && npm run generate-language-configuration && npm run generate-third-party-notices && npm run package-vsix",
130
+ "compile": "tsc -p .",
131
+ "watch": "tsc -p . --watch",
132
+ "dogfood": "node scripts/dogfood.js",
133
+ "copy-tmlanguage": "node scripts/copy-tmlanguage.js",
134
+ "generate-language-configuration": "node scripts/generate-language-configuration.js",
135
+ "generate-third-party-notices": "typespec-build-tool generate-third-party-notices",
136
+ "rollup": "rollup --config --failAfterWarnings 2>&1",
137
+ "package-vsix": "vsce package"
138
+ }
139
+ }
Binary file