Draft
Conversation
…ble emitter and .NET server Make the C# emitter loadable in browser environments by converting static Node.js imports (child_process, fs, path, url) to dynamic imports. Add a 'playground-server-url' emitter option that, when set, POSTs the code model to a remote .NET server instead of spawning a local dotnet process. Create an ASP.NET Core playground server that accepts code model JSON and configuration, runs the .NET generator, and returns the generated C# files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add @typespec/http-client-csharp and @azure-tools/typespec-client-generator-core to the playground-website config and dependencies. The C# emitter now appears in the emitter dropdown and its output files are shown in the file explorer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Set playground-server-url as a default emitter option for the C# emitter in the playground. The URL defaults to localhost:5174 for local dev and can be overridden via VITE_PLAYGROUND_SERVER_URL env var at build time. Add dev:playground script to http-client-csharp package.json that runs both the Vite playground and .NET server concurrently. Fix generator DLL path resolution in playground server. Verified end-to-end: server generates 18 C# files from a real TypeSpec code model (authentication/api-key test fixture). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix the .NET server to actually bind to port 5174 (was using ASP.NET default port 5000). Add @azure-tools/typespec-azure-core as a dependency since TCGC has a peer dependency on it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In playground mode, serialize the code model and configuration in memory and send directly to the server instead of writing to the virtual FS and reading back. Extract serializeCodeModel() from writeCodeModel() to enable this. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s, and highlight changed files - Add isCompiling state with Spinner overlay in output panel during compilation - Preserve previous output files when compilation has transient errors (mid-typing) - Fix race condition: discard stale compilation results, catch emitter crashes - Highlight changed files in file tree with bold green text (opt-in per emitter) - Add nodeLabel prop to Tree component for custom label rendering - Browser detection fallback for playground-server-url - Enable change highlighting for C# emitter only via emittersWithChangeHighlighting - Add CSS for Monaco changed-line decorations (playground-changed-line) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add fixed-window rate limiting (10 requests/minute per IP) on the /generate endpoint. Update Dockerfile to build from the http-client-csharp root, including the generator build step and full .NET SDK in runtime image (needed to spawn dotnet for the generator). Deploy with: cd packages/http-client-csharp docker build -f playground-server/Dockerfile -t csharp-playground-server . Set PLAYGROUND_URL env var on the server to restrict CORS to the production playground origin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The -g argument to the generator DLL is now sent by the emitter in the request body instead of being hardcoded to ScmCodeModelGenerator. This allows the same server to support both unbranded (@typespec/http-client-csharp) and Azure (@azure-typespec/http-client-csharp) emitters, which use different generator classes discovered via MEF. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The lockfile was previously generated with pnpm 9.4.0 which doesn't match the repo's packageManager (pnpm 10.30.2), causing frozen lockfile failures in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
commit: |
Contributor
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
Show changes |
Switch from link: to file: protocol for the http-client-csharp dependency. Add a CI step to build the http-client-csharp emitter before the main build so the playground bundler can resolve the package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
file: copies the package at install time before the emitter is built. link: creates a symlink so the build step after install is visible through the symlink. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
link: protocol is not supported in pnpm catalogs. Add exceptions to check-catalog.ts for the three external dependencies needed by the playground (azure-core, TCGC, http-client-csharp). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Azure/typespec-azure integration check also builds the playground which needs the http-client-csharp emitter pre-built. Add the build step before the main pnpm build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.