resuml 1.2.2 → 1.2.4
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.
- package/README.md +24 -0
- package/dist/api.d.ts +366 -0
- package/dist/api.js +6829 -0
- package/dist/api.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +119 -103
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
- package/src/types/theme.d.ts +0 -15
package/README.md
CHANGED
|
@@ -125,3 +125,27 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
125
125
|
## License
|
|
126
126
|
|
|
127
127
|
ISC
|
|
128
|
+
|
|
129
|
+
## Node.js API Usage
|
|
130
|
+
|
|
131
|
+
You can use resuml programmatically from Node.js:
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
import {
|
|
135
|
+
processResumeData,
|
|
136
|
+
loadResumeFiles,
|
|
137
|
+
loadTheme,
|
|
138
|
+
themeRender
|
|
139
|
+
} from 'resuml';
|
|
140
|
+
|
|
141
|
+
// Load YAML files
|
|
142
|
+
const { yamlContents } = await loadResumeFiles('resume.yaml');
|
|
143
|
+
// Validate and merge
|
|
144
|
+
const resume = await processResumeData(yamlContents);
|
|
145
|
+
// Load a theme
|
|
146
|
+
const theme = await loadTheme('stackoverflow');
|
|
147
|
+
// Render HTML
|
|
148
|
+
const html = await theme.render(resume, { locale: 'en' });
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
See the CLI and API for more details.
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
3
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04
|
|
8
|
+
*/
|
|
9
|
+
type Iso8601 = string;
|
|
10
|
+
interface ResumeSchema {
|
|
11
|
+
/**
|
|
12
|
+
* link to the version of the schema that can validate the resume
|
|
13
|
+
*/
|
|
14
|
+
$schema?: string;
|
|
15
|
+
basics?: {
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* e.g. Web Developer
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* URL (as per RFC 3986) to a image in JPEG or PNG format
|
|
23
|
+
*/
|
|
24
|
+
image?: string;
|
|
25
|
+
/**
|
|
26
|
+
* e.g. thomas@gmail.com
|
|
27
|
+
*/
|
|
28
|
+
email?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923
|
|
31
|
+
*/
|
|
32
|
+
phone?: string;
|
|
33
|
+
/**
|
|
34
|
+
* URL (as per RFC 3986) to your website, e.g. personal homepage
|
|
35
|
+
*/
|
|
36
|
+
url?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Write a short 2-3 sentence biography about yourself
|
|
39
|
+
*/
|
|
40
|
+
summary?: string;
|
|
41
|
+
location?: {
|
|
42
|
+
/**
|
|
43
|
+
* To add multiple address lines, use
|
|
44
|
+
* . For example, 1234 Glücklichkeit Straße
|
|
45
|
+
* Hinterhaus 5. Etage li.
|
|
46
|
+
*/
|
|
47
|
+
address?: string;
|
|
48
|
+
postalCode?: string;
|
|
49
|
+
city?: string;
|
|
50
|
+
/**
|
|
51
|
+
* code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN
|
|
52
|
+
*/
|
|
53
|
+
countryCode?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The general region where you live. Can be a US state, or a province, for instance.
|
|
56
|
+
*/
|
|
57
|
+
region?: string;
|
|
58
|
+
[k: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Specify any number of social networks that you participate in
|
|
62
|
+
*/
|
|
63
|
+
profiles?: {
|
|
64
|
+
/**
|
|
65
|
+
* e.g. Facebook or Twitter
|
|
66
|
+
*/
|
|
67
|
+
network?: string;
|
|
68
|
+
/**
|
|
69
|
+
* e.g. neutralthoughts
|
|
70
|
+
*/
|
|
71
|
+
username?: string;
|
|
72
|
+
/**
|
|
73
|
+
* e.g. http://twitter.example.com/neutralthoughts
|
|
74
|
+
*/
|
|
75
|
+
url?: string;
|
|
76
|
+
[k: string]: unknown;
|
|
77
|
+
}[];
|
|
78
|
+
[k: string]: unknown;
|
|
79
|
+
};
|
|
80
|
+
work?: {
|
|
81
|
+
/**
|
|
82
|
+
* e.g. Facebook
|
|
83
|
+
*/
|
|
84
|
+
name?: string;
|
|
85
|
+
/**
|
|
86
|
+
* e.g. Menlo Park, CA
|
|
87
|
+
*/
|
|
88
|
+
location?: string;
|
|
89
|
+
/**
|
|
90
|
+
* e.g. Social Media Company
|
|
91
|
+
*/
|
|
92
|
+
description?: string;
|
|
93
|
+
/**
|
|
94
|
+
* e.g. Software Engineer
|
|
95
|
+
*/
|
|
96
|
+
position?: string;
|
|
97
|
+
/**
|
|
98
|
+
* e.g. http://facebook.example.com
|
|
99
|
+
*/
|
|
100
|
+
url?: string;
|
|
101
|
+
startDate?: Iso8601;
|
|
102
|
+
endDate?: Iso8601;
|
|
103
|
+
/**
|
|
104
|
+
* Give an overview of your responsibilities at the company
|
|
105
|
+
*/
|
|
106
|
+
summary?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Specify multiple accomplishments
|
|
109
|
+
*/
|
|
110
|
+
highlights?: string[];
|
|
111
|
+
[k: string]: unknown;
|
|
112
|
+
}[];
|
|
113
|
+
volunteer?: {
|
|
114
|
+
/**
|
|
115
|
+
* e.g. Facebook
|
|
116
|
+
*/
|
|
117
|
+
organization?: string;
|
|
118
|
+
/**
|
|
119
|
+
* e.g. Software Engineer
|
|
120
|
+
*/
|
|
121
|
+
position?: string;
|
|
122
|
+
/**
|
|
123
|
+
* e.g. http://facebook.example.com
|
|
124
|
+
*/
|
|
125
|
+
url?: string;
|
|
126
|
+
startDate?: Iso8601;
|
|
127
|
+
endDate?: Iso8601;
|
|
128
|
+
/**
|
|
129
|
+
* Give an overview of your responsibilities at the company
|
|
130
|
+
*/
|
|
131
|
+
summary?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Specify accomplishments and achievements
|
|
134
|
+
*/
|
|
135
|
+
highlights?: string[];
|
|
136
|
+
[k: string]: unknown;
|
|
137
|
+
}[];
|
|
138
|
+
education?: {
|
|
139
|
+
/**
|
|
140
|
+
* e.g. Massachusetts Institute of Technology
|
|
141
|
+
*/
|
|
142
|
+
institution?: string;
|
|
143
|
+
/**
|
|
144
|
+
* e.g. http://facebook.example.com
|
|
145
|
+
*/
|
|
146
|
+
url?: string;
|
|
147
|
+
/**
|
|
148
|
+
* e.g. Arts
|
|
149
|
+
*/
|
|
150
|
+
area?: string;
|
|
151
|
+
/**
|
|
152
|
+
* e.g. Bachelor
|
|
153
|
+
*/
|
|
154
|
+
studyType?: string;
|
|
155
|
+
startDate?: Iso8601;
|
|
156
|
+
endDate?: Iso8601;
|
|
157
|
+
/**
|
|
158
|
+
* grade point average, e.g. 3.67/4.0
|
|
159
|
+
*/
|
|
160
|
+
score?: string;
|
|
161
|
+
/**
|
|
162
|
+
* List notable courses/subjects
|
|
163
|
+
*/
|
|
164
|
+
courses?: string[];
|
|
165
|
+
[k: string]: unknown;
|
|
166
|
+
}[];
|
|
167
|
+
/**
|
|
168
|
+
* Specify any awards you have received throughout your professional career
|
|
169
|
+
*/
|
|
170
|
+
awards?: {
|
|
171
|
+
/**
|
|
172
|
+
* e.g. One of the 100 greatest minds of the century
|
|
173
|
+
*/
|
|
174
|
+
title?: string;
|
|
175
|
+
date?: Iso8601;
|
|
176
|
+
/**
|
|
177
|
+
* e.g. Time Magazine
|
|
178
|
+
*/
|
|
179
|
+
awarder?: string;
|
|
180
|
+
/**
|
|
181
|
+
* e.g. Received for my work with Quantum Physics
|
|
182
|
+
*/
|
|
183
|
+
summary?: string;
|
|
184
|
+
[k: string]: unknown;
|
|
185
|
+
}[];
|
|
186
|
+
/**
|
|
187
|
+
* Specify any certificates you have received throughout your professional career
|
|
188
|
+
*/
|
|
189
|
+
certificates?: {
|
|
190
|
+
/**
|
|
191
|
+
* e.g. Certified Kubernetes Administrator
|
|
192
|
+
*/
|
|
193
|
+
name?: string;
|
|
194
|
+
date?: Iso8601;
|
|
195
|
+
/**
|
|
196
|
+
* e.g. http://example.com
|
|
197
|
+
*/
|
|
198
|
+
url?: string;
|
|
199
|
+
/**
|
|
200
|
+
* e.g. CNCF
|
|
201
|
+
*/
|
|
202
|
+
issuer?: string;
|
|
203
|
+
[k: string]: unknown;
|
|
204
|
+
}[];
|
|
205
|
+
/**
|
|
206
|
+
* Specify your publications through your career
|
|
207
|
+
*/
|
|
208
|
+
publications?: {
|
|
209
|
+
/**
|
|
210
|
+
* e.g. The World Wide Web
|
|
211
|
+
*/
|
|
212
|
+
name?: string;
|
|
213
|
+
/**
|
|
214
|
+
* e.g. IEEE, Computer Magazine
|
|
215
|
+
*/
|
|
216
|
+
publisher?: string;
|
|
217
|
+
releaseDate?: Iso8601;
|
|
218
|
+
/**
|
|
219
|
+
* e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html
|
|
220
|
+
*/
|
|
221
|
+
url?: string;
|
|
222
|
+
/**
|
|
223
|
+
* Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML.
|
|
224
|
+
*/
|
|
225
|
+
summary?: string;
|
|
226
|
+
[k: string]: unknown;
|
|
227
|
+
}[];
|
|
228
|
+
/**
|
|
229
|
+
* List out your professional skill-set
|
|
230
|
+
*/
|
|
231
|
+
skills?: {
|
|
232
|
+
/**
|
|
233
|
+
* e.g. Web Development
|
|
234
|
+
*/
|
|
235
|
+
name?: string;
|
|
236
|
+
/**
|
|
237
|
+
* e.g. Master
|
|
238
|
+
*/
|
|
239
|
+
level?: string;
|
|
240
|
+
/**
|
|
241
|
+
* List some keywords pertaining to this skill
|
|
242
|
+
*/
|
|
243
|
+
keywords?: string[];
|
|
244
|
+
[k: string]: unknown;
|
|
245
|
+
}[];
|
|
246
|
+
/**
|
|
247
|
+
* List any other languages you speak
|
|
248
|
+
*/
|
|
249
|
+
languages?: {
|
|
250
|
+
/**
|
|
251
|
+
* e.g. English, Spanish
|
|
252
|
+
*/
|
|
253
|
+
language?: string;
|
|
254
|
+
/**
|
|
255
|
+
* e.g. Fluent, Beginner
|
|
256
|
+
*/
|
|
257
|
+
fluency?: string;
|
|
258
|
+
[k: string]: unknown;
|
|
259
|
+
}[];
|
|
260
|
+
interests?: {
|
|
261
|
+
/**
|
|
262
|
+
* e.g. Philosophy
|
|
263
|
+
*/
|
|
264
|
+
name?: string;
|
|
265
|
+
keywords?: string[];
|
|
266
|
+
[k: string]: unknown;
|
|
267
|
+
}[];
|
|
268
|
+
/**
|
|
269
|
+
* List references you have received
|
|
270
|
+
*/
|
|
271
|
+
references?: {
|
|
272
|
+
/**
|
|
273
|
+
* e.g. Timothy Cook
|
|
274
|
+
*/
|
|
275
|
+
name?: string;
|
|
276
|
+
/**
|
|
277
|
+
* e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing.
|
|
278
|
+
*/
|
|
279
|
+
reference?: string;
|
|
280
|
+
[k: string]: unknown;
|
|
281
|
+
}[];
|
|
282
|
+
/**
|
|
283
|
+
* Specify career projects
|
|
284
|
+
*/
|
|
285
|
+
projects?: {
|
|
286
|
+
/**
|
|
287
|
+
* e.g. The World Wide Web
|
|
288
|
+
*/
|
|
289
|
+
name?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Short summary of project. e.g. Collated works of 2017.
|
|
292
|
+
*/
|
|
293
|
+
description?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Specify multiple features
|
|
296
|
+
*/
|
|
297
|
+
highlights?: string[];
|
|
298
|
+
/**
|
|
299
|
+
* Specify special elements involved
|
|
300
|
+
*/
|
|
301
|
+
keywords?: string[];
|
|
302
|
+
startDate?: Iso8601;
|
|
303
|
+
endDate?: Iso8601;
|
|
304
|
+
/**
|
|
305
|
+
* e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html
|
|
306
|
+
*/
|
|
307
|
+
url?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Specify your role on this project or in company
|
|
310
|
+
*/
|
|
311
|
+
roles?: string[];
|
|
312
|
+
/**
|
|
313
|
+
* Specify the relevant company/entity affiliations e.g. 'greenpeace', 'corporationXYZ'
|
|
314
|
+
*/
|
|
315
|
+
entity?: string;
|
|
316
|
+
/**
|
|
317
|
+
* e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'
|
|
318
|
+
*/
|
|
319
|
+
type?: string;
|
|
320
|
+
[k: string]: unknown;
|
|
321
|
+
}[];
|
|
322
|
+
/**
|
|
323
|
+
* The schema version and any other tooling configuration lives here
|
|
324
|
+
*/
|
|
325
|
+
meta?: {
|
|
326
|
+
/**
|
|
327
|
+
* URL (as per RFC 3986) to latest version of this document
|
|
328
|
+
*/
|
|
329
|
+
canonical?: string;
|
|
330
|
+
/**
|
|
331
|
+
* A version field which follows semver - e.g. v1.0.0
|
|
332
|
+
*/
|
|
333
|
+
version?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Using ISO 8601 with YYYY-MM-DDThh:mm:ss
|
|
336
|
+
*/
|
|
337
|
+
lastModified?: string;
|
|
338
|
+
[k: string]: unknown;
|
|
339
|
+
};
|
|
340
|
+
[k: string]: unknown;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Merges and validates resume data objects against the JSON Resume schema.
|
|
345
|
+
* @param yamlContents - An array of YAML strings containing resume data.
|
|
346
|
+
* @returns The merged and validated resume data.
|
|
347
|
+
* @throws Error if validation fails.
|
|
348
|
+
*/
|
|
349
|
+
declare function processResumeData(yamlContents: string[]): Promise<ResumeSchema>;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Load and parse resume files
|
|
353
|
+
*/
|
|
354
|
+
declare function loadResumeFiles(inputPath?: string): Promise<{
|
|
355
|
+
files: string[];
|
|
356
|
+
yamlContents: string[];
|
|
357
|
+
}>;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Load a theme module by name
|
|
361
|
+
* @param themeName The name of the theme to load
|
|
362
|
+
* @returns The loaded theme module
|
|
363
|
+
*/
|
|
364
|
+
declare function loadTheme(themeName: string): Promise<any>;
|
|
365
|
+
|
|
366
|
+
export { type ResumeSchema as Resume, loadResumeFiles, loadTheme, processResumeData };
|