UNPKG

4.25 kBTypeScriptView Raw
1import * as spec from '@jsii/spec';
2import * as ts from 'typescript';
3import { TypeScriptConfigValidationRuleSet } from './tsconfig';
4export type TSCompilerOptions = Partial<Pick<ts.CompilerOptions, 'outDir' | 'rootDir' | 'baseUrl' | 'paths' | 'forceConsistentCasingInFileNames' | 'noImplicitOverride' | 'noPropertyAccessFromIndexSignature' | 'noUncheckedIndexedAccess' | 'declarationMap' | 'inlineSourceMap' | 'inlineSources' | 'sourceMap' | 'types'>>;
5export interface ProjectInfo {
6 readonly projectRoot: string;
7 readonly packageJson: PackageJson;
8 readonly name: string;
9 readonly version: string;
10 readonly author: spec.Person;
11 readonly deprecated?: string;
12 readonly stability?: spec.Stability;
13 readonly license: string;
14 readonly repository: {
15 readonly type: string;
16 readonly url: string;
17 readonly directory?: string;
18 };
19 readonly keywords?: readonly string[];
20 readonly main: string;
21 readonly types: string;
22 readonly dependencies: {
23 readonly [name: string]: string;
24 };
25 readonly peerDependencies: {
26 readonly [name: string]: string;
27 };
28 readonly dependencyClosure: readonly spec.Assembly[];
29 readonly bundleDependencies?: {
30 readonly [name: string]: string;
31 };
32 readonly targets: spec.AssemblyTargets;
33 readonly metadata?: {
34 readonly [key: string]: any;
35 };
36 readonly jsiiVersionFormat: 'short' | 'full';
37 readonly diagnostics?: {
38 readonly [code: string]: ts.DiagnosticCategory;
39 };
40 readonly description?: string;
41 readonly homepage?: string;
42 readonly contributors?: readonly spec.Person[];
43 readonly excludeTypescript: readonly string[];
44 readonly projectReferences?: boolean;
45 readonly tsc?: TSCompilerOptions;
46 readonly bin?: {
47 readonly [name: string]: string;
48 };
49 readonly exports?: {
50 readonly [name: string]: string | {
51 readonly [name: string]: string;
52 };
53 };
54 readonly tsconfig?: string;
55 readonly validateTsconfig?: TypeScriptConfigValidationRuleSet;
56}
57export interface PackageJson {
58 readonly description?: string;
59 readonly homepage?: string;
60 readonly name?: string;
61 readonly version?: string;
62 readonly keywords?: readonly string[];
63 readonly license?: string;
64 readonly private?: boolean;
65 readonly exports?: {
66 readonly [path: string]: string | {
67 readonly [name: string]: string;
68 };
69 };
70 readonly main?: string;
71 readonly types?: string;
72 /**
73 * @example { "<4.0": { "*": ["ts3.9/*"] } }
74 * @example { "<4.0": { "index.d.ts": ["index.ts3-9.d.ts"] } }
75 */
76 readonly typesVersions?: {
77 readonly [versionRange: string]: {
78 readonly [pattern: string]: readonly string[];
79 };
80 };
81 readonly bin?: {
82 readonly [name: string]: string;
83 };
84 readonly stability?: string;
85 readonly deprecated?: string;
86 readonly dependencies?: {
87 readonly [name: string]: string;
88 };
89 readonly devDependencies?: {
90 readonly [name: string]: string;
91 };
92 readonly peerDependencies?: {
93 readonly [name: string]: string;
94 };
95 readonly bundleDependencies?: readonly string[];
96 readonly bundledDependencies?: readonly string[];
97 readonly jsii?: {
98 readonly diagnostics?: {
99 readonly [id: string]: 'error' | 'warning' | 'suggestion' | 'message';
100 };
101 readonly metadata?: {
102 readonly [key: string]: unknown;
103 };
104 readonly targets?: {
105 readonly [name: string]: unknown;
106 };
107 readonly versionFormat?: 'short' | 'full';
108 readonly tsconfig?: string;
109 readonly validateTsconfig?: string;
110 readonly excludeTypescript?: readonly string[];
111 readonly projectReferences?: boolean;
112 readonly tsc?: TSCompilerOptions;
113 readonly [key: string]: unknown;
114 };
115 readonly [key: string]: unknown;
116}
117export interface ProjectInfoResult {
118 readonly projectInfo: ProjectInfo;
119 readonly diagnostics: readonly ts.Diagnostic[];
120}
121export declare function loadProjectInfo(projectRoot: string): ProjectInfoResult;
122//# sourceMappingURL=project-info.d.ts.map
\No newline at end of file