Skip to content

Commit 0a214d5

Browse files
authored
Merge branch 'main' into 751-reorganize-src-folder-structure
2 parents 477a040 + cc46a0c commit 0a214d5

20 files changed

+6
-290
lines changed

src/definitions/address.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to addresses.
53
*/
@@ -99,36 +97,3 @@ export interface AddressDefinitions {
9997
// A list of timezones names.
10098
time_zone: string[];
10199
}
102-
103-
/**
104-
* Internal: A list of all keys for the AddressDefinitions.
105-
*/
106-
export const ADDRESS = allOf<keyof AddressDefinitions>()(
107-
'postcode_by_state',
108-
'postcode',
109-
110-
'city_name',
111-
'city_prefix',
112-
'city_suffix',
113-
114-
'country',
115-
'state',
116-
'state_abbr',
117-
'county',
118-
119-
'direction_abbr',
120-
'direction',
121-
122-
'building_number',
123-
124-
'street_prefix',
125-
'street_suffix',
126-
127-
'street_address',
128-
'secondary_address',
129-
130-
'country_code',
131-
'country_code_alpha_3',
132-
133-
'time_zone'
134-
);

src/definitions/animal.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to animals.
53
*/
@@ -19,23 +17,3 @@ export interface AnimalDefinitions {
1917
snake: string[];
2018
type: string[];
2119
}
22-
23-
/**
24-
* Internal: A list of all keys for the AnimalDefinitions.
25-
*/
26-
export const ANIMAL = allOf<keyof AnimalDefinitions>()(
27-
'dog',
28-
'cat',
29-
'snake',
30-
'bear',
31-
'lion',
32-
'cetacean',
33-
'insect',
34-
'crocodilia',
35-
'cow',
36-
'bird',
37-
'fish',
38-
'rabbit',
39-
'horse',
40-
'type'
41-
);

src/definitions/commerce.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to commerce.
53
*/
@@ -39,13 +37,3 @@ export interface CommerceProductNameDefinitions {
3937
*/
4038
product: string[];
4139
}
42-
43-
/**
44-
* Internal: A list of all keys for the CommerceDefinitions.
45-
*/
46-
export const COMMERCE = allOf<keyof CommerceDefinitions>()(
47-
'color',
48-
'department',
49-
'product_name',
50-
'product_description'
51-
);

src/definitions/company.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to companies.
53
*/
@@ -33,18 +31,3 @@ export interface CompanyDefinitions {
3331
*/
3432
suffix: string[];
3533
}
36-
37-
/**
38-
* Internal: A list of all keys for the CompanyDefinitions.
39-
*/
40-
export const COMPANY = allOf<keyof CompanyDefinitions>()(
41-
'bs_adjective',
42-
'bs_noun',
43-
'bs_verb',
44-
45-
'adjective',
46-
'descriptor',
47-
'noun',
48-
49-
'suffix'
50-
);

src/definitions/database.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to databases.
53
*/
@@ -21,13 +19,3 @@ export interface DatabaseDefinitions {
2119
*/
2220
type: string[];
2321
}
24-
25-
/**
26-
* Internal: A list of all keys for the DatabaseDefinitions.
27-
*/
28-
export const DATABASE = allOf<keyof DatabaseDefinitions>()(
29-
'collation',
30-
'column',
31-
'engine',
32-
'type'
33-
);

src/definitions/date.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to dates.
53
*/
@@ -37,8 +35,3 @@ export interface DateEntryDefinition {
3735
*/
3836
abbr_context?: string[];
3937
}
40-
41-
/**
42-
* Internal: A list of all keys for the DateDefinitions.
43-
*/
44-
export const DATE = allOf<keyof DateDefinitions>()('month', 'weekday');

src/definitions/definitions.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,19 @@
11
import type { AddressDefinitions } from './address';
2-
import { ADDRESS } from './address';
32
import type { AnimalDefinitions } from './animal';
4-
import { ANIMAL } from './animal';
53
import type { CommerceDefinitions } from './commerce';
6-
import { COMMERCE } from './commerce';
74
import type { CompanyDefinitions } from './company';
8-
import { COMPANY } from './company';
95
import type { DatabaseDefinitions } from './database';
10-
import { DATABASE } from './database';
116
import type { DateDefinitions } from './date';
12-
import { DATE } from './date';
137
import type { FinanceDefinitions } from './finance';
14-
import { FINANCE } from './finance';
158
import type { HackerDefinitions } from './hacker';
16-
import { HACKER } from './hacker';
179
import type { InternetDefinitions } from './internet';
18-
import { INTERNET } from './internet';
1910
import type { LoremDefinitions } from './lorem';
20-
import { LOREM } from './lorem';
2111
import type { MusicDefinitions } from './music';
22-
import { MUSIC } from './music';
2312
import type { NameDefinitions } from './name';
24-
import { NAME } from './name';
2513
import type { PhoneNumberDefinitions } from './phone_number';
26-
import { PHONE_NUMBER } from './phone_number';
2714
import type { SystemDefinitions } from './system';
28-
import { SYSTEM } from './system';
2915
import type { VehicleDefinitions } from './vehicle';
30-
import { VEHICLE } from './vehicle';
3116
import type { WordDefinitions } from './word';
32-
import { WORD } from './word';
3317

