@zero-server/sdk 0.9.1 → 0.9.3
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/LICENSE +21 -21
- package/README.md +460 -443
- package/index.js +414 -412
- package/lib/app.js +1172 -1172
- package/lib/auth/authorize.js +399 -399
- package/lib/auth/enrollment.js +367 -367
- package/lib/auth/index.js +57 -57
- package/lib/auth/jwt.js +731 -731
- package/lib/auth/oauth.js +362 -362
- package/lib/auth/session.js +588 -588
- package/lib/auth/trustedDevice.js +409 -409
- package/lib/auth/twoFactor.js +1150 -1150
- package/lib/auth/webauthn.js +946 -946
- package/lib/body/index.js +14 -14
- package/lib/body/json.js +109 -109
- package/lib/body/multipart.js +440 -440
- package/lib/body/raw.js +71 -71
- package/lib/body/rawBuffer.js +160 -160
- package/lib/body/sendError.js +25 -25
- package/lib/body/text.js +75 -75
- package/lib/body/typeMatch.js +41 -41
- package/lib/body/urlencoded.js +235 -235
- package/lib/cli.js +845 -845
- package/lib/cluster.js +666 -666
- package/lib/debug.js +372 -372
- package/lib/env/index.js +465 -465
- package/lib/errors.js +683 -683
- package/lib/fetch/index.js +256 -256
- package/lib/grpc/balancer.js +378 -378
- package/lib/grpc/call.js +708 -708
- package/lib/grpc/client.js +764 -764
- package/lib/grpc/codec.js +1221 -1221
- package/lib/grpc/credentials.js +398 -398
- package/lib/grpc/frame.js +262 -262
- package/lib/grpc/health.js +287 -287
- package/lib/grpc/index.js +121 -121
- package/lib/grpc/metadata.js +461 -461
- package/lib/grpc/proto.js +821 -821
- package/lib/grpc/reflection.js +590 -590
- package/lib/grpc/server.js +445 -445
- package/lib/grpc/status.js +118 -118
- package/lib/grpc/watch.js +173 -173
- package/lib/http/index.js +10 -10
- package/lib/http/request.js +727 -727
- package/lib/http/response.js +799 -799
- package/lib/lifecycle.js +557 -557
- package/lib/middleware/compress.js +230 -230
- package/lib/middleware/cookieParser.js +237 -237
- package/lib/middleware/cors.js +93 -93
- package/lib/middleware/csrf.js +137 -137
- package/lib/middleware/errorHandler.js +101 -101
- package/lib/middleware/helmet.js +175 -175
- package/lib/middleware/index.js +19 -17
- package/lib/middleware/logger.js +74 -74
- package/lib/middleware/rateLimit.js +88 -88
- package/lib/middleware/requestId.js +53 -53
- package/lib/middleware/static.js +326 -326
- package/lib/middleware/timeout.js +71 -71
- package/lib/middleware/validator.js +255 -255
- package/lib/observe/health.js +326 -326
- package/lib/observe/index.js +50 -50
- package/lib/observe/logger.js +359 -359
- package/lib/observe/metrics.js +805 -805
- package/lib/observe/tracing.js +592 -592
- package/lib/orm/adapters/json.js +290 -290
- package/lib/orm/adapters/memory.js +764 -764
- package/lib/orm/adapters/mongo.js +764 -764
- package/lib/orm/adapters/mysql.js +933 -933
- package/lib/orm/adapters/postgres.js +1144 -1144
- package/lib/orm/adapters/redis.js +1534 -1534
- package/lib/orm/adapters/sql-base.js +212 -212
- package/lib/orm/adapters/sqlite.js +858 -858
- package/lib/orm/audit.js +649 -649
- package/lib/orm/cache.js +394 -394
- package/lib/orm/geo.js +387 -387
- package/lib/orm/index.js +784 -784
- package/lib/orm/migrate.js +432 -432
- package/lib/orm/model.js +1706 -1706
- package/lib/orm/plugin.js +375 -375
- package/lib/orm/procedures.js +836 -836
- package/lib/orm/profiler.js +233 -233
- package/lib/orm/query.js +1772 -1772
- package/lib/orm/replicas.js +241 -241
- package/lib/orm/schema.js +307 -307
- package/lib/orm/search.js +380 -380
- package/lib/orm/seed/data/commerce.js +136 -136
- package/lib/orm/seed/data/internet.js +111 -111
- package/lib/orm/seed/data/locations.js +204 -204
- package/lib/orm/seed/data/names.js +338 -338
- package/lib/orm/seed/data/person.js +128 -128
- package/lib/orm/seed/data/phone.js +211 -211
- package/lib/orm/seed/data/words.js +134 -134
- package/lib/orm/seed/factory.js +178 -178
- package/lib/orm/seed/fake.js +1186 -1186
- package/lib/orm/seed/index.js +18 -18
- package/lib/orm/seed/rng.js +70 -70
- package/lib/orm/seed/seeder.js +124 -124
- package/lib/orm/seed/unique.js +68 -68
- package/lib/orm/snapshot.js +366 -366
- package/lib/orm/tenancy.js +605 -605
- package/lib/orm/views.js +350 -350
- package/lib/router/index.js +436 -436
- package/lib/sse/index.js +8 -8
- package/lib/sse/stream.js +349 -349
- package/lib/ws/connection.js +451 -451
- package/lib/ws/handshake.js +125 -125
- package/lib/ws/index.js +14 -14
- package/lib/ws/room.js +223 -223
- package/package.json +73 -73
- package/types/app.d.ts +223 -223
- package/types/auth.d.ts +520 -520
- package/types/body.d.ts +14 -0
- package/types/cli.d.ts +2 -0
- package/types/cluster.d.ts +75 -75
- package/types/env.d.ts +80 -80
- package/types/errors.d.ts +316 -316
- package/types/fetch.d.ts +43 -43
- package/types/grpc.d.ts +432 -432
- package/types/index.d.ts +384 -384
- package/types/lifecycle.d.ts +60 -60
- package/types/middleware.d.ts +320 -320
- package/types/observe.d.ts +304 -304
- package/types/orm.d.ts +1887 -1887
- package/types/request.d.ts +109 -109
- package/types/response.d.ts +157 -157
- package/types/router.d.ts +78 -78
- package/types/sse.d.ts +78 -78
- package/types/websocket.d.ts +126 -126
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @module seed/data/commerce
|
|
5
|
-
* @description Data pools for commerce, product, and company fake data.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/** Adjectives applied to product names. */
|
|
9
|
-
const PRODUCT_ADJECTIVES = [
|
|
10
|
-
'Ergonomic', 'Electronic', 'Smart', 'Professional', 'Ultra', 'Premium',
|
|
11
|
-
'Heavy-Duty', 'Lightweight', 'Compact', 'Portable', 'Advanced', 'Wireless',
|
|
12
|
-
'Digital', 'Classic', 'Modern', 'Handcrafted', 'Luxurious', 'Eco-Friendly',
|
|
13
|
-
'Industrial', 'Vintage', 'Rustic', 'Sleek', 'Durable', 'Flexible',
|
|
14
|
-
'Multi-Purpose', 'Automated', 'Intelligent', 'Refined', 'Next-Gen', 'Essential',
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
/** Materials for product names. */
|
|
18
|
-
const PRODUCT_MATERIALS = [
|
|
19
|
-
'Steel', 'Wooden', 'Leather', 'Plastic', 'Marble', 'Metal', 'Concrete',
|
|
20
|
-
'Bronze', 'Bamboo', 'Aluminum', 'Carbon Fiber', 'Ceramic', 'Glass',
|
|
21
|
-
'Crystal', 'Silk', 'Cotton', 'Copper', 'Iron', 'Granite', 'Rubber',
|
|
22
|
-
'Titanium', 'Brass', 'Linen', 'Mesh', 'Polyester', 'Nylon', 'Wool',
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
/** Product category nouns. */
|
|
26
|
-
const PRODUCT_NOUNS = [
|
|
27
|
-
'Chair', 'Table', 'Shirt', 'Ball', 'Gloves', 'Pants', 'Shoes', 'Hat',
|
|
28
|
-
'Keyboard', 'Mouse', 'Monitor', 'Laptop', 'Phone', 'Tablet', 'Speaker',
|
|
29
|
-
'Watch', 'Bag', 'Wallet', 'Coat', 'Glasses', 'Lamp', 'Desk', 'Shelf',
|
|
30
|
-
'Pillow', 'Blanket', 'Towel', 'Mug', 'Bottle', 'Bowl', 'Knife', 'Pan',
|
|
31
|
-
'Bike', 'Helmet', 'Rack', 'Stand', 'Holder', 'Case', 'Cover', 'Mount',
|
|
32
|
-
'Charger', 'Cable', 'Drive', 'Camera', 'Headphones', 'Microphone', 'Printer',
|
|
33
|
-
'Mat', 'Brush', 'Comb', 'Mirror', 'Clock', 'Frame', 'Candle', 'Vase',
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
/** Top-level product category names. */
|
|
37
|
-
const CATEGORIES = [
|
|
38
|
-
'Electronics', 'Clothing & Apparel', 'Food & Beverages', 'Home & Garden',
|
|
39
|
-
'Sports & Outdoors', 'Books & Media', 'Toys & Games', 'Health & Beauty',
|
|
40
|
-
'Automotive', 'Office Supplies', 'Jewelry & Accessories', 'Pet Supplies',
|
|
41
|
-
'Baby & Kids', 'Tools & Hardware', 'Travel & Luggage', 'Music & Instruments',
|
|
42
|
-
'Art & Crafts', 'Software & Apps', 'Industrial Equipment', 'Collectibles',
|
|
43
|
-
'Furniture', 'Kitchen & Dining', 'Lighting', 'Garden Tools', 'Fitness',
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
/** Business department names. */
|
|
47
|
-
const DEPARTMENTS = [
|
|
48
|
-
'Engineering', 'Marketing', 'Sales', 'Finance', 'Human Resources',
|
|
49
|
-
'Operations', 'Legal', 'Product', 'Design', 'Customer Success',
|
|
50
|
-
'Research & Development', 'IT', 'Security', 'Data Science', 'Supply Chain',
|
|
51
|
-
'Quality Assurance', 'Business Development', 'Communications', 'Analytics',
|
|
52
|
-
'Compliance', 'Strategy', 'Procurement', 'Manufacturing', 'Logistics',
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
/** First part of a generated company name. */
|
|
56
|
-
const COMPANY_ADJECTIVES = [
|
|
57
|
-
'Innovative', 'Global', 'Dynamic', 'Advanced', 'Premier', 'Elite',
|
|
58
|
-
'National', 'Digital', 'Strategic', 'Integrated', 'Unified', 'Nexus',
|
|
59
|
-
'Alpha', 'Apex', 'Vertex', 'Summit', 'Pinnacle', 'Horizon', 'Stellar',
|
|
60
|
-
'Quantum', 'Fusion', 'Synergy', 'Core', 'Prime', 'Precision', 'Vantage',
|
|
61
|
-
'Catalyst', 'Axiom', 'Aether', 'Titanium', 'Ironclad', 'Luminary',
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
/** Second part of a generated company name. */
|
|
65
|
-
const COMPANY_NOUNS = [
|
|
66
|
-
'Technologies', 'Solutions', 'Systems', 'Industries', 'Group',
|
|
67
|
-
'Partners', 'Ventures', 'Labs', 'Works', 'Consulting', 'Services',
|
|
68
|
-
'Analytics', 'Media', 'Networks', 'Designs', 'Innovations', 'Enterprises',
|
|
69
|
-
'Digital', 'Cloud', 'Data', 'Security', 'Health', 'Finance', 'Capital',
|
|
70
|
-
'Dynamics', 'Intelligence', 'Platforms', 'Insights', 'Studio', 'Agency',
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
/** Company legal-entity suffixes. */
|
|
74
|
-
const COMPANY_SUFFIXES = [
|
|
75
|
-
'Inc.', 'LLC', 'Corp.', 'Ltd.', 'Co.', 'Group', 'Holdings', 'International',
|
|
76
|
-
];
|
|
77
|
-
|
|
78
|
-
/** Industry sector names. */
|
|
79
|
-
const INDUSTRIES = [
|
|
80
|
-
'Information Technology', 'Financial Services', 'Healthcare', 'Retail',
|
|
81
|
-
'Manufacturing', 'Transportation & Logistics', 'Media & Entertainment',
|
|
82
|
-
'Telecommunications', 'Education', 'Real Estate', 'Hospitality & Tourism',
|
|
83
|
-
'Aerospace & Defense', 'Energy & Utilities', 'Agriculture', 'Construction',
|
|
84
|
-
'Pharmaceuticals', 'Automotive', 'Insurance', 'Non-Profit', 'Government',
|
|
85
|
-
'Consulting', 'E-commerce', 'Cybersecurity', 'Artificial Intelligence',
|
|
86
|
-
'Blockchain & Crypto', 'Biotechnology', 'Clean Energy', 'Legal Services',
|
|
87
|
-
];
|
|
88
|
-
|
|
89
|
-
/** Buzzword adjectives for catch phrases. */
|
|
90
|
-
const CATCH_PHRASE_ADJECTIVES = [
|
|
91
|
-
'Adaptive', 'Advanced', 'Automated', 'Balanced', 'Business-focused',
|
|
92
|
-
'Centralized', 'Compatible', 'Configurable', 'Cross-platform', 'Customer-focused',
|
|
93
|
-
'Decentralized', 'Digitized', 'Distributed', 'Enhanced', 'Enterprise-wide',
|
|
94
|
-
'Ergonomic', 'Expanded', 'Face to face', 'Focused', 'Front-line',
|
|
95
|
-
'Fully-configurable', 'Function-based', 'Future-proofed', 'Horizontal',
|
|
96
|
-
'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Managed', 'Monitored',
|
|
97
|
-
'Multi-channelled', 'Multi-lateral', 'Multi-tiered', 'Networked', 'Object-based',
|
|
98
|
-
'Open-architected', 'Open-source', 'Optimized', 'Organic', 'Organized',
|
|
99
|
-
'Pre-emptive', 'Proactive', 'Profit-focused', 'Programmable', 'Progressive',
|
|
100
|
-
'Quality-focused', 'Re-engineered', 'Reactive', 'Reduced', 'Right-sized',
|
|
101
|
-
'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Streamlined', 'Synchronized',
|
|
102
|
-
'Synergistic', 'Team-oriented', 'Universal', 'User-centric', 'User-friendly',
|
|
103
|
-
'Versatile', 'Virtual', 'Visionary', 'Vision-oriented',
|
|
104
|
-
];
|
|
105
|
-
|
|
106
|
-
/** Buzzword nouns for catch phrases. */
|
|
107
|
-
const CATCH_PHRASE_NOUNS = [
|
|
108
|
-
'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'archive',
|
|
109
|
-
'array', 'attitude', 'benchmark', 'capability', 'capacity', 'challenge',
|
|
110
|
-
'circuit', 'collaboration', 'complexity', 'concept', 'contingency',
|
|
111
|
-
'core', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding',
|
|
112
|
-
'encryption', 'extranet', 'firmware', 'flexibility', 'focus group',
|
|
113
|
-
'forecast', 'frame', 'framework', 'function', 'functionalities', 'hub',
|
|
114
|
-
'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation',
|
|
115
|
-
'instruction set', 'interface', 'internet solution', 'intranet', 'knowledge user',
|
|
116
|
-
'knowledge base', 'local area network', 'leverage', 'matrix', 'methodology',
|
|
117
|
-
'middleware', 'migration', 'model', 'moderator', 'moratorium', 'neural-net',
|
|
118
|
-
'open architecture', 'open system', 'orchestration', 'paradigm', 'policy',
|
|
119
|
-
'portal', 'pricing structure', 'process improvement', 'product', 'productivity',
|
|
120
|
-
'project', 'projection', 'protocol', 'throughput', 'time-frame', 'toolset',
|
|
121
|
-
'transition', 'utilisation', 'website', 'workforce',
|
|
122
|
-
];
|
|
123
|
-
|
|
124
|
-
module.exports = {
|
|
125
|
-
PRODUCT_ADJECTIVES,
|
|
126
|
-
PRODUCT_MATERIALS,
|
|
127
|
-
PRODUCT_NOUNS,
|
|
128
|
-
CATEGORIES,
|
|
129
|
-
DEPARTMENTS,
|
|
130
|
-
COMPANY_ADJECTIVES,
|
|
131
|
-
COMPANY_NOUNS,
|
|
132
|
-
COMPANY_SUFFIXES,
|
|
133
|
-
INDUSTRIES,
|
|
134
|
-
CATCH_PHRASE_ADJECTIVES,
|
|
135
|
-
CATCH_PHRASE_NOUNS,
|
|
136
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @module seed/data/commerce
|
|
5
|
+
* @description Data pools for commerce, product, and company fake data.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Adjectives applied to product names. */
|
|
9
|
+
const PRODUCT_ADJECTIVES = [
|
|
10
|
+
'Ergonomic', 'Electronic', 'Smart', 'Professional', 'Ultra', 'Premium',
|
|
11
|
+
'Heavy-Duty', 'Lightweight', 'Compact', 'Portable', 'Advanced', 'Wireless',
|
|
12
|
+
'Digital', 'Classic', 'Modern', 'Handcrafted', 'Luxurious', 'Eco-Friendly',
|
|
13
|
+
'Industrial', 'Vintage', 'Rustic', 'Sleek', 'Durable', 'Flexible',
|
|
14
|
+
'Multi-Purpose', 'Automated', 'Intelligent', 'Refined', 'Next-Gen', 'Essential',
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
/** Materials for product names. */
|
|
18
|
+
const PRODUCT_MATERIALS = [
|
|
19
|
+
'Steel', 'Wooden', 'Leather', 'Plastic', 'Marble', 'Metal', 'Concrete',
|
|
20
|
+
'Bronze', 'Bamboo', 'Aluminum', 'Carbon Fiber', 'Ceramic', 'Glass',
|
|
21
|
+
'Crystal', 'Silk', 'Cotton', 'Copper', 'Iron', 'Granite', 'Rubber',
|
|
22
|
+
'Titanium', 'Brass', 'Linen', 'Mesh', 'Polyester', 'Nylon', 'Wool',
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
/** Product category nouns. */
|
|
26
|
+
const PRODUCT_NOUNS = [
|
|
27
|
+
'Chair', 'Table', 'Shirt', 'Ball', 'Gloves', 'Pants', 'Shoes', 'Hat',
|
|
28
|
+
'Keyboard', 'Mouse', 'Monitor', 'Laptop', 'Phone', 'Tablet', 'Speaker',
|
|
29
|
+
'Watch', 'Bag', 'Wallet', 'Coat', 'Glasses', 'Lamp', 'Desk', 'Shelf',
|
|
30
|
+
'Pillow', 'Blanket', 'Towel', 'Mug', 'Bottle', 'Bowl', 'Knife', 'Pan',
|
|
31
|
+
'Bike', 'Helmet', 'Rack', 'Stand', 'Holder', 'Case', 'Cover', 'Mount',
|
|
32
|
+
'Charger', 'Cable', 'Drive', 'Camera', 'Headphones', 'Microphone', 'Printer',
|
|
33
|
+
'Mat', 'Brush', 'Comb', 'Mirror', 'Clock', 'Frame', 'Candle', 'Vase',
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
/** Top-level product category names. */
|
|
37
|
+
const CATEGORIES = [
|
|
38
|
+
'Electronics', 'Clothing & Apparel', 'Food & Beverages', 'Home & Garden',
|
|
39
|
+
'Sports & Outdoors', 'Books & Media', 'Toys & Games', 'Health & Beauty',
|
|
40
|
+
'Automotive', 'Office Supplies', 'Jewelry & Accessories', 'Pet Supplies',
|
|
41
|
+
'Baby & Kids', 'Tools & Hardware', 'Travel & Luggage', 'Music & Instruments',
|
|
42
|
+
'Art & Crafts', 'Software & Apps', 'Industrial Equipment', 'Collectibles',
|
|
43
|
+
'Furniture', 'Kitchen & Dining', 'Lighting', 'Garden Tools', 'Fitness',
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
/** Business department names. */
|
|
47
|
+
const DEPARTMENTS = [
|
|
48
|
+
'Engineering', 'Marketing', 'Sales', 'Finance', 'Human Resources',
|
|
49
|
+
'Operations', 'Legal', 'Product', 'Design', 'Customer Success',
|
|
50
|
+
'Research & Development', 'IT', 'Security', 'Data Science', 'Supply Chain',
|
|
51
|
+
'Quality Assurance', 'Business Development', 'Communications', 'Analytics',
|
|
52
|
+
'Compliance', 'Strategy', 'Procurement', 'Manufacturing', 'Logistics',
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
/** First part of a generated company name. */
|
|
56
|
+
const COMPANY_ADJECTIVES = [
|
|
57
|
+
'Innovative', 'Global', 'Dynamic', 'Advanced', 'Premier', 'Elite',
|
|
58
|
+
'National', 'Digital', 'Strategic', 'Integrated', 'Unified', 'Nexus',
|
|
59
|
+
'Alpha', 'Apex', 'Vertex', 'Summit', 'Pinnacle', 'Horizon', 'Stellar',
|
|
60
|
+
'Quantum', 'Fusion', 'Synergy', 'Core', 'Prime', 'Precision', 'Vantage',
|
|
61
|
+
'Catalyst', 'Axiom', 'Aether', 'Titanium', 'Ironclad', 'Luminary',
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
/** Second part of a generated company name. */
|
|
65
|
+
const COMPANY_NOUNS = [
|
|
66
|
+
'Technologies', 'Solutions', 'Systems', 'Industries', 'Group',
|
|
67
|
+
'Partners', 'Ventures', 'Labs', 'Works', 'Consulting', 'Services',
|
|
68
|
+
'Analytics', 'Media', 'Networks', 'Designs', 'Innovations', 'Enterprises',
|
|
69
|
+
'Digital', 'Cloud', 'Data', 'Security', 'Health', 'Finance', 'Capital',
|
|
70
|
+
'Dynamics', 'Intelligence', 'Platforms', 'Insights', 'Studio', 'Agency',
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
/** Company legal-entity suffixes. */
|
|
74
|
+
const COMPANY_SUFFIXES = [
|
|
75
|
+
'Inc.', 'LLC', 'Corp.', 'Ltd.', 'Co.', 'Group', 'Holdings', 'International',
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
/** Industry sector names. */
|
|
79
|
+
const INDUSTRIES = [
|
|
80
|
+
'Information Technology', 'Financial Services', 'Healthcare', 'Retail',
|
|
81
|
+
'Manufacturing', 'Transportation & Logistics', 'Media & Entertainment',
|
|
82
|
+
'Telecommunications', 'Education', 'Real Estate', 'Hospitality & Tourism',
|
|
83
|
+
'Aerospace & Defense', 'Energy & Utilities', 'Agriculture', 'Construction',
|
|
84
|
+
'Pharmaceuticals', 'Automotive', 'Insurance', 'Non-Profit', 'Government',
|
|
85
|
+
'Consulting', 'E-commerce', 'Cybersecurity', 'Artificial Intelligence',
|
|
86
|
+
'Blockchain & Crypto', 'Biotechnology', 'Clean Energy', 'Legal Services',
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
/** Buzzword adjectives for catch phrases. */
|
|
90
|
+
const CATCH_PHRASE_ADJECTIVES = [
|
|
91
|
+
'Adaptive', 'Advanced', 'Automated', 'Balanced', 'Business-focused',
|
|
92
|
+
'Centralized', 'Compatible', 'Configurable', 'Cross-platform', 'Customer-focused',
|
|
93
|
+
'Decentralized', 'Digitized', 'Distributed', 'Enhanced', 'Enterprise-wide',
|
|
94
|
+
'Ergonomic', 'Expanded', 'Face to face', 'Focused', 'Front-line',
|
|
95
|
+
'Fully-configurable', 'Function-based', 'Future-proofed', 'Horizontal',
|
|
96
|
+
'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Managed', 'Monitored',
|
|
97
|
+
'Multi-channelled', 'Multi-lateral', 'Multi-tiered', 'Networked', 'Object-based',
|
|
98
|
+
'Open-architected', 'Open-source', 'Optimized', 'Organic', 'Organized',
|
|
99
|
+
'Pre-emptive', 'Proactive', 'Profit-focused', 'Programmable', 'Progressive',
|
|
100
|
+
'Quality-focused', 'Re-engineered', 'Reactive', 'Reduced', 'Right-sized',
|
|
101
|
+
'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Streamlined', 'Synchronized',
|
|
102
|
+
'Synergistic', 'Team-oriented', 'Universal', 'User-centric', 'User-friendly',
|
|
103
|
+
'Versatile', 'Virtual', 'Visionary', 'Vision-oriented',
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
/** Buzzword nouns for catch phrases. */
|
|
107
|
+
const CATCH_PHRASE_NOUNS = [
|
|
108
|
+
'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'archive',
|
|
109
|
+
'array', 'attitude', 'benchmark', 'capability', 'capacity', 'challenge',
|
|
110
|
+
'circuit', 'collaboration', 'complexity', 'concept', 'contingency',
|
|
111
|
+
'core', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding',
|
|
112
|
+
'encryption', 'extranet', 'firmware', 'flexibility', 'focus group',
|
|
113
|
+
'forecast', 'frame', 'framework', 'function', 'functionalities', 'hub',
|
|
114
|
+
'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation',
|
|
115
|
+
'instruction set', 'interface', 'internet solution', 'intranet', 'knowledge user',
|
|
116
|
+
'knowledge base', 'local area network', 'leverage', 'matrix', 'methodology',
|
|
117
|
+
'middleware', 'migration', 'model', 'moderator', 'moratorium', 'neural-net',
|
|
118
|
+
'open architecture', 'open system', 'orchestration', 'paradigm', 'policy',
|
|
119
|
+
'portal', 'pricing structure', 'process improvement', 'product', 'productivity',
|
|
120
|
+
'project', 'projection', 'protocol', 'throughput', 'time-frame', 'toolset',
|
|
121
|
+
'transition', 'utilisation', 'website', 'workforce',
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
module.exports = {
|
|
125
|
+
PRODUCT_ADJECTIVES,
|
|
126
|
+
PRODUCT_MATERIALS,
|
|
127
|
+
PRODUCT_NOUNS,
|
|
128
|
+
CATEGORIES,
|
|
129
|
+
DEPARTMENTS,
|
|
130
|
+
COMPANY_ADJECTIVES,
|
|
131
|
+
COMPANY_NOUNS,
|
|
132
|
+
COMPANY_SUFFIXES,
|
|
133
|
+
INDUSTRIES,
|
|
134
|
+
CATCH_PHRASE_ADJECTIVES,
|
|
135
|
+
CATCH_PHRASE_NOUNS,
|
|
136
|
+
};
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @module seed/data/internet
|
|
5
|
-
* @description Data pools for internet-related fake data generation.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/** Public email providers (for Fake.email when provider is not specified). */
|
|
9
|
-
const EMAIL_PROVIDERS = [
|
|
10
|
-
'gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com', 'icloud.com',
|
|
11
|
-
'protonmail.com', 'aol.com', 'live.com', 'msn.com', 'ymail.com',
|
|
12
|
-
'mail.com', 'zoho.com', 'fastmail.com', 'hey.com', 'tutanota.com',
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
/** Safe example domains that cannot belong to real people (RFC 2606). */
|
|
16
|
-
const SAFE_DOMAINS = [
|
|
17
|
-
'example.com', 'example.org', 'example.net', 'test.com', 'test.org',
|
|
18
|
-
'demo.com', 'demo.org', 'sample.com', 'fake.io', 'acme.example',
|
|
19
|
-
'placeholder.dev', 'noreply.example', 'sandbox.example',
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
/** Common TLDs used for domain generation. */
|
|
23
|
-
const TLDS = [
|
|
24
|
-
'com', 'net', 'org', 'io', 'dev', 'app', 'co', 'info', 'biz', 'us',
|
|
25
|
-
'uk', 'ca', 'au', 'de', 'fr', 'jp', 'in', 'br', 'mx', 'tech',
|
|
26
|
-
'site', 'online', 'store', 'shop', 'cloud', 'ai', 'xyz', 'me',
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
/** Adjectives for generated domain names. */
|
|
30
|
-
const DOMAIN_ADJECTIVES = [
|
|
31
|
-
'quick', 'bright', 'dark', 'silent', 'loud', 'smart', 'wild', 'swift',
|
|
32
|
-
'bold', 'calm', 'crisp', 'deep', 'fast', 'fresh', 'grand', 'happy',
|
|
33
|
-
'keen', 'light', 'mighty', 'neat', 'open', 'proud', 'rapid', 'sharp',
|
|
34
|
-
'steady', 'strong', 'thin', 'tough', 'warm', 'wise', 'young', 'agile',
|
|
35
|
-
'blue', 'clever', 'cool', 'epic', 'free', 'great', 'huge', 'ideal',
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
/** Nouns for generated domain names. */
|
|
39
|
-
const DOMAIN_NOUNS = [
|
|
40
|
-
'apple', 'arrow', 'atlas', 'base', 'beam', 'blade', 'bridge', 'byte',
|
|
41
|
-
'cache', 'chain', 'cloud', 'code', 'core', 'crest', 'cube', 'data',
|
|
42
|
-
'deck', 'edge', 'field', 'flame', 'fleet', 'flow', 'forge', 'frame',
|
|
43
|
-
'gate', 'grid', 'grove', 'harbor', 'heap', 'hub', 'index', 'kit',
|
|
44
|
-
'lab', 'leaf', 'link', 'loop', 'map', 'matrix', 'mesh', 'mint',
|
|
45
|
-
'node', 'orbit', 'path', 'peak', 'pixel', 'plugin', 'pod', 'port',
|
|
46
|
-
'prism', 'pulse', 'realm', 'ridge', 'root', 'route', 'scope', 'seed',
|
|
47
|
-
'shift', 'signal', 'site', 'snap', 'socket', 'source', 'spike', 'stack',
|
|
48
|
-
'storm', 'stream', 'summit', 'sync', 'thread', 'tide', 'token', 'tower',
|
|
49
|
-
'trace', 'vault', 'vector', 'vibe', 'vista', 'wave', 'wire', 'zone',
|
|
50
|
-
];
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Username separator styles.
|
|
54
|
-
* dot → john.doe99
|
|
55
|
-
* underscore → john_doe99
|
|
56
|
-
* none → johndoe99
|
|
57
|
-
*/
|
|
58
|
-
const USERNAME_SEPARATORS = ['.', '_', ''];
|
|
59
|
-
const USERNAME_STYLES = ['dot', 'underscore', 'none', 'random'];
|
|
60
|
-
|
|
61
|
-
/** Realistic browser user-agent strings for 5 major browsers. */
|
|
62
|
-
const USER_AGENTS = [
|
|
63
|
-
// Chrome
|
|
64
|
-
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
65
|
-
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
66
|
-
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
|
|
67
|
-
// Firefox
|
|
68
|
-
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0',
|
|
69
|
-
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.2; rv:121.0) Gecko/20100101 Firefox/121.0',
|
|
70
|
-
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0',
|
|
71
|
-
// Safari
|
|
72
|
-
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_2_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15',
|
|
73
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1',
|
|
74
|
-
// Edge
|
|
75
|
-
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0',
|
|
76
|
-
// Android Chrome
|
|
77
|
-
'Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.43 Mobile Safari/537.36',
|
|
78
|
-
// curl / bot style
|
|
79
|
-
'curl/7.88.1',
|
|
80
|
-
'python-requests/2.31.0',
|
|
81
|
-
];
|
|
82
|
-
|
|
83
|
-
/** MAC address segment values (OUIs from well-known vendors for realism). */
|
|
84
|
-
const MAC_OUIS = [
|
|
85
|
-
'00:1A:2B', '00:50:56', '08:00:27', 'AC:BC:32', 'B8:27:EB',
|
|
86
|
-
'DC:A6:32', 'E4:5F:01', '3C:22:FB', '70:B3:D5', 'F4:5C:89',
|
|
87
|
-
];
|
|
88
|
-
|
|
89
|
-
/** Password character pool constants. */
|
|
90
|
-
const CHARSET_LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';
|
|
91
|
-
const CHARSET_UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
92
|
-
const CHARSET_DIGITS = '0123456789';
|
|
93
|
-
const CHARSET_SPECIAL = '!@#$%^&*()-_=+[]{}|;:,.<>?';
|
|
94
|
-
const CHARSET_AMBIGUOUS = 'lI1O0'; // chars to optionally exclude
|
|
95
|
-
|
|
96
|
-
module.exports = {
|
|
97
|
-
EMAIL_PROVIDERS,
|
|
98
|
-
SAFE_DOMAINS,
|
|
99
|
-
TLDS,
|
|
100
|
-
DOMAIN_ADJECTIVES,
|
|
101
|
-
DOMAIN_NOUNS,
|
|
102
|
-
USERNAME_SEPARATORS,
|
|
103
|
-
USERNAME_STYLES,
|
|
104
|
-
USER_AGENTS,
|
|
105
|
-
MAC_OUIS,
|
|
106
|
-
CHARSET_LOWERCASE,
|
|
107
|
-
CHARSET_UPPERCASE,
|
|
108
|
-
CHARSET_DIGITS,
|
|
109
|
-
CHARSET_SPECIAL,
|
|
110
|
-
CHARSET_AMBIGUOUS,
|
|
111
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @module seed/data/internet
|
|
5
|
+
* @description Data pools for internet-related fake data generation.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Public email providers (for Fake.email when provider is not specified). */
|
|
9
|
+
const EMAIL_PROVIDERS = [
|
|
10
|
+
'gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com', 'icloud.com',
|
|
11
|
+
'protonmail.com', 'aol.com', 'live.com', 'msn.com', 'ymail.com',
|
|
12
|
+
'mail.com', 'zoho.com', 'fastmail.com', 'hey.com', 'tutanota.com',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
/** Safe example domains that cannot belong to real people (RFC 2606). */
|
|
16
|
+
const SAFE_DOMAINS = [
|
|
17
|
+
'example.com', 'example.org', 'example.net', 'test.com', 'test.org',
|
|
18
|
+
'demo.com', 'demo.org', 'sample.com', 'fake.io', 'acme.example',
|
|
19
|
+
'placeholder.dev', 'noreply.example', 'sandbox.example',
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
/** Common TLDs used for domain generation. */
|
|
23
|
+
const TLDS = [
|
|
24
|
+
'com', 'net', 'org', 'io', 'dev', 'app', 'co', 'info', 'biz', 'us',
|
|
25
|
+
'uk', 'ca', 'au', 'de', 'fr', 'jp', 'in', 'br', 'mx', 'tech',
|
|
26
|
+
'site', 'online', 'store', 'shop', 'cloud', 'ai', 'xyz', 'me',
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
/** Adjectives for generated domain names. */
|
|
30
|
+
const DOMAIN_ADJECTIVES = [
|
|
31
|
+
'quick', 'bright', 'dark', 'silent', 'loud', 'smart', 'wild', 'swift',
|
|
32
|
+
'bold', 'calm', 'crisp', 'deep', 'fast', 'fresh', 'grand', 'happy',
|
|
33
|
+
'keen', 'light', 'mighty', 'neat', 'open', 'proud', 'rapid', 'sharp',
|
|
34
|
+
'steady', 'strong', 'thin', 'tough', 'warm', 'wise', 'young', 'agile',
|
|
35
|
+
'blue', 'clever', 'cool', 'epic', 'free', 'great', 'huge', 'ideal',
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
/** Nouns for generated domain names. */
|
|
39
|
+
const DOMAIN_NOUNS = [
|
|
40
|
+
'apple', 'arrow', 'atlas', 'base', 'beam', 'blade', 'bridge', 'byte',
|
|
41
|
+
'cache', 'chain', 'cloud', 'code', 'core', 'crest', 'cube', 'data',
|
|
42
|
+
'deck', 'edge', 'field', 'flame', 'fleet', 'flow', 'forge', 'frame',
|
|
43
|
+
'gate', 'grid', 'grove', 'harbor', 'heap', 'hub', 'index', 'kit',
|
|
44
|
+
'lab', 'leaf', 'link', 'loop', 'map', 'matrix', 'mesh', 'mint',
|
|
45
|
+
'node', 'orbit', 'path', 'peak', 'pixel', 'plugin', 'pod', 'port',
|
|
46
|
+
'prism', 'pulse', 'realm', 'ridge', 'root', 'route', 'scope', 'seed',
|
|
47
|
+
'shift', 'signal', 'site', 'snap', 'socket', 'source', 'spike', 'stack',
|
|
48
|
+
'storm', 'stream', 'summit', 'sync', 'thread', 'tide', 'token', 'tower',
|
|
49
|
+
'trace', 'vault', 'vector', 'vibe', 'vista', 'wave', 'wire', 'zone',
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Username separator styles.
|
|
54
|
+
* dot → john.doe99
|
|
55
|
+
* underscore → john_doe99
|
|
56
|
+
* none → johndoe99
|
|
57
|
+
*/
|
|
58
|
+
const USERNAME_SEPARATORS = ['.', '_', ''];
|
|
59
|
+
const USERNAME_STYLES = ['dot', 'underscore', 'none', 'random'];
|
|
60
|
+
|
|
61
|
+
/** Realistic browser user-agent strings for 5 major browsers. */
|
|
62
|
+
const USER_AGENTS = [
|
|
63
|
+
// Chrome
|
|
64
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
65
|
+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
66
|
+
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
|
|
67
|
+
// Firefox
|
|
68
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0',
|
|
69
|
+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.2; rv:121.0) Gecko/20100101 Firefox/121.0',
|
|
70
|
+
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0',
|
|
71
|
+
// Safari
|
|
72
|
+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_2_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15',
|
|
73
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1',
|
|
74
|
+
// Edge
|
|
75
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0',
|
|
76
|
+
// Android Chrome
|
|
77
|
+
'Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.43 Mobile Safari/537.36',
|
|
78
|
+
// curl / bot style
|
|
79
|
+
'curl/7.88.1',
|
|
80
|
+
'python-requests/2.31.0',
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
/** MAC address segment values (OUIs from well-known vendors for realism). */
|
|
84
|
+
const MAC_OUIS = [
|
|
85
|
+
'00:1A:2B', '00:50:56', '08:00:27', 'AC:BC:32', 'B8:27:EB',
|
|
86
|
+
'DC:A6:32', 'E4:5F:01', '3C:22:FB', '70:B3:D5', 'F4:5C:89',
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
/** Password character pool constants. */
|
|
90
|
+
const CHARSET_LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';
|
|
91
|
+
const CHARSET_UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
92
|
+
const CHARSET_DIGITS = '0123456789';
|
|
93
|
+
const CHARSET_SPECIAL = '!@#$%^&*()-_=+[]{}|;:,.<>?';
|
|
94
|
+
const CHARSET_AMBIGUOUS = 'lI1O0'; // chars to optionally exclude
|
|
95
|
+
|
|
96
|
+
module.exports = {
|
|
97
|
+
EMAIL_PROVIDERS,
|
|
98
|
+
SAFE_DOMAINS,
|
|
99
|
+
TLDS,
|
|
100
|
+
DOMAIN_ADJECTIVES,
|
|
101
|
+
DOMAIN_NOUNS,
|
|
102
|
+
USERNAME_SEPARATORS,
|
|
103
|
+
USERNAME_STYLES,
|
|
104
|
+
USER_AGENTS,
|
|
105
|
+
MAC_OUIS,
|
|
106
|
+
CHARSET_LOWERCASE,
|
|
107
|
+
CHARSET_UPPERCASE,
|
|
108
|
+
CHARSET_DIGITS,
|
|
109
|
+
CHARSET_SPECIAL,
|
|
110
|
+
CHARSET_AMBIGUOUS,
|
|
111
|
+
};
|