resuml 1.20.1 → 2.0.0

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.
@@ -1,90 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") {
16
- for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
-
31
- // src/utils/themeLoader.ts
32
- import { execFileSync } from "child_process";
33
- import { createRequire } from "module";
34
- var require2 = createRequire(import.meta.url);
35
- function installTheme(packageName) {
36
- try {
37
- execFileSync("npm", ["install", packageName], {
38
- stdio: ["inherit", "pipe", "pipe"],
39
- encoding: "utf8"
40
- });
41
- } catch (error) {
42
- throw new Error(`Failed to install ${packageName}: ${error.message}`);
43
- }
44
- }
45
- function loadTheme(themeName, options) {
46
- let jsonResumeThemeName;
47
- let nativeThemeName;
48
- const autoInstall = options?.autoInstall !== false;
49
- try {
50
- jsonResumeThemeName = themeName.startsWith("jsonresume-theme-") ? themeName : `jsonresume-theme-${themeName}`;
51
- try {
52
- return require2(jsonResumeThemeName);
53
- } catch (_jsonResumeError) {
54
- nativeThemeName = `@resuml/theme-${themeName}`;
55
- try {
56
- return require2(nativeThemeName);
57
- } catch (_nativeError) {
58
- if (!autoInstall) {
59
- throw new Error(
60
- `Theme package ${jsonResumeThemeName} or ${nativeThemeName} not found in node_modules.
61
- Please install the theme package manually.`
62
- );
63
- }
64
- console.log(`\u{1F4E6} Theme ${jsonResumeThemeName} not found. Installing...`);
65
- try {
66
- installTheme(jsonResumeThemeName);
67
- console.log(`\u2705 Successfully installed ${jsonResumeThemeName}`);
68
- return require2(jsonResumeThemeName);
69
- } catch (installError) {
70
- throw new Error(
71
- `Failed to auto-install theme ${jsonResumeThemeName}: ${installError.message}`
72
- );
73
- }
74
- }
75
- }
76
- } catch (error) {
77
- if (error instanceof Error && error.message.includes("Failed to auto-install")) {
78
- throw error;
79
- }
80
- throw new Error(`Theme package ${themeName} not found`);
81
- }
82
- }
83
-
84
- export {
85
- __commonJS,
86
- __export,
87
- __toESM,
88
- loadTheme
89
- };
90
- //# sourceMappingURL=chunk-ZLA7NFYP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/themeLoader.ts"],"sourcesContent":["import { execFileSync } from 'child_process';\nimport { createRequire } from 'module';\n\nconst require = createRequire(import.meta.url);\n\nexport interface ThemeModule {\n render: (resume: Record<string, unknown>, options?: Record<string, unknown>) => string | Promise<string>;\n}\n\n/**\n * Install a theme package using npm\n * @param packageName The npm package name to install\n */\nfunction installTheme(packageName: string): void {\n try {\n execFileSync('npm', ['install', packageName], {\n stdio: ['inherit', 'pipe', 'pipe'],\n encoding: 'utf8',\n });\n } catch (error) {\n throw new Error(`Failed to install ${packageName}: ${(error as Error).message}`);\n }\n}\n\n/**\n * Load a theme module by name\n * @param themeName The name of the theme to load\n * @param options Optional settings (autoInstall: boolean)\n * @returns The loaded theme module\n */\nexport function loadTheme(themeName: string, options?: { autoInstall?: boolean }): ThemeModule {\n let jsonResumeThemeName: string;\n let nativeThemeName: string;\n const autoInstall = options?.autoInstall !== false;\n\n try {\n // Try loading as a JSON Resume theme\n jsonResumeThemeName = themeName.startsWith('jsonresume-theme-')\n ? themeName\n : `jsonresume-theme-${themeName}`;\n\n try {\n // Use require for CommonJS modules\n return require(jsonResumeThemeName) as ThemeModule;\n } catch (_jsonResumeError) {\n // If not found as JSON Resume theme, try as native theme\n nativeThemeName = `@resuml/theme-${themeName}`;\n try {\n return require(nativeThemeName) as ThemeModule;\n } catch (_nativeError) {\n if (!autoInstall) {\n throw new Error(\n `Theme package ${jsonResumeThemeName} or ${nativeThemeName} not found in node_modules.\\n` +\n `Please install the theme package manually.`\n );\n }\n // Both attempts failed - auto-install the theme\n console.log(`📦 Theme ${jsonResumeThemeName} not found. Installing...`);\n try {\n installTheme(jsonResumeThemeName);\n console.log(`✅ Successfully installed ${jsonResumeThemeName}`);\n // Try requiring again after installation\n return require(jsonResumeThemeName) as ThemeModule;\n } catch (installError) {\n throw new Error(\n `Failed to auto-install theme ${jsonResumeThemeName}: ${\n (installError as Error).message\n }`\n );\n }\n }\n }\n } catch (error) {\n // Re-throw if it's already our custom error\n if (error instanceof Error && error.message.includes('Failed to auto-install')) {\n throw error;\n }\n throw new Error(`Theme package ${themeName} not found`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAE9B,IAAMA,WAAU,cAAc,YAAY,GAAG;AAU7C,SAAS,aAAa,aAA2B;AAC/C,MAAI;AACF,iBAAa,OAAO,CAAC,WAAW,WAAW,GAAG;AAAA,MAC5C,OAAO,CAAC,WAAW,QAAQ,MAAM;AAAA,MACjC,UAAU;AAAA,IACZ,CAAC;AAAA,EACH,SAAS,OAAO;AACd,UAAM,IAAI,MAAM,qBAAqB,WAAW,KAAM,MAAgB,OAAO,EAAE;AAAA,EACjF;AACF;AAQO,SAAS,UAAU,WAAmB,SAAkD;AAC7F,MAAI;AACJ,MAAI;AACJ,QAAM,cAAc,SAAS,gBAAgB;AAE7C,MAAI;AAEF,0BAAsB,UAAU,WAAW,mBAAmB,IAC1D,YACA,oBAAoB,SAAS;AAEjC,QAAI;AAEF,aAAOA,SAAQ,mBAAmB;AAAA,IACpC,SAAS,kBAAkB;AAEzB,wBAAkB,iBAAiB,SAAS;AAC5C,UAAI;AACF,eAAOA,SAAQ,eAAe;AAAA,MAChC,SAAS,cAAc;AACrB,YAAI,CAAC,aAAa;AAChB,gBAAM,IAAI;AAAA,YACR,iBAAiB,mBAAmB,OAAO,eAAe;AAAA;AAAA,UAE5D;AAAA,QACF;AAEA,gBAAQ,IAAI,mBAAY,mBAAmB,2BAA2B;AACtE,YAAI;AACF,uBAAa,mBAAmB;AAChC,kBAAQ,IAAI,iCAA4B,mBAAmB,EAAE;AAE7D,iBAAOA,SAAQ,mBAAmB;AAAA,QACpC,SAAS,cAAc;AACrB,gBAAM,IAAI;AAAA,YACR,gCAAgC,mBAAmB,KAChD,aAAuB,OAC1B;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,SAAS,OAAO;AAEd,QAAI,iBAAiB,SAAS,MAAM,QAAQ,SAAS,wBAAwB,GAAG;AAC9E,YAAM;AAAA,IACR;AACA,UAAM,IAAI,MAAM,iBAAiB,SAAS,YAAY;AAAA,EACxD;AACF;","names":["require"]}
@@ -1,422 +0,0 @@
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
- interface ThemeModule {
360
- render: (resume: Record<string, unknown>, options?: Record<string, unknown>) => string | Promise<string>;
361
- }
362
- /**
363
- * Load a theme module by name
364
- * @param themeName The name of the theme to load
365
- * @param options Optional settings (autoInstall: boolean)
366
- * @returns The loaded theme module
367
- */
368
- declare function loadTheme(themeName: string, options?: {
369
- autoInstall?: boolean;
370
- }): ThemeModule;
371
-
372
- type AtsCheckCategory = 'contact' | 'content' | 'structure' | 'keywords';
373
- type AtsCheckWeight = 'high' | 'medium' | 'low';
374
- type AtsRating = 'excellent' | 'good' | 'needs-work' | 'poor';
375
- type AtsFitLevel = 'strong' | 'partial' | 'weak';
376
- interface AtsCheck {
377
- id: string;
378
- category: AtsCheckCategory;
379
- weight: AtsCheckWeight;
380
- passed: boolean;
381
- score: number;
382
- message: string;
383
- suggestion?: string;
384
- }
385
- interface AtsKeywordMatch {
386
- matched: string[];
387
- missing: string[];
388
- extra: string[];
389
- matchPercentage: number;
390
- }
391
- interface AtsFitAssessment {
392
- level: AtsFitLevel;
393
- message: string;
394
- }
395
- interface AtsResult {
396
- score: number;
397
- rating: AtsRating;
398
- checks: AtsCheck[];
399
- keywords?: AtsKeywordMatch;
400
- fitAssessment?: AtsFitAssessment;
401
- summary: string;
402
- }
403
- interface AtsOptions {
404
- language?: string;
405
- jobDescription?: string;
406
- threshold?: number;
407
- }
408
-
409
- /**
410
- * Run ATS analysis on a resume.
411
- *
412
- * Performs deterministic, offline checks:
413
- * 1. Generic best-practice checks (contact, content, structure)
414
- * 2. Optional job-description keyword matching
415
- *
416
- * @param resume - Validated resume data
417
- * @param options - ATS analysis options
418
- * @returns Full ATS analysis result with score, checks, and suggestions
419
- */
420
- declare function analyzeAts(resume: ResumeSchema, options?: AtsOptions): AtsResult;
421
-
422
- export { type AtsResult as A, type ResumeSchema as R, type ThemeModule as T, analyzeAts as a, type AtsOptions as b, type AtsCheck as c, type AtsKeywordMatch as d, type AtsFitAssessment as e, loadTheme as f, loadResumeFiles as l, processResumeData as p };
@@ -1,7 +0,0 @@
1
- import {
2
- loadTheme
3
- } from "./chunk-ZLA7NFYP.js";
4
- export {
5
- loadTheme
6
- };
7
- //# sourceMappingURL=themeLoader-ZGWEGYXG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,25 +0,0 @@
1
- import { build } from 'esbuild';
2
- import { resolve, dirname } from 'path';
3
- import { fileURLToPath } from 'url';
4
-
5
- const __dirname = dirname(fileURLToPath(import.meta.url));
6
-
7
- await build({
8
- entryPoints: [resolve(__dirname, '../src/builder/index.tsx')],
9
- bundle: true,
10
- minify: true,
11
- treeShaking: true,
12
- format: 'esm',
13
- target: 'es2022',
14
- outfile: resolve(__dirname, '../docs/app/main.js'),
15
- jsx: 'automatic',
16
- define: {
17
- 'process.env.NODE_ENV': '"production"',
18
- },
19
- loader: {
20
- '.ts': 'ts',
21
- '.tsx': 'tsx',
22
- },
23
- });
24
-
25
- console.log('✅ Builder built to docs/app/main.js');