@autumnsgrove/groveengine 0.8.6 → 0.9.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.
- package/dist/components/admin/GutterManager.svelte +213 -101
- package/dist/components/admin/MarkdownEditor.svelte +6 -3
- package/dist/components/custom/GutterItem.svelte +8 -2
- package/dist/components/quota/UpgradePrompt.svelte +1 -0
- package/dist/config/domain-blocklist.d.ts +59 -0
- package/dist/config/domain-blocklist.js +731 -0
- package/dist/config/index.d.ts +3 -1
- package/dist/config/index.js +2 -1
- package/dist/config/offensive-blocklist.d.ts +44 -0
- package/dist/config/offensive-blocklist.js +751 -0
- package/dist/config/terrarium.d.ts +109 -0
- package/dist/config/terrarium.js +125 -0
- package/dist/styles/tokens.css +90 -0
- package/dist/types/dom-to-image-more.d.ts +39 -0
- package/dist/ui/components/chrome/Footer.svelte +137 -0
- package/dist/ui/components/chrome/Footer.svelte.d.ts +11 -0
- package/dist/ui/components/chrome/FooterMinimal.svelte +75 -0
- package/dist/ui/components/chrome/FooterMinimal.svelte.d.ts +10 -0
- package/dist/ui/components/chrome/Header.svelte +113 -0
- package/dist/ui/components/chrome/Header.svelte.d.ts +11 -0
- package/dist/ui/components/chrome/HeaderMinimal.svelte +68 -0
- package/dist/ui/components/chrome/HeaderMinimal.svelte.d.ts +9 -0
- package/dist/ui/components/chrome/MobileMenu.svelte +145 -0
- package/dist/ui/components/chrome/MobileMenu.svelte.d.ts +9 -0
- package/dist/ui/components/chrome/ThemeToggle.svelte +34 -0
- package/dist/ui/components/chrome/ThemeToggle.svelte.d.ts +3 -0
- package/dist/ui/components/chrome/defaults.d.ts +6 -0
- package/dist/ui/components/chrome/defaults.js +65 -0
- package/dist/ui/components/chrome/index.d.ts +13 -0
- package/dist/ui/components/chrome/index.js +14 -0
- package/dist/ui/components/chrome/types.d.ts +19 -0
- package/dist/ui/components/chrome/types.js +8 -0
- package/dist/ui/components/content/RoadmapPreview.svelte +2 -1
- package/dist/ui/components/forms/ContentSearch.svelte +406 -0
- package/dist/ui/components/forms/ContentSearch.svelte.d.ts +71 -0
- package/dist/ui/components/forms/filterUtils.d.ts +138 -0
- package/dist/ui/components/forms/filterUtils.js +240 -0
- package/dist/ui/components/forms/index.d.ts +2 -0
- package/dist/ui/components/forms/index.js +5 -1
- package/dist/ui/components/gallery/ImageGallery.svelte +3 -0
- package/dist/ui/components/gallery/Lightbox.svelte +3 -0
- package/dist/ui/components/gallery/ZoomableImage.svelte +1 -0
- package/dist/ui/components/icons/index.d.ts +2 -1
- package/dist/ui/components/icons/index.js +14 -3
- package/dist/ui/components/icons/lucide.d.ts +213 -0
- package/dist/ui/components/icons/lucide.js +224 -0
- package/dist/ui/components/terrarium/AssetPalette.svelte +207 -0
- package/dist/ui/components/terrarium/AssetPalette.svelte.d.ts +7 -0
- package/dist/ui/components/terrarium/Canvas.svelte +231 -0
- package/dist/ui/components/terrarium/Canvas.svelte.d.ts +14 -0
- package/dist/ui/components/terrarium/ExportDialog.svelte +307 -0
- package/dist/ui/components/terrarium/ExportDialog.svelte.d.ts +18 -0
- package/dist/ui/components/terrarium/PaletteItem.svelte +169 -0
- package/dist/ui/components/terrarium/PaletteItem.svelte.d.ts +9 -0
- package/dist/ui/components/terrarium/PlacedAsset.svelte +222 -0
- package/dist/ui/components/terrarium/PlacedAsset.svelte.d.ts +11 -0
- package/dist/ui/components/terrarium/Terrarium.svelte +266 -0
- package/dist/ui/components/terrarium/Terrarium.svelte.d.ts +3 -0
- package/dist/ui/components/terrarium/Toolbar.svelte +299 -0
- package/dist/ui/components/terrarium/Toolbar.svelte.d.ts +24 -0
- package/dist/ui/components/terrarium/index.d.ts +31 -0
- package/dist/ui/components/terrarium/index.js +33 -0
- package/dist/ui/components/terrarium/terrariumState.svelte.d.ts +45 -0
- package/dist/ui/components/terrarium/terrariumState.svelte.js +291 -0
- package/dist/ui/components/terrarium/types.d.ts +139 -0
- package/dist/ui/components/terrarium/types.js +43 -0
- package/dist/ui/components/terrarium/utils/export.d.ts +48 -0
- package/dist/ui/components/terrarium/utils/export.js +148 -0
- package/dist/ui/components/ui/CollapsibleSection.svelte +2 -0
- package/dist/ui/components/ui/GlassConfirmDialog.svelte +9 -0
- package/dist/ui/components/ui/GlassOverlay.svelte +2 -1
- package/dist/ui/components/ui/Input.svelte +9 -1
- package/dist/ui/components/ui/Input.svelte.d.ts +2 -0
- package/dist/ui/components/ui/Textarea.svelte +9 -1
- package/dist/ui/components/ui/Textarea.svelte.d.ts +2 -0
- package/dist/ui/stores/index.d.ts +6 -0
- package/dist/ui/stores/index.js +6 -0
- package/dist/ui/stores/season.d.ts +14 -0
- package/dist/ui/stores/season.js +65 -0
- package/package.json +27 -4
|
@@ -0,0 +1,731 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loam - Domain Blocklist Configuration
|
|
3
|
+
*
|
|
4
|
+
* Part of the Loam name protection system.
|
|
5
|
+
* Comprehensive list of blocked usernames/subdomains organized by category.
|
|
6
|
+
*
|
|
7
|
+
* @see docs/specs/loam-spec.md
|
|
8
|
+
* @module domain-blocklist
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Array of valid blocklist reasons for runtime validation
|
|
12
|
+
* Use this to validate database values before type assertion
|
|
13
|
+
*/
|
|
14
|
+
export const VALID_BLOCKLIST_REASONS = [
|
|
15
|
+
'system',
|
|
16
|
+
'grove_service',
|
|
17
|
+
'trademark',
|
|
18
|
+
'impersonation',
|
|
19
|
+
'offensive',
|
|
20
|
+
'fraud',
|
|
21
|
+
'future_reserved'
|
|
22
|
+
];
|
|
23
|
+
// =============================================================================
|
|
24
|
+
// CATEGORY 1: System & Infrastructure
|
|
25
|
+
// =============================================================================
|
|
26
|
+
const SYSTEM_WEB = [
|
|
27
|
+
'www',
|
|
28
|
+
'api',
|
|
29
|
+
'app',
|
|
30
|
+
'auth',
|
|
31
|
+
'login',
|
|
32
|
+
'logout',
|
|
33
|
+
'signin',
|
|
34
|
+
'signout',
|
|
35
|
+
'signup',
|
|
36
|
+
'register',
|
|
37
|
+
'account',
|
|
38
|
+
'accounts',
|
|
39
|
+
'oauth',
|
|
40
|
+
'oauth2',
|
|
41
|
+
'sso',
|
|
42
|
+
'admin',
|
|
43
|
+
'administrator',
|
|
44
|
+
'dashboard',
|
|
45
|
+
'panel',
|
|
46
|
+
'console',
|
|
47
|
+
'backend',
|
|
48
|
+
'control',
|
|
49
|
+
'billing',
|
|
50
|
+
'checkout',
|
|
51
|
+
'subscribe',
|
|
52
|
+
'unsubscribe',
|
|
53
|
+
'payment',
|
|
54
|
+
'payments',
|
|
55
|
+
'pay',
|
|
56
|
+
'settings',
|
|
57
|
+
'preferences',
|
|
58
|
+
'config',
|
|
59
|
+
'configuration',
|
|
60
|
+
'profile',
|
|
61
|
+
'profiles',
|
|
62
|
+
'user',
|
|
63
|
+
'users',
|
|
64
|
+
'member',
|
|
65
|
+
'members'
|
|
66
|
+
];
|
|
67
|
+
const SYSTEM_EMAIL = [
|
|
68
|
+
'mail',
|
|
69
|
+
'email',
|
|
70
|
+
'emails',
|
|
71
|
+
'smtp',
|
|
72
|
+
'imap',
|
|
73
|
+
'pop',
|
|
74
|
+
'pop3',
|
|
75
|
+
'postmaster',
|
|
76
|
+
'webmail',
|
|
77
|
+
'mx',
|
|
78
|
+
'newsletter',
|
|
79
|
+
'newsletters',
|
|
80
|
+
'noreply',
|
|
81
|
+
'no-reply',
|
|
82
|
+
'mailer',
|
|
83
|
+
'bounce',
|
|
84
|
+
'mailbox'
|
|
85
|
+
];
|
|
86
|
+
const SYSTEM_NETWORK = [
|
|
87
|
+
'ftp',
|
|
88
|
+
'sftp',
|
|
89
|
+
'ssh',
|
|
90
|
+
'vpn',
|
|
91
|
+
'proxy',
|
|
92
|
+
'gateway',
|
|
93
|
+
'firewall',
|
|
94
|
+
'cdn',
|
|
95
|
+
'static',
|
|
96
|
+
'assets',
|
|
97
|
+
'media',
|
|
98
|
+
'images',
|
|
99
|
+
'files',
|
|
100
|
+
'img',
|
|
101
|
+
'js',
|
|
102
|
+
'css',
|
|
103
|
+
'fonts',
|
|
104
|
+
'upload',
|
|
105
|
+
'uploads',
|
|
106
|
+
'download',
|
|
107
|
+
'downloads',
|
|
108
|
+
'cache',
|
|
109
|
+
'server',
|
|
110
|
+
'servers',
|
|
111
|
+
'node',
|
|
112
|
+
'nodes',
|
|
113
|
+
'cluster',
|
|
114
|
+
'worker',
|
|
115
|
+
'workers'
|
|
116
|
+
];
|
|
117
|
+
const SYSTEM_DNS = ['ns', 'ns1', 'ns2', 'ns3', 'dns', 'nameserver', 'whois', 'rdap'];
|
|
118
|
+
const SYSTEM_METADATA = [
|
|
119
|
+
'rss',
|
|
120
|
+
'atom',
|
|
121
|
+
'feed',
|
|
122
|
+
'feeds',
|
|
123
|
+
'sitemap',
|
|
124
|
+
'sitemaps',
|
|
125
|
+
'robots',
|
|
126
|
+
'favicon',
|
|
127
|
+
'manifest',
|
|
128
|
+
'status',
|
|
129
|
+
'health',
|
|
130
|
+
'healthcheck',
|
|
131
|
+
'ping',
|
|
132
|
+
'metrics',
|
|
133
|
+
'analytics',
|
|
134
|
+
'telemetry',
|
|
135
|
+
'logs',
|
|
136
|
+
'log',
|
|
137
|
+
'debug',
|
|
138
|
+
'trace',
|
|
139
|
+
'error',
|
|
140
|
+
'errors'
|
|
141
|
+
];
|
|
142
|
+
const SYSTEM_DEV = [
|
|
143
|
+
'root',
|
|
144
|
+
'null',
|
|
145
|
+
'undefined',
|
|
146
|
+
'void',
|
|
147
|
+
'nan',
|
|
148
|
+
'test',
|
|
149
|
+
'testing',
|
|
150
|
+
'tests',
|
|
151
|
+
'demo',
|
|
152
|
+
'demos',
|
|
153
|
+
'example',
|
|
154
|
+
'examples',
|
|
155
|
+
'sample',
|
|
156
|
+
'samples',
|
|
157
|
+
'sandbox',
|
|
158
|
+
'staging',
|
|
159
|
+
'dev',
|
|
160
|
+
'development',
|
|
161
|
+
'prod',
|
|
162
|
+
'production',
|
|
163
|
+
'temp',
|
|
164
|
+
'tmp',
|
|
165
|
+
'localhost',
|
|
166
|
+
'local',
|
|
167
|
+
'internal',
|
|
168
|
+
'beta',
|
|
169
|
+
'alpha',
|
|
170
|
+
'canary',
|
|
171
|
+
'nightly',
|
|
172
|
+
'preview',
|
|
173
|
+
'release',
|
|
174
|
+
'releases'
|
|
175
|
+
];
|
|
176
|
+
const SYSTEM_LEGAL = [
|
|
177
|
+
'legal',
|
|
178
|
+
'terms',
|
|
179
|
+
'privacy',
|
|
180
|
+
'dmca',
|
|
181
|
+
'copyright',
|
|
182
|
+
'trademark',
|
|
183
|
+
'tos',
|
|
184
|
+
'eula',
|
|
185
|
+
'abuse',
|
|
186
|
+
'report',
|
|
187
|
+
'reports',
|
|
188
|
+
'security',
|
|
189
|
+
'vulnerability',
|
|
190
|
+
'cve',
|
|
191
|
+
'compliance',
|
|
192
|
+
'gdpr',
|
|
193
|
+
'ccpa',
|
|
194
|
+
'dsar'
|
|
195
|
+
];
|
|
196
|
+
const SYSTEM_DOCS = [
|
|
197
|
+
'docs',
|
|
198
|
+
'documentation',
|
|
199
|
+
'wiki',
|
|
200
|
+
'guide',
|
|
201
|
+
'guides',
|
|
202
|
+
'tutorial',
|
|
203
|
+
'tutorials',
|
|
204
|
+
'faq',
|
|
205
|
+
'faqs',
|
|
206
|
+
'help',
|
|
207
|
+
'support',
|
|
208
|
+
'knowledge',
|
|
209
|
+
'kb',
|
|
210
|
+
'knowledgebase',
|
|
211
|
+
'manual',
|
|
212
|
+
'manuals',
|
|
213
|
+
'reference',
|
|
214
|
+
'spec',
|
|
215
|
+
'specs',
|
|
216
|
+
'about',
|
|
217
|
+
'info',
|
|
218
|
+
'contact',
|
|
219
|
+
'contacts'
|
|
220
|
+
];
|
|
221
|
+
// =============================================================================
|
|
222
|
+
// CATEGORY 2: Grove Services & Products
|
|
223
|
+
// =============================================================================
|
|
224
|
+
const GROVE_PUBLIC_SERVICES = [
|
|
225
|
+
// Core
|
|
226
|
+
'grove',
|
|
227
|
+
'lattice',
|
|
228
|
+
// Subdomain services
|
|
229
|
+
'meadow',
|
|
230
|
+
'forage',
|
|
231
|
+
'foliage',
|
|
232
|
+
'heartwood',
|
|
233
|
+
'trove',
|
|
234
|
+
'outpost',
|
|
235
|
+
'aria',
|
|
236
|
+
'plant',
|
|
237
|
+
'ivy',
|
|
238
|
+
'amber',
|
|
239
|
+
'bloom',
|
|
240
|
+
'mycelium',
|
|
241
|
+
'vista',
|
|
242
|
+
'pantry',
|
|
243
|
+
'nook',
|
|
244
|
+
'clearing',
|
|
245
|
+
'porch',
|
|
246
|
+
// Route-based services
|
|
247
|
+
'shade',
|
|
248
|
+
'trails',
|
|
249
|
+
'vineyard',
|
|
250
|
+
'terrarium',
|
|
251
|
+
'weave'
|
|
252
|
+
];
|
|
253
|
+
const GROVE_INTERNAL_SERVICES = [
|
|
254
|
+
'patina',
|
|
255
|
+
'rings',
|
|
256
|
+
'waystone',
|
|
257
|
+
'reeds',
|
|
258
|
+
'press',
|
|
259
|
+
'wisp',
|
|
260
|
+
'thorn',
|
|
261
|
+
'fireside',
|
|
262
|
+
'vines',
|
|
263
|
+
'arbor',
|
|
264
|
+
'sway',
|
|
265
|
+
'fern',
|
|
266
|
+
'loam'
|
|
267
|
+
];
|
|
268
|
+
const GROVE_ALIASES = [
|
|
269
|
+
'domains',
|
|
270
|
+
'music',
|
|
271
|
+
'mc',
|
|
272
|
+
'auth-api',
|
|
273
|
+
'scout',
|
|
274
|
+
'search',
|
|
275
|
+
'og',
|
|
276
|
+
'monitor'
|
|
277
|
+
];
|
|
278
|
+
const GROVE_INTERNAL_CODENAMES = [
|
|
279
|
+
'grovesocial',
|
|
280
|
+
'grovedomaintool',
|
|
281
|
+
'grovethemes',
|
|
282
|
+
'groveauth',
|
|
283
|
+
'grovepatina',
|
|
284
|
+
'treasuretrove',
|
|
285
|
+
'grovemc',
|
|
286
|
+
'grovemusic',
|
|
287
|
+
'seedbed',
|
|
288
|
+
'groveanalytics',
|
|
289
|
+
'grovemail',
|
|
290
|
+
'grovestorage',
|
|
291
|
+
'groveshade',
|
|
292
|
+
'grovetrails',
|
|
293
|
+
'groveshowcase',
|
|
294
|
+
'grovebloom',
|
|
295
|
+
'grovemcp',
|
|
296
|
+
'grovemonitor',
|
|
297
|
+
'grovepress',
|
|
298
|
+
'grovewisp',
|
|
299
|
+
'groveshop',
|
|
300
|
+
'grovenook',
|
|
301
|
+
'groveclear',
|
|
302
|
+
'grovewaystone',
|
|
303
|
+
'grovereeds',
|
|
304
|
+
'groveporch',
|
|
305
|
+
'grovethorn',
|
|
306
|
+
'grovearbor',
|
|
307
|
+
'grovescout',
|
|
308
|
+
'groveengine',
|
|
309
|
+
'groveplace',
|
|
310
|
+
'groveloam'
|
|
311
|
+
];
|
|
312
|
+
/**
|
|
313
|
+
* Typosquatting variants of critical services
|
|
314
|
+
* Common misspellings that could be used for phishing/impersonation
|
|
315
|
+
*/
|
|
316
|
+
const GROVE_TYPOSQUATTING = [
|
|
317
|
+
// Grove core
|
|
318
|
+
'grov',
|
|
319
|
+
'grve',
|
|
320
|
+
'groce',
|
|
321
|
+
'grobe',
|
|
322
|
+
'grpve',
|
|
323
|
+
'grive',
|
|
324
|
+
// Meadow
|
|
325
|
+
'meadw',
|
|
326
|
+
'meado',
|
|
327
|
+
'meadwo',
|
|
328
|
+
'medow',
|
|
329
|
+
'maedow',
|
|
330
|
+
// Forage
|
|
331
|
+
'forrage',
|
|
332
|
+
'forrge',
|
|
333
|
+
'forege',
|
|
334
|
+
'forage-grove',
|
|
335
|
+
// Heartwood
|
|
336
|
+
'heartwod',
|
|
337
|
+
'hartwod',
|
|
338
|
+
'harwood',
|
|
339
|
+
'hearwood',
|
|
340
|
+
'hertwood',
|
|
341
|
+
// Plant
|
|
342
|
+
'plat',
|
|
343
|
+
'palnt',
|
|
344
|
+
'plnt',
|
|
345
|
+
// Pantry
|
|
346
|
+
'pnatry',
|
|
347
|
+
'pantrey',
|
|
348
|
+
'patry',
|
|
349
|
+
// Support/admin
|
|
350
|
+
'suport',
|
|
351
|
+
'supprt',
|
|
352
|
+
'amin',
|
|
353
|
+
'admn'
|
|
354
|
+
];
|
|
355
|
+
// =============================================================================
|
|
356
|
+
// CATEGORY 3: Grove Brand & Trademarks
|
|
357
|
+
// =============================================================================
|
|
358
|
+
const GROVE_BRAND = [
|
|
359
|
+
'grove',
|
|
360
|
+
'groveplace',
|
|
361
|
+
'grove-place',
|
|
362
|
+
'thegrove',
|
|
363
|
+
'the-grove',
|
|
364
|
+
'autumnsgrove',
|
|
365
|
+
'autumns-grove',
|
|
366
|
+
'autumngrove',
|
|
367
|
+
'autumn-grove',
|
|
368
|
+
'autumn',
|
|
369
|
+
'autumns'
|
|
370
|
+
];
|
|
371
|
+
const GROVE_TIERS = [
|
|
372
|
+
'seedling',
|
|
373
|
+
'sapling',
|
|
374
|
+
'oak',
|
|
375
|
+
'evergreen',
|
|
376
|
+
'free',
|
|
377
|
+
'premium',
|
|
378
|
+
'pro',
|
|
379
|
+
'plus',
|
|
380
|
+
'basic',
|
|
381
|
+
'starter',
|
|
382
|
+
'enterprise'
|
|
383
|
+
];
|
|
384
|
+
const GROVE_CONCEPTS = [
|
|
385
|
+
'centennial',
|
|
386
|
+
'seasons',
|
|
387
|
+
'acorn',
|
|
388
|
+
'canopy',
|
|
389
|
+
'understory',
|
|
390
|
+
'overstory',
|
|
391
|
+
'forest',
|
|
392
|
+
'woods',
|
|
393
|
+
'woodland',
|
|
394
|
+
'tree',
|
|
395
|
+
'trees',
|
|
396
|
+
'branch',
|
|
397
|
+
'branches',
|
|
398
|
+
'root',
|
|
399
|
+
'roots',
|
|
400
|
+
'leaf',
|
|
401
|
+
'leaves',
|
|
402
|
+
'grove-keeper',
|
|
403
|
+
'grovekeeper'
|
|
404
|
+
];
|
|
405
|
+
// =============================================================================
|
|
406
|
+
// CATEGORY 4: Authority & Impersonation Prevention
|
|
407
|
+
// =============================================================================
|
|
408
|
+
const IMPERSONATION_OFFICIAL = [
|
|
409
|
+
'official',
|
|
410
|
+
'verified',
|
|
411
|
+
'authentic',
|
|
412
|
+
'real',
|
|
413
|
+
'true',
|
|
414
|
+
'original',
|
|
415
|
+
'genuine',
|
|
416
|
+
'certified',
|
|
417
|
+
'approved',
|
|
418
|
+
'authorized',
|
|
419
|
+
'licensed',
|
|
420
|
+
'legit',
|
|
421
|
+
'legitimate'
|
|
422
|
+
];
|
|
423
|
+
const IMPERSONATION_ROLES = [
|
|
424
|
+
'admin',
|
|
425
|
+
'administrator',
|
|
426
|
+
'moderator',
|
|
427
|
+
'mod',
|
|
428
|
+
'mods',
|
|
429
|
+
'staff',
|
|
430
|
+
'employee',
|
|
431
|
+
'team',
|
|
432
|
+
'founder',
|
|
433
|
+
'cofounder',
|
|
434
|
+
'co-founder',
|
|
435
|
+
'ceo',
|
|
436
|
+
'cto',
|
|
437
|
+
'cfo',
|
|
438
|
+
'coo',
|
|
439
|
+
'president',
|
|
440
|
+
'director',
|
|
441
|
+
'manager',
|
|
442
|
+
'owner',
|
|
443
|
+
'operator',
|
|
444
|
+
'creator',
|
|
445
|
+
'developer',
|
|
446
|
+
'engineer',
|
|
447
|
+
'maintainer'
|
|
448
|
+
];
|
|
449
|
+
const IMPERSONATION_SUPPORT = [
|
|
450
|
+
'support',
|
|
451
|
+
'helpdesk',
|
|
452
|
+
'help-desk',
|
|
453
|
+
'customerservice',
|
|
454
|
+
'customer-service',
|
|
455
|
+
'trust',
|
|
456
|
+
'safety',
|
|
457
|
+
'security',
|
|
458
|
+
'moderation',
|
|
459
|
+
'enforcement',
|
|
460
|
+
'billing-support',
|
|
461
|
+
'tech-support'
|
|
462
|
+
];
|
|
463
|
+
// =============================================================================
|
|
464
|
+
// CATEGORY 5: Fraud & Spam Patterns
|
|
465
|
+
// =============================================================================
|
|
466
|
+
const FRAUD_MONEY = [
|
|
467
|
+
'free-money',
|
|
468
|
+
'freemoney',
|
|
469
|
+
'getrich',
|
|
470
|
+
'get-rich',
|
|
471
|
+
'makemoney',
|
|
472
|
+
'make-money',
|
|
473
|
+
'earnmoney',
|
|
474
|
+
'earn-money',
|
|
475
|
+
'crypto-giveaway',
|
|
476
|
+
'cryptogiveaway',
|
|
477
|
+
'giveaway',
|
|
478
|
+
'airdrop',
|
|
479
|
+
'freebitcoin',
|
|
480
|
+
'free-bitcoin'
|
|
481
|
+
];
|
|
482
|
+
const FRAUD_PHISHING = [
|
|
483
|
+
'password',
|
|
484
|
+
'passwords',
|
|
485
|
+
'login-here',
|
|
486
|
+
'signin-here',
|
|
487
|
+
'sign-in',
|
|
488
|
+
'click-here',
|
|
489
|
+
'clickhere',
|
|
490
|
+
'download-now',
|
|
491
|
+
'downloadnow',
|
|
492
|
+
'limited-time',
|
|
493
|
+
'limitedtime',
|
|
494
|
+
'act-now',
|
|
495
|
+
'actnow'
|
|
496
|
+
];
|
|
497
|
+
const FRAUD_SCAM = [
|
|
498
|
+
'winner',
|
|
499
|
+
'congratulations',
|
|
500
|
+
'congrats',
|
|
501
|
+
'prize',
|
|
502
|
+
'prizes',
|
|
503
|
+
'lottery',
|
|
504
|
+
'jackpot',
|
|
505
|
+
'invoice',
|
|
506
|
+
'receipt',
|
|
507
|
+
'verify',
|
|
508
|
+
'verification',
|
|
509
|
+
'confirm',
|
|
510
|
+
'confirmation',
|
|
511
|
+
'account-suspended',
|
|
512
|
+
'account-locked',
|
|
513
|
+
'urgent',
|
|
514
|
+
'warning',
|
|
515
|
+
'alert',
|
|
516
|
+
'suspended'
|
|
517
|
+
];
|
|
518
|
+
const FRAUD_IMPERSONATION = [
|
|
519
|
+
'paypal',
|
|
520
|
+
'stripe',
|
|
521
|
+
'venmo',
|
|
522
|
+
'cashapp',
|
|
523
|
+
'zelle',
|
|
524
|
+
'apple',
|
|
525
|
+
'google',
|
|
526
|
+
'microsoft',
|
|
527
|
+
'amazon',
|
|
528
|
+
'facebook',
|
|
529
|
+
'instagram',
|
|
530
|
+
'twitter',
|
|
531
|
+
'tiktok',
|
|
532
|
+
'netflix',
|
|
533
|
+
'spotify'
|
|
534
|
+
];
|
|
535
|
+
// =============================================================================
|
|
536
|
+
// CATEGORY 6: Future Reserved (Potential Grove Services)
|
|
537
|
+
// =============================================================================
|
|
538
|
+
const FUTURE_NATURE_PLACES = [
|
|
539
|
+
'hollow',
|
|
540
|
+
'glade',
|
|
541
|
+
'thicket',
|
|
542
|
+
'copse',
|
|
543
|
+
'dell',
|
|
544
|
+
'glen',
|
|
545
|
+
'grove-commons',
|
|
546
|
+
'bower',
|
|
547
|
+
'arbor-day',
|
|
548
|
+
'arborday'
|
|
549
|
+
];
|
|
550
|
+
const FUTURE_NATURE_GROWING = [
|
|
551
|
+
'seedbank',
|
|
552
|
+
'greenhouse',
|
|
553
|
+
'nursery',
|
|
554
|
+
'mulch',
|
|
555
|
+
'compost',
|
|
556
|
+
'humus',
|
|
557
|
+
'topsoil',
|
|
558
|
+
'sprout',
|
|
559
|
+
'bud',
|
|
560
|
+
'petal'
|
|
561
|
+
];
|
|
562
|
+
const FUTURE_NATURE_CREATURES = [
|
|
563
|
+
'birdsong',
|
|
564
|
+
'cricket',
|
|
565
|
+
'firefly',
|
|
566
|
+
'moth',
|
|
567
|
+
'owl',
|
|
568
|
+
'fox',
|
|
569
|
+
'deer',
|
|
570
|
+
'rabbit',
|
|
571
|
+
'cardinal',
|
|
572
|
+
'robin',
|
|
573
|
+
'bluebird',
|
|
574
|
+
'chickadee'
|
|
575
|
+
];
|
|
576
|
+
const FUTURE_NATURE_PLANTS = [
|
|
577
|
+
'moss',
|
|
578
|
+
'lichen',
|
|
579
|
+
'fern',
|
|
580
|
+
'mushroom',
|
|
581
|
+
'fungus',
|
|
582
|
+
'truffle',
|
|
583
|
+
'clover',
|
|
584
|
+
'daisy',
|
|
585
|
+
'wildflower'
|
|
586
|
+
];
|
|
587
|
+
const FUTURE_NATURE_WATER = [
|
|
588
|
+
'stream',
|
|
589
|
+
'brook',
|
|
590
|
+
'creek',
|
|
591
|
+
'pond',
|
|
592
|
+
'spring',
|
|
593
|
+
'well',
|
|
594
|
+
'rain',
|
|
595
|
+
'mist',
|
|
596
|
+
'dew'
|
|
597
|
+
];
|
|
598
|
+
const FUTURE_NATURE_TIME = [
|
|
599
|
+
'sunrise',
|
|
600
|
+
'sunset',
|
|
601
|
+
'dawn',
|
|
602
|
+
'dusk',
|
|
603
|
+
'twilight',
|
|
604
|
+
'midnight',
|
|
605
|
+
'noon',
|
|
606
|
+
'solstice',
|
|
607
|
+
'equinox'
|
|
608
|
+
];
|
|
609
|
+
// =============================================================================
|
|
610
|
+
// COMBINED EXPORTS
|
|
611
|
+
// =============================================================================
|
|
612
|
+
export const SYSTEM_RESERVED = [
|
|
613
|
+
...SYSTEM_WEB,
|
|
614
|
+
...SYSTEM_EMAIL,
|
|
615
|
+
...SYSTEM_NETWORK,
|
|
616
|
+
...SYSTEM_DNS,
|
|
617
|
+
...SYSTEM_METADATA,
|
|
618
|
+
...SYSTEM_DEV,
|
|
619
|
+
...SYSTEM_LEGAL,
|
|
620
|
+
...SYSTEM_DOCS
|
|
621
|
+
];
|
|
622
|
+
export const GROVE_SERVICES = [
|
|
623
|
+
...GROVE_PUBLIC_SERVICES,
|
|
624
|
+
...GROVE_INTERNAL_SERVICES,
|
|
625
|
+
...GROVE_ALIASES,
|
|
626
|
+
...GROVE_INTERNAL_CODENAMES,
|
|
627
|
+
...GROVE_TYPOSQUATTING
|
|
628
|
+
];
|
|
629
|
+
export const GROVE_TRADEMARKS = [...GROVE_BRAND, ...GROVE_TIERS, ...GROVE_CONCEPTS];
|
|
630
|
+
export const IMPERSONATION_TERMS = [
|
|
631
|
+
...IMPERSONATION_OFFICIAL,
|
|
632
|
+
...IMPERSONATION_ROLES,
|
|
633
|
+
...IMPERSONATION_SUPPORT
|
|
634
|
+
];
|
|
635
|
+
export const FRAUD_TERMS = [
|
|
636
|
+
...FRAUD_MONEY,
|
|
637
|
+
...FRAUD_PHISHING,
|
|
638
|
+
...FRAUD_SCAM,
|
|
639
|
+
...FRAUD_IMPERSONATION
|
|
640
|
+
];
|
|
641
|
+
export const FUTURE_RESERVED = [
|
|
642
|
+
...FUTURE_NATURE_PLACES,
|
|
643
|
+
...FUTURE_NATURE_GROWING,
|
|
644
|
+
...FUTURE_NATURE_CREATURES,
|
|
645
|
+
...FUTURE_NATURE_PLANTS,
|
|
646
|
+
...FUTURE_NATURE_WATER,
|
|
647
|
+
...FUTURE_NATURE_TIME
|
|
648
|
+
];
|
|
649
|
+
/**
|
|
650
|
+
* Complete blocklist with all categories
|
|
651
|
+
*/
|
|
652
|
+
export const COMPLETE_BLOCKLIST = [
|
|
653
|
+
...SYSTEM_RESERVED.map((u) => ({ username: u, reason: 'system' })),
|
|
654
|
+
...GROVE_SERVICES.map((u) => ({ username: u, reason: 'grove_service' })),
|
|
655
|
+
...GROVE_TRADEMARKS.map((u) => ({ username: u, reason: 'trademark' })),
|
|
656
|
+
...IMPERSONATION_TERMS.map((u) => ({ username: u, reason: 'impersonation' })),
|
|
657
|
+
...FRAUD_TERMS.map((u) => ({ username: u, reason: 'fraud' })),
|
|
658
|
+
...FUTURE_RESERVED.map((u) => ({ username: u, reason: 'future_reserved' }))
|
|
659
|
+
];
|
|
660
|
+
/**
|
|
661
|
+
* Fast lookup Set for validation (checks existence only)
|
|
662
|
+
*/
|
|
663
|
+
export const BLOCKED_USERNAMES = new Set(COMPLETE_BLOCKLIST.map((e) => e.username));
|
|
664
|
+
/**
|
|
665
|
+
* Fast lookup Map for validation with reason (O(1) lookup)
|
|
666
|
+
*/
|
|
667
|
+
export const BLOCKED_USERNAMES_MAP = new Map(COMPLETE_BLOCKLIST.map((e) => [e.username, e.reason]));
|
|
668
|
+
/** Prefixes that indicate impersonation attempts */
|
|
669
|
+
const BLOCKED_PREFIXES = ['grove-', 'admin-', 'official-', 'verified-'];
|
|
670
|
+
/** Suffixes that indicate impersonation attempts */
|
|
671
|
+
const BLOCKED_SUFFIXES = ['-official', '-verified', '-admin', '-support'];
|
|
672
|
+
/**
|
|
673
|
+
* Check if a username is blocked
|
|
674
|
+
* @param username - The username to check (will be lowercased)
|
|
675
|
+
* @returns The blocking reason if blocked, null if allowed
|
|
676
|
+
*/
|
|
677
|
+
export function isUsernameBlocked(username) {
|
|
678
|
+
const normalized = username.toLowerCase().trim();
|
|
679
|
+
// O(1) exact match lookup using Map
|
|
680
|
+
const exactMatch = BLOCKED_USERNAMES_MAP.get(normalized);
|
|
681
|
+
if (exactMatch) {
|
|
682
|
+
return exactMatch;
|
|
683
|
+
}
|
|
684
|
+
// Check if starts with blocked prefix (e.g., "grove-anything")
|
|
685
|
+
for (const prefix of BLOCKED_PREFIXES) {
|
|
686
|
+
if (normalized.startsWith(prefix)) {
|
|
687
|
+
return 'impersonation';
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
// Check if ends with blocked suffix
|
|
691
|
+
for (const suffix of BLOCKED_SUFFIXES) {
|
|
692
|
+
if (normalized.endsWith(suffix)) {
|
|
693
|
+
return 'impersonation';
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
return null;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Get a user-friendly error message for a blocked username
|
|
700
|
+
* @param reason - The blocking reason
|
|
701
|
+
* @returns A user-friendly error message
|
|
702
|
+
*/
|
|
703
|
+
export function getBlockedMessage(reason) {
|
|
704
|
+
switch (reason) {
|
|
705
|
+
case 'system':
|
|
706
|
+
return 'This username is reserved for system use';
|
|
707
|
+
case 'grove_service':
|
|
708
|
+
return 'This username is reserved for a Grove service';
|
|
709
|
+
case 'trademark':
|
|
710
|
+
return 'This username is reserved';
|
|
711
|
+
case 'impersonation':
|
|
712
|
+
return 'This username is not available';
|
|
713
|
+
case 'offensive':
|
|
714
|
+
return 'This username is not available';
|
|
715
|
+
case 'fraud':
|
|
716
|
+
return 'This username is not available';
|
|
717
|
+
case 'future_reserved':
|
|
718
|
+
return 'This username is reserved';
|
|
719
|
+
default:
|
|
720
|
+
return 'This username is not available';
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Validation configuration
|
|
725
|
+
*/
|
|
726
|
+
export const VALIDATION_CONFIG = {
|
|
727
|
+
minLength: 3,
|
|
728
|
+
maxLength: 30,
|
|
729
|
+
pattern: /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,
|
|
730
|
+
patternDescription: 'Must start with a letter, contain only lowercase letters, numbers, and single hyphens'
|
|
731
|
+
};
|