Skip to content

Commit 2d02bce

Browse files
committed
chore: run fmt
1 parent 4b8ae97 commit 2d02bce

File tree

2 files changed

+118
-118
lines changed

2 files changed

+118
-118
lines changed
Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,127 @@
11
export interface Person {
2-
name: string;
3-
url?: string;
4-
email?: string;
2+
name: string
3+
url?: string
4+
email?: string
55
}
66

77
export interface Translation {
8-
id: string;
9-
path: string;
8+
id: string
9+
path: string
1010
}
1111

1212
export interface Localization {
13-
languageId: string;
14-
languageName?: string;
15-
localizedLanguageName?: string;
16-
translations: Translation[];
13+
languageId: string
14+
languageName?: string
15+
localizedLanguageName?: string
16+
translations: Translation[]
1717
}
1818

1919
export interface Language {
20-
readonly id: string;
21-
readonly aliases?: string[];
22-
readonly extensions?: string[];
20+
readonly id: string
21+
readonly aliases?: string[]
22+
readonly extensions?: string[]
2323
}
2424

2525
export interface Grammar {
26-
readonly language: string;
27-
readonly scopeName: string;
28-
readonly path: string;
26+
readonly language: string
27+
readonly scopeName: string
28+
readonly path: string
2929
}
3030

3131
export interface Command {
32-
readonly command: string;
33-
readonly title: string;
32+
readonly command: string
33+
readonly title: string
3434
}
3535

3636
export interface Authentication {
37-
readonly id: string;
38-
readonly label: string;
37+
readonly id: string
38+
readonly label: string
3939
}
4040

4141
export interface CustomEditor {
42-
readonly viewType: string;
43-
readonly priority: string;
44-
readonly selector: readonly {
45-
readonly filenamePattern?: string;
46-
}[];
42+
readonly viewType: string
43+
readonly priority: string
44+
readonly selector: readonly {
45+
readonly filenamePattern?: string
46+
}[]
4747
}
4848

4949
export interface View {
50-
readonly id: string;
51-
readonly name: string;
50+
readonly id: string
51+
readonly name: string
5252
}
5353

5454
export interface Contributions {
55-
readonly localizations?: Localization[];
56-
readonly languages?: Language[];
57-
readonly grammars?: Grammar[];
58-
readonly commands?: Command[];
59-
readonly authentication?: Authentication[];
60-
readonly customEditors?: CustomEditor[];
61-
readonly views?: { [location: string]: View[] };
62-
readonly [contributionType: string]: any;
55+
readonly localizations?: Localization[]
56+
readonly languages?: Language[]
57+
readonly grammars?: Grammar[]
58+
readonly commands?: Command[]
59+
readonly authentication?: Authentication[]
60+
readonly customEditors?: CustomEditor[]
61+
readonly views?: { [location: string]: View[] }
62+
readonly [contributionType: string]: any
6363
}
6464

65-
export type ExtensionKind = 'ui' | 'workspace' | 'web';
65+
export type ExtensionKind = 'ui' | 'workspace' | 'web'
6666

