@ancplua/qyl-api-schema 0.2.0 → 0.2.2

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.
Files changed (3) hide show
  1. package/README.md +7 -3
  2. package/VERSIONING.md +10 -0
  3. package/package.json +11 -6
package/README.md CHANGED
@@ -84,6 +84,10 @@ npm run compile
84
84
 
85
85
  ## Publishing
86
86
 
87
- During normal operation, GitHub Releases publish npm and NuGet artifacts in lockstep. When GitHub
88
- Actions is unavailable, publish manually from locally verified artifacts using package tokens passed
89
- through environment variables. Never print tokens and never commit credentials.
87
+ Publishing is fully automated via GitHub Actions OIDC **trusted publishing** no stored secrets, no
88
+ API keys. Publish a GitHub Release whose tag is `vMAJOR.MINOR.PATCH[-prerelease]`; `publish.yml` then,
89
+ all-or-nothing, packs and validates the artifacts, stamps that single tag-derived version onto both,
90
+ pushes `Qyl.Api.Contracts` to nuget.org (NuGet/login OIDC) and publishes `@ancplua/qyl-api-schema` to
91
+ npmjs.org (npm trusted publishing + provenance). NuGet pushes first (idempotent) and npm last
92
+ (immutable), so a partial failure re-runs cleanly. See [VERSIONING.md](VERSIONING.md) for how the
93
+ version is derived from the tag. There are no long-lived publish tokens to manage or rotate.
package/VERSIONING.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  This repository uses `@typespec/versioning` to record when schema elements were added or removed across qyl API versions and OpenTelemetry compatibility-model pins. The annotations live in TypeSpec so schema evolution is reviewable at the contract source.
4
4
 
5
+ ## Release versioning (the package version)
6
+
7
+ Separate from the `@typespec/versioning` schema annotations below: the published **package** version
8
+ (npm `@ancplua/qyl-api-schema` and NuGet `Qyl.Api.Contracts`) is **CI-owned and tag-derived** — no
9
+ hand-bumped version lives in any committed file. To cut a release, publish a GitHub Release whose tag
10
+ is `vMAJOR.MINOR.PATCH[-prerelease]`; `publish.yml` strips the leading `v` and stamps that single
11
+ version onto both npm and NuGet (no build metadata — npm rejects it and NuGet strips it), so the two
12
+ registries are lockstep by construction. The committed `package.json` version is the non-authoritative
13
+ placeholder `0.0.0-development`, and `packaging/Qyl.Api.Contracts.csproj` carries no `<Version>`.
14
+
5
15
  ## Where it is used
6
16
 
7
17
  - `models/genai.tsp` for GenAI semantic-convention shaped models
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancplua/qyl-api-schema",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -59,7 +59,16 @@
59
59
  "lint:public": "tsp compile index.tsp --no-emit --warn-as-error"
60
60
  },
61
61
  "peerDependencies": {
62
- "@typespec/compiler": "^1.13.0 || >=1.13.0-dev.0"
62
+ "@typespec/compiler": "^1.13.0 || >=1.13.0-dev.0",
63
+ "@typespec/events": "^0.83.0",
64
+ "@typespec/http": "^1.13.0",
65
+ "@typespec/json-schema": "^1.13.0",
66
+ "@typespec/openapi": "^1.13.0",
67
+ "@typespec/openapi3": "^1.13.0",
68
+ "@typespec/rest": "^0.83.0",
69
+ "@typespec/sse": "^0.83.0",
70
+ "@typespec/streams": "^0.83.0",
71
+ "@typespec/versioning": "^0.83.0"
63
72
  },
64
73
  "devDependencies": {
65
74
  "@ancplua/typespec-emit-csharp": "file:./emitters/csharp",
@@ -80,9 +89,5 @@
80
89
  "typescript": "6.0.3",
81
90
  "vitest": "4.1.9",
82
91
  "@qyl/telemetry-control-graph": "file:./emitters/telemetry-control-graph"
83
- },
84
- "dependencies": {
85
- "@azure-tools/typespec-azure-core": "^0.69.0",
86
- "@typespec/xml": "^0.83.0"
87
92
  }
88
93
  }