forked from microsoft/typespec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.ts
36 lines (29 loc) · 822 Bytes
/
manifest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
let manifest;
try {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
manifest = (await import("../manifest.js")).default;
} catch {
const name = "../dist/manifest.js";
manifest = (await import(/* @vite-ignore */ /* webpackIgnore: true */ name)).default;
}
export const typespecVersion = manifest.version;
/** @deprecated Use typespecVersion */
export const cadlVersion = typespecVersion;
/** @deprecated Use TypeSpecManifest */
export type CadlManifest = TypeSpecManifest;
export interface TypeSpecManifest {
/**
* Version of the tsp compiler.
*/
version: string;
/**
* Full commit sha.
*/
commit: string;
/**
* Number of the pull request, if the build was from a pull request.
*/
pr?: number;
}
export const MANIFEST: TypeSpecManifest = manifest;