🚀 release: v3.0.0

This commit is contained in:
Amruth Pillai
2022-03-02 17:44:11 +01:00
parent 2175256310
commit 295172687b
352 changed files with 30932 additions and 0 deletions

0
libs/.gitkeep Normal file
View File

View File

@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}

11
libs/schema/README.md Normal file
View File

@ -0,0 +1,11 @@
# schema
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build schema` to build the library.
## Running unit tests
Run `nx test schema` to execute the unit tests via [Jest](https://jestjs.io).

View File

@ -0,0 +1,14 @@
module.exports = {
displayName: 'schema',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/schema',
};

5
libs/schema/package.json Normal file
View File

@ -0,0 +1,5 @@
{
"name": "@reactive-resume/schema",
"version": "0.0.1",
"type": "commonjs"
}

33
libs/schema/project.json Normal file
View File

@ -0,0 +1,33 @@
{
"root": "libs/schema",
"sourceRoot": "libs/schema/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/schema",
"main": "libs/schema/src/index.ts",
"tsConfig": "libs/schema/tsconfig.lib.json",
"assets": ["libs/schema/*.md"]
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/schema/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/schema"],
"options": {
"jestConfig": "libs/schema/jest.config.js",
"passWithNoTests": true
}
}
},
"tags": []
}

8
libs/schema/src/index.ts Normal file
View File

@ -0,0 +1,8 @@
export * from './lib/atoms';
export * from './lib/basics';
export * from './lib/fonts';
export * from './lib/integrations';
export * from './lib/metadata';
export * from './lib/resume';
export * from './lib/section';
export * from './lib/user';

View File

@ -0,0 +1,4 @@
export type DateRange = {
start?: string;
end?: string;
};

View File

@ -0,0 +1,41 @@
export type Location = {
address?: string;
city?: string;
region?: string;
country?: string;
postalCode?: string;
};
export type Profile = {
id?: string;
network?: string;
username?: string;
url?: string;
};
export type PhotoShape = 'square' | 'rounded-square' | 'circle';
export type PhotoFilters = {
size: number;
shape: PhotoShape;
border: boolean;
grayscale: boolean;
};
export type Photo = {
url?: string;
visible: boolean;
filters: PhotoFilters;
};
export type Basics = {
name?: string;
photo?: Photo;
email?: string;
phone?: string;
website?: string;
headline?: string;
summary?: string;
location?: Location;
profiles?: Profile[];
};

View File

@ -0,0 +1,18 @@
export enum FontCategory {
'display' = 'display',
'handwriting' = 'handwriting',
'monospace' = 'monospace',
'sans-serif' = 'sans-serif',
'serif' = 'serif',
}
export type Font = {
family: string;
variants: string[];
subsets: string[];
version: string;
lastModified: string;
files: Record<string, string>;
category: FontCategory;
kind: string;
};

View File

@ -0,0 +1 @@
export type Integration = 'linkedin' | 'json-resume' | 'reactive-resume';

View File

@ -0,0 +1,32 @@
export type CustomCSS = {
value: string;
visible: boolean;
};
export type Theme = {
text: string;
background: string;
primary: string;
};
export type TypeCategory = 'heading' | 'body';
export type TypeProperty = 'family' | 'size';
export type Typography = {
family: Record<TypeCategory, string>;
size: Record<TypeCategory, number>;
};
export type DateConfig = {
format: string;
};
export type Metadata = {
css: CustomCSS;
theme: Theme;
layout: string[][][]; // page.column.section
template: string;
typography: Typography;
date: DateConfig;
language: string;
};

View File

@ -0,0 +1,19 @@
import { Basics } from './basics';
import { Metadata } from './metadata';
import { Section } from './section';
import { User } from './user';
export type Resume = {
id: number;
shortId: string;
name: string;
slug: string;
image: string;
user: User;
basics: Basics;
sections: Record<string, Section>;
metadata: Metadata;
public: boolean;
createdAt: Date;
updatedAt: Date;
};

View File

@ -0,0 +1,139 @@
import { DateRange } from './atoms';
import { Profile } from './basics';
export type WorkExperience = {
id?: string;
name: string;
position: string;
date?: DateRange;
url?: string;
summary?: string;
};
export type Education = {
id?: string;
institution: string;
degree: string;
area?: string;
score?: string;
date?: DateRange;
url?: string;
summary?: string;
courses?: string[];
};
export type Award = {
id?: string;
title: string;
awarder: string;
date?: string;
url?: string;
summary?: string;
};
export type Certificate = {
id?: string;
name: string;
issuer: string;
date?: string;
url?: string;
summary?: string;
};
export type Volunteer = {
id?: string;
organization: string;
position: string;
date?: DateRange;
url?: string;
summary?: string;
};
export type Publication = {
id?: string;
name: string;
publisher: string;
date?: string;
url?: string;
summary?: string;
};
export type Skill = {
id?: string;
name: string;
level: string;
levelNum: number;
keywords?: string[];
};
export type Language = {
id?: string;
name: string;
level: string;
levelNum: number;
};
export type Interest = {
id?: string;
name: string;
keywords?: string[];
};
export type Project = {
id?: string;
name: string;
description: string;
date?: DateRange;
url?: string;
summary?: string;
keywords?: string[];
};
export type Reference = {
id?: string;
name: string;
relationship: string;
phone?: string;
email?: string;
summary?: string;
};
export type Custom = {
id?: string;
title: string;
subtitle?: string;
date?: DateRange;
url?: string;
level?: string;
levelNum?: number;
summary?: string;
keywords?: string[];
};
export type ListItem =
| Award
| Certificate
| Education
| Interest
| Language
| Profile
| Project
| Publication
| Reference
| Skill
| Volunteer
| WorkExperience
| Custom;
export type SectionType = 'basic' | 'custom';
export type SectionPath = `sections.${string}`;
export type Section = {
id?: string;
name?: string;
type?: SectionType;
columns?: number;
visible?: boolean;
items?: ListItem[];
};

View File

@ -0,0 +1,14 @@
import { Resume } from './resume';
export type User = {
id: number;
name: string;
username: string;
email: string;
password?: string;
provider: 'email' | 'google';
resetToken?: string;
resumes: Resume[];
createdAt: Date;
updatedAt: Date;
};

22
libs/schema/tsconfig.json Normal file
View File

@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "CommonJS",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

View File

@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": []
},
"include": ["**/*.ts"],
"exclude": ["**/*.spec.ts"]
}

View File

@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}