-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
69 lines (60 loc) · 1.84 KB
/
index.d.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
declare class Manifest {
constructor(payload: Manifest.Payload);
// Properties
readonly name: string;
readonly version: string;
readonly type: Manifest.Type;
readonly dependencies: Manifest.Dependencies;
readonly doc: Manifest.Documentation;
readonly psp: Manifest.psp;
readonly notes: Manifest.Notes;
readonly org: string | null;
readonly required_core: string | null;
readonly platform: Manifest.Platform;
readonly config: string | null;
public static DEFAULT_FILE: string;
public static TYPES: Readonly<Set<string>>
public static DEFAULT_DOC_PORT: number;
// Methods
static create(config?: Manifest.Payload, filePath?: string, lightMode?: boolean): Manifest;
static open(filePath?: string): Manifest;
static writeOnDisk(manifest: Manifest, filePath?: string): void;
public addDependency(name: string, version: string): void;
public hasDependency(name: string): boolean;
public toJSON(): Manifest.Payload;
}
declare namespace Manifest {
type Type = "Addon" | "NAPI" | "CLI" | "Package" | "Service" | "Degraded";
type Platform = "Any" | "Windows" | "Unix";
interface psp {
npmrc: boolean;
jsdoc: boolean;
disabled_dependency: string[];
exclude: string[];
}
interface Documentation {
include: string[];
port: number;
}
interface Dependencies {
[name: string]: string;
}
interface Notes {
[name: string]: string;
}
interface Payload {
name: string;
version: string;
type: Type;
required_core?: string;
org?: string;
dependencies?: Dependencies;
platform?: Platform;
psp?: psp;
doc?: Documentation;
notes?: Notes;
config?: string;
}
}
export as namespace Manifest;
export = Manifest;