Skip to content

Commit

Permalink
[@azure-tools/azure-http-specs] Add Installation Scripts to typespec …
Browse files Browse the repository at this point in the history
…repository (#1960)

This is No.2 of the required steps to get the dashboards released.
(Continued from microsoft/typespec#5278)

Please review and approve the PR. Thanks
  • Loading branch information
sarangan12 authored Dec 9, 2024
1 parent 4630826 commit e12bf51
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .chronus/changes/ReleaseDashboardsStep1-2024-11-6-15-1-23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@azure-tools/azure-http-specs"
---

Added scripts to package.json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
spec-coverage.json
manifest.json

# nyc test coverage
.nyc_output
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"test": "pnpm run-all run test",
"update-latest-docs": "pnpm run-all run update-latest-docs",
"watch": "tsc --build ./tsconfig.ws.json --watch",
"sync-labels": "tsx ./core/eng/common/scripts/labels/sync-labels.ts --config ./eng/config/labels.ts"
"sync-labels": "tsx ./core/eng/common/scripts/labels/sync-labels.ts --config ./eng/config/labels.ts",
"validate-scenarios": "pnpm -r --filter=@azure-tools/azure-http-specs run validate-scenarios",
"validate-mock-apis": "pnpm -r --filter=@azure-tools/azure-http-specs run validate-mock-apis",
"generate-scenarios-summary": "pnpm -r --filter=@azure-tools/azure-http-specs run generate-scenarios-summary",
"upload-manifest": "pnpm -r --filter=@azure-tools/azure-http-specs run upload-manifest"
},
"devDependencies": {
"@chronus/chronus": "^0.13.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/azure-http-specs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @azure-tools/azure-http-specs

## 0.1.0-alpha.3

Added scripts to package.json.

## 0.1.0-alpha.2

Backport changes from `cadl-ranch`.
Expand Down
4 changes: 3 additions & 1 deletion packages/azure-http-specs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/azure-http-specs",
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"description": "Azure Spec scenarios and mock apis",
"main": "dist/index.js",
"type": "module",
Expand All @@ -12,6 +12,8 @@
"validate-scenarios": "tsp-spector validate-scenarios ./specs",
"generate-scenarios-summary": "tsp-spector generate-scenarios-summary ./specs",
"regen-docs": "pnpm generate-scenarios-summary",
"upload-manifest": "tsp-spector upload-manifest ./specs ../../core/packages/http-specs/specs --setName=@azure-tools/azure-http-specs --setName=@typespec/http-specs --containerName=manifests-azure --storageAccountName=typespec",
"upload-coverage": "tsp-spector upload-coverage --generatorName @azure-tools/azure-http-specs --generatorVersion 0.1.0-alpha.3 --containerName coverages --generatorMode azure --storageAccountName typespec",
"validate-mock-apis": "tsp-spector validate-mock-apis ./specs",
"check-scenario-coverage": "tsp-spector check-coverage ./specs",
"validate-client-server": "concurrently \"tsp-spector server start ./specs\" \"npm run client\" && tsp-spector server stop",
Expand Down
36 changes: 20 additions & 16 deletions packages/azure-spec-dashboard/src/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,31 @@ import {
const storageAccountName = "typespec";

export type GeneratorNames =
| "python"
| "typescript/rlc"
| "typescript/modular"
| "csharp"
| "@typespec/http-client-python"
| "@azure-tools/typespec-python"
| "@azure-tools/typespec-go"
| "@azure-tools/typespec-csharp"
| "@typespec/http-client-csharp"
| "java"
| "go"
| "cpp"
| "rust"
| "@azure-tools/typespec-ts-rlc"
| "@azure-tools/typespec-ts-modular"
| "@azure-tools/typespec-java"
| "@typespec/http-client-java"
| "@azure-tools/typespec-cpp"
| "@azure-tools/typespec-rust"
| "test";
const query = new URLSearchParams(window.location.search);
const generatorNames: GeneratorNames[] = [
"python",
"typescript/rlc",
"typescript/modular",
"csharp",
"@typespec/http-client-python",
"@azure-tools/typespec-python",
"@azure-tools/typespec-go",
"@azure-tools/typespec-csharp",
"@typespec/http-client-csharp",
"java",
"go",
"cpp",
"rust",
"@azure-tools/typespec-ts-rlc",
"@azure-tools/typespec-ts-modular",
"@azure-tools/typespec-java",
"@typespec/http-client-java",
"@azure-tools/typespec-cpp",
"@azure-tools/typespec-rust",
...(query.has("showtest") ? (["test"] as const) : []),
];

Expand Down

0 comments on commit e12bf51

Please sign in to comment.