6767
export interface Manifest {
68-
// mandatory (npm)
69-
name: string;
70-
version: string;
71-
engines: { [name: string]: string };
68+
// mandatory (npm)
69+
name: string
70+
version: string
71+
engines: { [name: string]: string }
7272

73-
// vscode
74-
publisher: string;
75-
icon?: string;
76-
contributes?: Contributions;
77-
activationEvents?: string[];
78-
extensionDependencies?: string[];
79-
extensionPack?: string[];
80-
galleryBanner?: { color?: string; theme?: string };
81-
preview?: boolean;
82-
badges?: { url: string; href: string; description: string }[];
83-
markdown?: 'github' | 'standard';
84-
_bundling?: { [name: string]: string }[];
85-
_testing?: string;
86-
enableProposedApi?: boolean;
87-
enabledApiProposals?: readonly string[];
88-
qna?: 'marketplace' | string | false;
89-
extensionKind?: ExtensionKind | ExtensionKind[];
90-
sponsor?: { url: string };
73+
// vscode
74+
publisher: string
75+
icon?: string
76+
contributes?: Contributions
77+
activationEvents?: string[]
78+
extensionDependencies?: string[]
79+
extensionPack?: string[]
80+
galleryBanner?: { color?: string; theme?: string }
81+
preview?: boolean
82+
badges?: { url: string; href: string; description: string }[]
83+
markdown?: 'github' | 'standard'
84+
_bundling?: { [name: string]: string }[]
85+
_testing?: string
86+
enableProposedApi?: boolean
87+
enabledApiProposals?: readonly string[]
88+
qna?: 'marketplace' | string | false
89+
extensionKind?: ExtensionKind | ExtensionKind[]
90+
sponsor?: { url: string }
9191

92-
// optional (npm)
93-
author?: string | Person;
94-
displayName?: string;
95-
description?: string;
96-
keywords?: string[];
97-
categories?: string[];
98-
homepage?: string;
99-
bugs?: string | { url?: string; email?: string };
100-
license?: string;
101-
contributors?: string | Person[];
102-
main?: string;
103-
browser?: string;
104-
repository?: string | { type?: string; url?: string };
105-
scripts?: { [name: string]: string };
106-
dependencies?: { [name: string]: string };
107-
devDependencies?: { [name: string]: string };
108-
private?: boolean;
109-
pricing?: string;
92+
// optional (npm)
93+
author?: string | Person
94+
displayName?: string
95+
description?: string
96+
keywords?: string[]
97+
categories?: string[]
98+
homepage?: string
99+
bugs?: string | { url?: string; email?: string }
100+
license?: string
101+
contributors?: string | Person[]
102+
main?: string
103+
browser?: string
104+
repository?: string | { type?: string; url?: string }
105+
scripts?: { [name: string]: string }
106+
dependencies?: { [name: string]: string }
107+
devDependencies?: { [name: string]: string }
108+
private?: boolean
109+
pricing?: string
110110

111-
// vsce
112-
vsce?: any;
111+
// vsce
112+
vsce?: any
113113

114-
// not supported (npm)
115-
// files?: string[];
116-
// bin
117-
// man
118-
// directories
119-
// config
120-
// peerDependencies
121-
// bundledDependencies
122-
// optionalDependencies
123-
// os?: string[];
124-
// cpu?: string[];
125-
// preferGlobal
126-
// publishConfig
114+
// not supported (npm)
115+
// files?: string[];
116+
// bin
117+
// man
118+
// directories
119+
// config
120+
// peerDependencies
121+
// bundledDependencies
122+
// optionalDependencies
123+
// os?: string[];
124+
// cpu?: string[];
125+
// preferGlobal
126+
// publishConfig
127127
}
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
import { promisify } from 'util';
2-
import { parseString } from 'xml2js';
1+
import { promisify } from 'util'
2+
import { parseString } from 'xml2js'
33

44
function createXMLParser<T>(): (raw: string) => Promise<T> {
5-
return promisify<string, T>(parseString);
5+
return promisify<string, T>(parseString)
66
}
77

88
export type XMLManifest = {
9-
PackageManifest: {
10-
$: { Version: string; xmlns: string; 'xmlns:d': string };
11-
Metadata: {
12-
Description: { _: string }[];
13-
DisplayName: string[];
14-
Identity: { $: { Id: string; Version: string; Publisher: string; TargetPlatform?: string } }[];
15-
Tags: string[];
16-
GalleryFlags: string[];
17-
License: string[];
18-
Icon: string[];
19-
Properties: { Property: { $: { Id: string; Value: string } }[] }[];
20-
Categories: string[];
21-
Badges: { Badge: { $: { Link: string; ImgUri: string; Description: string } }[] }[];
22-
}[];
23-
Installation: { InstallationTarget: { $: { Id: string } }[] }[];
24-
Dependencies: string[];
25-
Assets: { Asset: { $: { Type: string; Path: string } }[] }[];
26-
};
27-
};
9+
PackageManifest: {
10+
$: { Version: string; xmlns: string; 'xmlns:d': string }
11+
Metadata: {
12+
Description: { _: string }[]
13+
DisplayName: string[]
14+
Identity: { $: { Id: string; Version: string; Publisher: string; TargetPlatform?: string } }[]
15+
Tags: string[]
16+
GalleryFlags: string[]
17+
License: string[]
18+
Icon: string[]
19+
Properties: { Property: { $: { Id: string; Value: string } }[] }[]
20+
Categories: string[]
21+
Badges: { Badge: { $: { Link: string; ImgUri: string; Description: string } }[] }[]
22+
}[]
23+
Installation: { InstallationTarget: { $: { Id: string } }[] }[]
24+
Dependencies: string[]
25+
Assets: { Asset: { $: { Type: string; Path: string } }[] }[]
26+
}
27+
}
2828

2929
export type ContentTypes = {
30-
Types: {
31-
Default: { $: { Extension: string; ContentType: string } }[];
32-
};
33-
};
30+
Types: {
31+
Default: { $: { Extension: string; ContentType: string } }[]
32+
}
33+
}
3434

35-
export const parseXmlManifest = createXMLParser<XMLManifest>();
36-
export const parseContentTypes = createXMLParser<ContentTypes>();
35+
export const parseXmlManifest = createXMLParser<XMLManifest>()
36+
export const parseContentTypes = createXMLParser<ContentTypes>()

0 commit comments

Comments
 (0)