This commit is contained in:
Carl-Gerhard Lindesvärd
2026-03-06 09:00:10 +01:00
parent 765e4aa107
commit 90881e5ffb
68 changed files with 4092 additions and 1694 deletions

View File

@@ -1,6 +1,5 @@
import fs from 'node:fs';
import path from 'node:path';
import { dirname } from 'node:path';
import path, { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
@@ -44,6 +43,66 @@ const extraReferrers = {
'squarespace.com': { type: 'commerce', name: 'Squarespace' },
'stackoverflow.com': { type: 'tech', name: 'Stack Overflow' },
'teams.microsoft.com': { type: 'social', name: 'Microsoft Teams' },
'chat.com': { type: 'ai', name: 'Chat.com' },
'chatgpt.com': { type: 'ai', name: 'ChatGPT' },
'openai.com': { type: 'ai', name: 'OpenAI' },
'anthropic.com': { type: 'ai', name: 'Anthropic' },
'claude.ai': { type: 'ai', name: 'Claude' },
'gemini.google.com': { type: 'ai', name: 'Google Gemini' },
'bard.google.com': { type: 'ai', name: 'Google Bard' },
'copilot.microsoft.com': { type: 'ai', name: 'Microsoft Copilot' },
'copilot.cloud.microsoft': { type: 'ai', name: 'Microsoft Copilot' },
'perplexity.ai': { type: 'ai', name: 'Perplexity' },
'you.com': { type: 'ai', name: 'You.com' },
'poe.com': { type: 'ai', name: 'Poe' },
'phind.com': { type: 'ai', name: 'Phind' },
'huggingface.co': { type: 'ai', name: 'Hugging Face' },
'hf.co': { type: 'ai', name: 'Hugging Face' },
'character.ai': { type: 'ai', name: 'Character.AI' },
'meta.ai': { type: 'ai', name: 'Meta AI' },
'mistral.ai': { type: 'ai', name: 'Mistral' },
'chat.mistral.ai': { type: 'ai', name: 'Mistral Le Chat' },
'deepseek.com': { type: 'ai', name: 'DeepSeek' },
'chat.deepseek.com': { type: 'ai', name: 'DeepSeek Chat' },
'pi.ai': { type: 'ai', name: 'Pi' },
'inflection.ai': { type: 'ai', name: 'Inflection' },
'cohere.com': { type: 'ai', name: 'Cohere' },
'coral.cohere.com': { type: 'ai', name: 'Cohere Coral' },
'jasper.ai': { type: 'ai', name: 'Jasper' },
'writesonic.com': { type: 'ai', name: 'Writesonic' },
'copy.ai': { type: 'ai', name: 'Copy.ai' },
'rytr.me': { type: 'ai', name: 'Rytr' },
'notion.ai': { type: 'ai', name: 'Notion AI' },
'grammarly.com': { type: 'ai', name: 'Grammarly' },
'bing.com': { type: 'ai', name: 'Bing AI' },
'grok.com': { type: 'ai', name: 'Grok' },
'x.ai': { type: 'ai', name: 'xAI' },
'aistudio.google.com': { type: 'ai', name: 'Google AI Studio' },
'labs.google.com': { type: 'ai', name: 'Google Labs' },
'ai.google': { type: 'ai', name: 'Google AI' },
'forefront.ai': { type: 'ai', name: 'Forefront' },
'together.ai': { type: 'ai', name: 'Together AI' },
'groq.com': { type: 'ai', name: 'Groq' },
'replicate.com': { type: 'ai', name: 'Replicate' },
'vercel.ai': { type: 'ai', name: 'Vercel AI' },
'v0.dev': { type: 'ai', name: 'v0' },
'bolt.new': { type: 'ai', name: 'Bolt' },
'replit.com': { type: 'ai', name: 'Replit' },
'cursor.com': { type: 'ai', name: 'Cursor' },
'tabnine.com': { type: 'ai', name: 'Tabnine' },
'codeium.com': { type: 'ai', name: 'Codeium' },
'sourcegraph.com': { type: 'ai', name: 'Sourcegraph Cody' },
'kimi.moonshot.cn': { type: 'ai', name: 'Kimi' },
'moonshot.ai': { type: 'ai', name: 'Moonshot AI' },
'doubao.com': { type: 'ai', name: 'Doubao' },
'tongyi.aliyun.com': { type: 'ai', name: 'Tongyi Qianwen' },
'yiyan.baidu.com': { type: 'ai', name: 'Ernie Bot' },
'chatglm.cn': { type: 'ai', name: 'ChatGLM' },
'zhipu.ai': { type: 'ai', name: 'Zhipu AI' },
'minimax.chat': { type: 'ai', name: 'MiniMax' },
'lmsys.org': { type: 'ai', name: 'LMSYS' },
'chat.lmsys.org': { type: 'ai', name: 'LMSYS Chat' },
'llama.meta.com': { type: 'ai', name: 'Meta Llama' },
};
function transform(data: any) {
@@ -67,7 +126,7 @@ async function main() {
// Get document, or throw exception on error
try {
const data = await fetch(
'https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-latest.json',
'https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-latest.json'
).then((res) => res.json());
fs.writeFileSync(
@@ -82,11 +141,11 @@ async function main() {
{
...transform(data),
...extraReferrers,
},
}
)} as const;`,
'export default referrers;',
].join('\n'),
'utf-8',
'utf-8'
);
} catch (e) {
console.log(e);