typespec-vscode 0.68.0-dev.8 → 0.68.0-dev.9

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/README.md CHANGED
@@ -8,8 +8,10 @@ The TypeSpec extension for Visual Studio Code enhances the development of TypeSp
8
8
  - Code autocompletion and formatting
9
9
  - Live diagnostics and quick fixes
10
10
  - Refactoring tools (rename, go-to definition, etc.)
11
- - Seamless project setup and emitter configuration
12
- - Generate code from TypeSpec
11
+ - Seamless project setup and emitter configuration <_new_>
12
+ - Import TypeSpec from existing OpenAPI 3 definitions <_new_>
13
+ - Emit code from TypeSpec <_new_>
14
+ - Preview API documentation <_new_>
13
15
 
14
16
  ## Prerequisites
15
17
 
@@ -19,11 +21,17 @@ Before using the TypeSpec extension, install [Node.js](https://nodejs.org/en/dow
19
21
  npm --version
20
22
  ```
21
23
 
24
+ Install the TypeSpec CLI:
25
+
26
+ ```sh
27
+ npm install -g @typespec/compiler
28
+ ```
29
+
22
30
  Other necessary installations will be prompted within the extension as needed.
23
31
 
24
32
  ## Features
25
33
 
26
- ### Writing TypeSpec
34
+ ### Write TypeSpec
27
35
 
28
36
  - **IntelliSense & Auto-completion**: Code faster with smart suggestions.
29
37
  - **Code Formatting & Folding**: Keep your code clean and organized with built-in formatting and folding support.
@@ -34,26 +42,39 @@ Other necessary installations will be prompted within the extension as needed.
34
42
 
35
43
  ![vscode.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode.gif)
36
44
 
37
- ### Project Initialization
45
+ ### Create TypeSpec Project
46
+
47
+ **Create TypeSpec Project**: Easily initialize a new TypeSpec project based on a template, ensuring a structured and ready-to-use setup.
38
48
 
39
- - **Create TypeSpec Project**: Easily initialize a new TypeSpec project based on a template, ensuring a structured and ready-to-use setup.
40
- ![vscode_project_scaffolding.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode_project_scaffolding.gif)
49
+ ![vscode_project_scaffolding.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode_project_scaffolding.gif)
41
50
 
42
- ### Generating Code from TypeSpec
51
+ ### Emit Code from TypeSpec
43
52
 
44
- The extension allows generating various outputs from TypeSpec:
53
+ The extension allows emitting various outputs from TypeSpec:
45
54
 
46
55
  - **OpenAPI Specification**
47
- - **Server SDKs**: Generate server stubs for different back-end frameworks.
48
- - **Client SDKs**: Generate client code for multiple languages, including:
56
+ - **Server SDKs**: Emit server stubs for different back-end frameworks.
57
+ - **Client SDKs**: Emit client code for multiple languages, including:
49
58
  - .NET (C#)
50
59
  - Python
51
60
  - Java
52
61
  - JavaScript/TypeScript
53
62
 
54
- Invoke `TypeSpec: Generate From TypeSpec` to generate code:
63
+ The action appears in the context menu on a tsp file. Or invoke `TypeSpec: Emit From TypeSpec` to emit needed outputs:
64
+
65
+ ![vscode_tsp_to_server_stubs.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode_tsp_to_server_stubs.gif)
66
+
67
+ ### Import TypeSpec from OpenAPI 3
68
+
69
+ The extension supports to import TypeSpec from OpenAPI 3. Invoke `TypeSpec: Import TypeSpec from OpenAPI 3` to begin importing.
70
+
71
+ <!--![vscode_import_tsp_from_openapi3.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode_import_tsp_from_openapi3.gif)-->
72
+
73
+ ### Preview API Documentation
74
+
75
+ The extension allows to preview API documentation. The action appears in the context menu on a tsp file. Or invoke `TypeSpec: Preview API Documentation` to visualize your API definitions.
55
76
 
56
- ![vscode_tsp_to_openapi3_generation.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode_tsp_to_openapi3_generation.gif)
77
+ <!--![vscode_preview_api_documentation.gif](https://raw.githubusercontent.com/microsoft/typespec/main/website/src/content/docs/docs/images/vscode_preview_api_documentation.gif)-->
57
78
 
58
79
  ## Commands
59
80
 
@@ -66,6 +87,8 @@ The extension provides the following commands:
66
87
  | `TypeSpec: Generate From TypeSpec` | Compile and generate from TypeSpec files into the specified output. |
67
88
  | `TypeSpec: Restart TypeSpec Server` | Restart the TypeSpec language server. |
68
89
  | `TypeSpec: Show Output Channel` | Open the TypeSpec output channel to view logs. |
90
+ | `TypeSpec: Preview API Documentation` | Preview API documentation generated from TypeSpec in the workspace. |
91
+ | `TypeSpec: Import TypeSpec from OpenAPI 3` | Import TypeSpec from existing OpenAPI 3 definitions |
69
92
 
70
93
  ## Configuration
71
94
 
@@ -86,6 +109,6 @@ This setting provides the ability to configure where the tsp compiler is located
86
109
  }
87
110
  ```
88
111
 
89
- ### Telemetry
112
+ ## Telemetry
90
113
 
91
- The TypeSpec Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to learn more. This extension respects the `telemetry.telemetryLevel` setting which you can find more information in the [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).
114
+ The TypeSpec Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to learn more. This extension respects the `telemetry.telemetryLevel` setting which you can find more information in the [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting) and [Telemetry Data](https://aka.ms/typespec/vscexdata).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typespec-vscode",
3
- "version": "0.68.0-dev.8",
3
+ "version": "0.68.0-dev.9",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec language support for VS Code",
6
6
  "homepage": "https://typespec.io",
@@ -275,7 +275,7 @@
275
275
  "peerDependencies": {},
276
276
  "scripts": {
277
277
  "clean": "rimraf ./dist ./temp",
278
- "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",
278
+ "build": "pnpm compile && pnpm copy-templates && pnpm copy-tmlanguage && pnpm generate-language-configuration && pnpm generate-third-party-notices && pnpm package-vsix",
279
279
  "compile": "rollup --config rollup.config.ts --configPlugin typescript --failAfterWarnings 2>&1",
280
280
  "watch": "rollup --config rollup.config.ts --configPlugin typescript --watch",
281
281
  "dogfood": "node scripts/dogfood.js",
Binary file