3418
/**
3519
* The definitions as used by the Faker modules.
@@ -84,29 +68,3 @@ export type DefinitionTypes = {
8468
} & {
8569
readonly [module in keyof Definitions]: Array<keyof Definitions[module]>;
8670
};
87-
88-
/**
89-
* Internal: List off all modules and their properties,
90-
* that needs to have a fallback generated in Faker.loadDefinitions().
91-
*/
92-
export const DEFINITIONS: DefinitionTypes = {
93-
title: 'metadata',
94-
separator: 'metadata',
95-
96-
address: ADDRESS,
97-
animal: ANIMAL,
98-
company: COMPANY,
99-
commerce: COMMERCE,
100-
database: DATABASE,
101-
date: DATE,
102-
finance: FINANCE,
103-
hacker: HACKER,
104-
internet: INTERNET,
105-
lorem: LOREM,
106-
music: MUSIC,
107-
name: NAME,
108-
phone_number: PHONE_NUMBER,
109-
system: SYSTEM,
110-
vehicle: VEHICLE,
111-
word: WORD,
112-
};

src/definitions/finance.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to finances.
53
*/
@@ -38,13 +36,3 @@ export interface FinanceCurrencyEntryDefinitions {
3836
*/
3937
symbol: string;
4038
}
41-
42-
/**
43-
* Internal: A list of all keys for the FinanceDefinitions.
44-
*/
45-
export const FINANCE = allOf<keyof FinanceDefinitions>()(
46-
'account_type',
47-
'credit_card',
48-
'currency',
49-
'transaction_type'
50-
);

src/definitions/hacker.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to computers.
53
*/
@@ -33,15 +31,3 @@ export interface HackerDefinitions {
3331
*/
3432
verb: string[];
3533
}
36-
37-
/**
38-
* Internal: A list of all keys for the HackerDefinitions.
39-
*/
40-
export const HACKER = allOf<keyof HackerDefinitions>()(
41-
'abbreviation',
42-
'adjective',
43-
'ingverb',
44-
'noun',
45-
'phrase',
46-
'verb'
47-
);

src/definitions/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export type {
77
export type { CompanyDefinitions } from './company';
88
export type { DatabaseDefinitions } from './database';
99
export type { DateDefinitions, DateEntryDefinition } from './date';
10-
export { DEFINITIONS } from './definitions';
1110
export type { DefinitionTypes, LocaleDefinition } from './definitions';
1211
export type {
1312
FinanceCurrencyEntryDefinitions,

src/definitions/internet.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { EmojiType } from '../modules/internet';
2-
import { allOf } from './utils';
32

43
/**
54
* The possible definitions related to internet stuff.
@@ -22,13 +21,3 @@ export interface InternetDefinitions {
2221
*/
2322
emoji: Record<EmojiType, string[]>;
2423
}
25-
26-
/**
27-
* Internal: A list of all keys for the InternetDefinitions.
28-
*/
29-
export const INTERNET = allOf<keyof InternetDefinitions>()(
30-
'domain_suffix',
31-
'example_email',
32-
'free_email',
33-
'emoji'
34-
);

src/definitions/lorem.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to lorem texts.
53
*/
@@ -9,8 +7,3 @@ export interface LoremDefinitions {
97
*/
108
words: string[];
119
}
12-
13-
/**
14-
* Internal: A list of all keys for the LoremDefinitions.
15-
*/
16-
export const LOREM = allOf<keyof LoremDefinitions>()('words');

src/definitions/music.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to music.
53
*/
@@ -9,8 +7,3 @@ export interface MusicDefinitions {
97
*/
108
genre: string[];
119
}
12-
13-
/**
14-
* Internal: A list of all keys for the MusicDefinitions.
15-
*/
16-
export const MUSIC = allOf<keyof MusicDefinitions>()('genre');

src/definitions/name.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to people's names.
53
*/
@@ -41,33 +39,3 @@ export interface NameTitleDefinitions {
4139
job: string[];
4240
level?: string[];
4341
}
44-
45-
/**
46-
* Internal: A list of all keys for the NameDefinitions.
47-
*/
48-
export const NAME = allOf<keyof NameDefinitions>()(
49-
'gender',
50-
'binary_gender',
51-
52-
'prefix',
53-
'female_prefix',
54-
'male_prefix',
55-
56-
'first_name',
57-
'female_first_name',
58-
'male_first_name',
59-
60-
'middle_name',
61-
'female_middle_name',
62-
'male_middle_name',
63-
64-
'last_name',
65-
'female_last_name',
66-
'male_last_name',
67-
68-
'suffix',
69-
70-
'name',
71-
72-
'title'
73-
);

src/definitions/phone_number.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to phone numbers.
53
*/
@@ -14,8 +12,3 @@ export interface PhoneNumberDefinitions {
1412
*/
1513
formats: string[];
1614
}
17-
18-
/**
19-
* Internal: A list of all keys for the PhoneNumberDefinitions.
20-
*/
21-
export const PHONE_NUMBER = allOf<keyof PhoneNumberDefinitions>()('formats');

src/definitions/system.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { allOf } from './utils';
2-
31
/**
42
* The possible definitions related to files and the system.
53
*/
@@ -23,11 +21,3 @@ export interface SystemMimeTypeEntryDefinitions {
2321
compressible?: boolean;
2422
charset?: string;
2523
}
26-
27-
/**
28-
* Internal: A list of all keys for the SystemDefinitions.
29-
*/
30-
export const SYSTEM = allOf<keyof SystemDefinitions>()(
31-
'directoryPaths',
32-
'mimeTypes'
33-
);

0 commit comments

Comments
 (0)