@apify/utilities 2.29.4 → 2.31.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/cjs/index.d.ts CHANGED
@@ -86,6 +86,11 @@ declare function weightedAverage(val1: number, weight1: number, val2: number, we
86
86
  /**
87
87
  * Checks whether username is listed in FORBIDDEN_USERNAMES
88
88
  * or matches any root route path.
89
+ *
90
+ * NOTE: The forbidden list may expand over time, so a username that was
91
+ * previously permitted may later become forbidden. Use this function only
92
+ * when validating a username change, not as part of normal authentication
93
+ * or authorization flow.
89
94
  */
90
95
  declare function isForbiddenUsername(username: string): boolean;
91
96
  /**
package/esm/index.d.mts CHANGED
@@ -86,6 +86,11 @@ declare function weightedAverage(val1: number, weight1: number, val2: number, we
86
86
  /**
87
87
  * Checks whether username is listed in FORBIDDEN_USERNAMES
88
88
  * or matches any root route path.
89
+ *
90
+ * NOTE: The forbidden list may expand over time, so a username that was
91
+ * previously permitted may later become forbidden. Use this function only
92
+ * when validating a username change, not as part of normal authentication
93
+ * or authorization flow.
89
94
  */
90
95
  declare function isForbiddenUsername(username: string): boolean;
91
96
  /**
package/esm/index.mjs CHANGED
@@ -331,14 +331,35 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
331
331
  "challange",
332
332
  "1m-challenge",
333
333
  "1m-usd-challenge",
334
+ "contact-sales",
335
+ "creator",
336
+ "creator-plan",
337
+ "request-an-integration",
338
+ "whitepaper",
339
+ "adviser",
340
+ "crawlee",
341
+ "ultimate-scraper",
342
+ "agent-skills",
334
343
  // Apify platform resources
335
344
  "key-value-store",
336
345
  "request-queue",
337
346
  "request-queues",
338
347
  "builds",
339
348
  "schedule",
349
+ "standby",
350
+ "pay-per-event",
351
+ "pay-per-result",
352
+ "pay-per-usage",
353
+ "ppe",
354
+ "ppr",
355
+ "compute-unit",
356
+ "compute-units",
340
357
  // AI / LLM related
358
+ "agent",
359
+ "agents",
360
+ "agentic",
341
361
  "llms",
362
+ "llm",
342
363
  "openai",
343
364
  "anthropic",
344
365
  "claude",
@@ -348,6 +369,124 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
348
369
  "prompts",
349
370
  "embeddings",
350
371
  "vectors",
372
+ "rag",
373
+ // Agentic protocols / agentic payments / agent identity
374
+ "agentic-commerce",
375
+ "agentic-economy",
376
+ "agentic-payments",
377
+ "a2a",
378
+ "a2b",
379
+ "a2p",
380
+ "ap2",
381
+ "b2a",
382
+ "acp",
383
+ "ucp",
384
+ "mpp",
385
+ "x402",
386
+ "l402",
387
+ "anp",
388
+ "agp",
389
+ "erc-8004",
390
+ "kya",
391
+ "kyapay",
392
+ // Trust / verification / anti-impersonation handles
393
+ // (entries containing 'apify' are already blocked by USERNAME.RESTRICTED_REGEX)
394
+ "official",
395
+ "verified",
396
+ "certified",
397
+ "authorized",
398
+ "partner-official",
399
+ "gold-partner",
400
+ "premium-partner",
401
+ "staff",
402
+ "moderator",
403
+ // Apify subdomain / service names (current and future)
404
+ "console",
405
+ "cli",
406
+ "studio",
407
+ "gateway",
408
+ "workbench",
409
+ "agents-marketplace",
410
+ "agents-store",
411
+ "mcp-server",
412
+ "mcp-servers",
413
+ "mcp-gateway",
414
+ // Region / locale codes (3+ chars only; 1-2 char codes are blocked by USERNAME.MIN_LENGTH)
415
+ "asia",
416
+ "latam",
417
+ "emea",
418
+ "apac",
419
+ "i18n",
420
+ "l10n",
421
+ "localization",
422
+ "localisation",
423
+ // Currency / payment generics (open standards, not company brands)
424
+ "usd",
425
+ "eur",
426
+ "gbp",
427
+ "jpy",
428
+ "cny",
429
+ "usdc",
430
+ "usdt",
431
+ "btc",
432
+ "eth",
433
+ "sol",
434
+ "crypto",
435
+ "fiat",
436
+ "stablecoin",
437
+ "stablecoins",
438
+ "payment",
439
+ "payments",
440
+ "payout",
441
+ "payouts",
442
+ "invoice",
443
+ "invoices",
444
+ // Compliance / certifications
445
+ "soc",
446
+ "soc2",
447
+ "iso",
448
+ "iso-27001",
449
+ "hipaa",
450
+ "ccpa",
451
+ "pci",
452
+ "pci-dss",
453
+ "dpa",
454
+ "dpia",
455
+ "dmca",
456
+ "sla",
457
+ "eula",
458
+ "aml",
459
+ "kyc",
460
+ // Open-source / community roles
461
+ "contributor",
462
+ "contributors",
463
+ "maintainer",
464
+ "maintainers",
465
+ "core-team",
466
+ "oss",
467
+ "open-source",
468
+ // Anti-abuse / scam-bait names (frequently used in account fraud)
469
+ "spam",
470
+ "scam",
471
+ "phishing",
472
+ "malware",
473
+ "hack",
474
+ "hacked",
475
+ "giveaway",
476
+ "airdrop",
477
+ "bitcoin-giveaway",
478
+ "free-credits",
479
+ "free-money",
480
+ // Apify marketing / campaign slugs
481
+ "launch",
482
+ "launches",
483
+ "webinar",
484
+ "webinars",
485
+ "meetup",
486
+ "meetups",
487
+ "summit",
488
+ "conference",
489
+ "conferences",
351
490
  // Organizations / workspaces / permissions
352
491
  "orgs",
353
492
  "workspaces",
@@ -391,9 +530,6 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
391
530
  // Brand protection / impersonation prevention
392
531
  "brand",
393
532
  "branding",
394
- "verified",
395
- "apify-support",
396
- "apify-team",
397
533
  "support-team",
398
534
  "abuse",
399
535
  // Incidents / updates
@@ -420,6 +556,29 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
420
556
  "(\\..*)",
421
557
  // Username starting with xxx-
422
558
  "(xxx-.*)",
559
+ // Usernames containing inappropriate/adult content keywords
560
+ "(.*porn.*)",
561
+ "(.*vagina.*)",
562
+ "(.*dildo.*)",
563
+ "(.*nsfw.*)",
564
+ "(.*hentai.*)",
565
+ "(.*cunt.*)",
566
+ "(.*fuck.*)",
567
+ "(.*shit.*)",
568
+ "(.*bitch.*)",
569
+ "(.*slut.*)",
570
+ "(.*whore.*)",
571
+ "(.*boob.*)",
572
+ "(.*tits.*)",
573
+ // Words that require non-letter boundaries to avoid false positives with
574
+ // legitimate surnames (Dickens, Hancock, Nudelman) and words (Uranus, pussycat, snaked)
575
+ "((.+[^a-z]|)cock([^a-z].+|))",
576
+ "((.+[^a-z]|)dick([^a-z].+|))",
577
+ "((.+[^a-z]|)anus([^a-z].+|))",
578
+ "((.+[^a-z]|)pussy([^a-z].+|))",
579
+ "((.+[^a-z]|)nude([^a-z].+|))",
580
+ "((.+[^a-z]|)penis([^a-z].+|))",
581
+ "((.+[^a-z]|)naked([^a-z].+|))",
423
582
  // Username starting with install-cli. (see https://docs.apify.com/cli/docs/installation)
424
583
  "(install-cli\\..*)",
425
584
  // Strings not starting with letter or number