Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/trpc-webview-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const appRouter = router({
In your panel class:

```typescript
import { TypedEventSink } from '../utils/TypedEventSink';
import { TypedEventSink } from '@cosmosdb/webview-rpc';
import { setupTrpc } from '../webviews/api/extension-server/setupTrpc';

class MyPanel extends BaseTab {
Expand Down
1 change: 0 additions & 1 deletion l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@
"Press Alt+Down to open column menu": "Press Alt+Down to open column menu",
"Previous query:": "Previous query:",
"Priority Level": "Priority Level",
"Procedure not found: {name}": "Procedure not found: {name}",
"Project field help": "Project field help",
"Project Name": "Project Name",
"Project:": "Project:",
Expand Down
2,097 changes: 1,061 additions & 1,036 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,26 @@
"@types/vscode-webview": "~1.57.5",
"@vitejs/plugin-react": "^6.0.1",
"@vscode/l10n-dev": "~0.0.35",
"@vscode/test-electron": "~2.5.2",
"@vscode/test-electron": "~3.0.0",
"@vscode/vsce": "~3.9.1",
"concurrently": "~9.2.1",
"concurrently": "~10.0.3",
"cross-env": "~10.1.0",
"diff": "~9.0.0",
"eslint": "~10.4.0",
"eslint-plugin-license-header": "~0.9.0",
"glob": "~13.0.6",
"globals": "~17.6.0",
"jest-mock-vscode": "~4.12.0",
"oxfmt": "~0.51.0",
"oxlint": "~1.66.0",
"oxfmt": "~0.54.0",
"oxlint": "~1.69.0",
"oxlint-tsgolint": "~0.23.0",
"react": "~19.2.1",
"react-dom": "~19.2.1",
"react-refresh": "~0.18.0",
"rimraf": "~6.1.0",
"sass": "~1.99.0",
"sass": "~1.100.0",
"typescript": "~6.0.2",
"typescript-eslint": "~8.59.0",
"typescript-eslint": "~8.61.0",
"vite": "~8.0.10",
"vite-bundle-analyzer": "~1.3.7",
"vite-plugin-static-copy": "~4.1.0",
Expand All @@ -148,25 +148,23 @@
"@azure/arm-resources": "~7.0.0",
"@azure/cosmos": "~4.9.0",
"@azure/identity": "~4.13.0",
"@fluentui/react-components": "~9.73.0",
"@fluentui/react-components": "~9.74.1",
"@fluentui/react-icons": "~2.0.313",
"@microsoft/vscode-azext-azureauth": "~5.1.1",
"@microsoft/vscode-azext-azureutils": "~4.2.0",
"@microsoft/vscode-azext-azureutils": "~4.3.0",
"@microsoft/vscode-azext-utils": "~4.1.0",
"@microsoft/vscode-azureresources-api": "~3.1.0",
"@monaco-editor/react": "~4.7.0",
"@prantlf/jsonlint": "~17.0.0",
"@trpc/client": "~11.17.0",
"@trpc/server": "~11.17.0",
"@vscode/l10n": "~0.0.18",
"@vscode/prompt-tsx": "^0.4.0-alpha.7",
"@vscode/prompt-tsx": "^0.4.0-alpha.8",
"allotment": "~1.20.4",
"es-toolkit": "~1.46.0",
"es-toolkit": "~1.47.0",
"monaco-editor": "~0.52.2",
"react-data-grid": "~7.0.0-beta.59",
"react-hotkeys-hook": "5.1.0",
"semver": "~7.8.0",
"vscode-languageclient": "~9.0.1",
"vscode-languageclient": "~10.0.0",
"zod": "~4.4.3"
},
"overrides": {
Expand Down Expand Up @@ -976,5 +974,10 @@
"label": "Cosmos DB Shell MCP Server Provider"
}
]
},
"allowScripts": {
"@parcel/watcher": false,
"@vscode/vsce-sign": false,
"keytar": false
}
}
22 changes: 15 additions & 7 deletions packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@

This directory contains standalone packages that are part of the monorepo.

## Active Packages

| Package | Description | Status |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `@cosmosdb/nosql-language-service` | NoSQL language service — parser, AST, autocomplete, hover, formatting, and editor providers | ✅ Active |
| `@cosmosdb/schema-analyzer` | Schema inference from sampled documents | ✅ Active |
| `@cosmosdb/webview-rpc` | Generic tRPC transport for VS Code webviews: `setupTrpc`, `vscodeLink`, `errorLink`, `TypedEventSink`, pluggable logging/telemetry middleware bodies, and React bindings (`WebviewContext` + `useTrpcClient`). Subpaths: `./server`, `./client`, `./react`. | ✅ Active |

## Planned Packages

| Package | Description | Status |
| ---------------------------------- | ------------------------------------------------------------------------------------------- | --------- |
| `@cosmosdb/nosql-language-service` | NoSQL language service — parser, AST, autocomplete, hover, formatting, and editor providers | ✅ Active |
| `@cosmosdb/schema-analyzer` | Schema inference from sampled documents | ✅ Active |
| `@cosmosdb/shared` | Shared tRPC contracts, Zod schemas, and types | Planned |
| `@cosmosdb/webviews` | React/Fluent UI webview client | Planned |
| Package | Description | Status |
| -------------------- | --------------------------------------------- | ------- |
| `@cosmosdb/shared` | Shared tRPC contracts, Zod schemas, and types | Planned |
| `@cosmosdb/webviews` | React/Fluent UI webview client | Planned |

## Adding a New Package

1. Create a new directory under `packages/`
2. Add a `package.json` with the package name scoped to `@cosmosdb/`
3. Add a `tsconfig.json` that extends `../../tsconfig.base.json`
4. The package will be automatically discovered by pnpm workspace
4. Add path aliases to `tsconfig.base.json` (`paths`) so `tsc` resolves the package to its `src/`
5. Add matching `resolve.alias` entries to `vite.config.ext.mjs` and/or `vite.config.views.mjs` (subpath aliases must come before the bare-package alias)
6. Run `npm install` from the repo root so npm workspaces creates the `node_modules/@cosmosdb/<name>` junction
14 changes: 7 additions & 7 deletions packages/nosql-language-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@
},
"dependencies": {
"@cosmosdb/schema-analyzer": "*",
"chevrotain": "~12.0.0"
"chevrotain": "^12.0.0"
},
"devDependencies": {
"@codemirror/autocomplete": "~6.20.2",
"@codemirror/language": "~6.12.3",
"@codemirror/lint": "~6.9.6",
"@codemirror/state": "~6.6.0",
"@codemirror/view": "~6.42.1",
"@codemirror/autocomplete": "^6.18.0",
"@codemirror/language": "^6.10.0",
"@codemirror/lint": "^6.8.0",
"@codemirror/state": "^6.5.0",
"@codemirror/view": "^6.43.0",
"@types/vscode": "~1.109.0",
"monaco-editor": "~0.52.2",
"vitest": "~4.1.0"
"vitest": "^4.1.0"
},
"peerDependencies": {
"@codemirror/autocomplete": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"devDependencies": {
"@types/json-schema": "~7.0.15",
"mongodb": "~7.2.0",
"mongodb": "~7.3.0",
"vitest": "~4.1.0"
},
"engines": {
Expand Down
Loading
Loading