code-languages 1.39.0 → 1.40.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/README.md +64 -0
- package/dist/{api-EZK9DmOV.d.ts → api-BlQoDQtF.d.ts} +51 -1
- package/dist/{api-C-SCQpIV.d.cts → api-Cvg4BdaR.d.cts} +51 -1
- package/dist/api.cjs +478 -27
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +478 -27
- package/dist/index.cjs +486 -27
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +485 -28
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17435,6 +17435,291 @@ var detectProjectLanguages = (filenames) => {
|
|
|
17435
17435
|
return [...fileCounts.entries()].map(([slug, files]) => ({ slug, files })).sort((first, second) => second.files - first.files || first.slug.localeCompare(second.slug));
|
|
17436
17436
|
};
|
|
17437
17437
|
|
|
17438
|
+
// src/domain/ecosystem/registry.ts
|
|
17439
|
+
var ECOSYSTEM_REGISTRY = [
|
|
17440
|
+
// Web
|
|
17441
|
+
{
|
|
17442
|
+
slug: "web",
|
|
17443
|
+
name: "Web",
|
|
17444
|
+
description: "Languages used for building websites, web apps, and web standards.",
|
|
17445
|
+
aliases: ["web", "frontend", "browser"],
|
|
17446
|
+
targets: ["Web", "Frontend", "JavaScript", "Static Sites", "CMS", "Web Servers"]
|
|
17447
|
+
},
|
|
17448
|
+
// JavaScript ecosystem
|
|
17449
|
+
{
|
|
17450
|
+
slug: "node",
|
|
17451
|
+
name: "Node.js",
|
|
17452
|
+
description: "Languages that run on or integrate with the Node.js server-side runtime.",
|
|
17453
|
+
aliases: ["node", "nodejs", "node.js"],
|
|
17454
|
+
targets: ["Node.js"]
|
|
17455
|
+
},
|
|
17456
|
+
// JVM
|
|
17457
|
+
{
|
|
17458
|
+
slug: "jvm",
|
|
17459
|
+
name: "JVM",
|
|
17460
|
+
description: "Languages that run on the Java Virtual Machine.",
|
|
17461
|
+
aliases: ["jvm", "java"],
|
|
17462
|
+
targets: ["JVM", "Java", "Kotlin", "Groovy", "Scala"]
|
|
17463
|
+
},
|
|
17464
|
+
// .NET
|
|
17465
|
+
{
|
|
17466
|
+
slug: "dotnet",
|
|
17467
|
+
name: ".NET",
|
|
17468
|
+
description: "Languages that target the .NET platform and runtime.",
|
|
17469
|
+
aliases: ["dotnet", ".net", "net"],
|
|
17470
|
+
targets: [".NET", "ASP.NET", "Blazor", "ASP.NET Core"]
|
|
17471
|
+
},
|
|
17472
|
+
// DevOps / Cloud
|
|
17473
|
+
{
|
|
17474
|
+
slug: "devops",
|
|
17475
|
+
name: "DevOps",
|
|
17476
|
+
description: "Languages used for CI/CD, infrastructure, and automation pipelines.",
|
|
17477
|
+
aliases: ["devops", "cicd", "ci-cd"],
|
|
17478
|
+
targets: ["DevOps", "CI/CD", "Platform Automation", "Cloud tooling"]
|
|
17479
|
+
},
|
|
17480
|
+
{
|
|
17481
|
+
slug: "cloud",
|
|
17482
|
+
name: "Cloud",
|
|
17483
|
+
description: "Languages used for cloud computing, cloud-native applications, and IaC.",
|
|
17484
|
+
aliases: ["cloud", "cloud-native"],
|
|
17485
|
+
targets: [
|
|
17486
|
+
"Cloud",
|
|
17487
|
+
"Cloud Computing",
|
|
17488
|
+
"Cloud Native",
|
|
17489
|
+
"Infrastructure as Code",
|
|
17490
|
+
"Infrastructure"
|
|
17491
|
+
]
|
|
17492
|
+
},
|
|
17493
|
+
{
|
|
17494
|
+
slug: "kubernetes",
|
|
17495
|
+
name: "Kubernetes",
|
|
17496
|
+
description: "Languages and tools used in the Kubernetes ecosystem.",
|
|
17497
|
+
aliases: ["kubernetes", "k8s"],
|
|
17498
|
+
targets: ["Kubernetes"]
|
|
17499
|
+
},
|
|
17500
|
+
// Data
|
|
17501
|
+
{
|
|
17502
|
+
slug: "data-science",
|
|
17503
|
+
name: "Data Science",
|
|
17504
|
+
description: "Languages used for data analysis, machine learning, and statistical computing.",
|
|
17505
|
+
aliases: ["data-science", "ml", "machine-learning", "ai"],
|
|
17506
|
+
targets: ["Data Science", "Machine Learning", "AI", "ML", "Data Analysis", "Analytics"]
|
|
17507
|
+
},
|
|
17508
|
+
{
|
|
17509
|
+
slug: "scientific",
|
|
17510
|
+
name: "Scientific Computing",
|
|
17511
|
+
description: "Languages used in research, numerical computing, and scientific simulations.",
|
|
17512
|
+
aliases: ["scientific", "scientific-computing", "hpc", "research"],
|
|
17513
|
+
targets: [
|
|
17514
|
+
"Scientific Computing",
|
|
17515
|
+
"Research",
|
|
17516
|
+
"HPC",
|
|
17517
|
+
"Numerical Computing",
|
|
17518
|
+
"Numerical Analysis",
|
|
17519
|
+
"Bioinformatics"
|
|
17520
|
+
]
|
|
17521
|
+
},
|
|
17522
|
+
// Systems & Embedded
|
|
17523
|
+
{
|
|
17524
|
+
slug: "systems",
|
|
17525
|
+
name: "Systems",
|
|
17526
|
+
description: "Languages used for operating systems, system utilities, and native development.",
|
|
17527
|
+
aliases: ["systems", "systems-programming", "native"],
|
|
17528
|
+
targets: [
|
|
17529
|
+
"Systems",
|
|
17530
|
+
"Systems Programming",
|
|
17531
|
+
"Systems programming",
|
|
17532
|
+
"Operating Systems",
|
|
17533
|
+
"Native",
|
|
17534
|
+
"Native Applications",
|
|
17535
|
+
"Native applications"
|
|
17536
|
+
]
|
|
17537
|
+
},
|
|
17538
|
+
{
|
|
17539
|
+
slug: "embedded",
|
|
17540
|
+
name: "Embedded",
|
|
17541
|
+
description: "Languages used in firmware, microcontrollers, and embedded hardware.",
|
|
17542
|
+
aliases: ["embedded", "firmware", "iot"],
|
|
17543
|
+
targets: [
|
|
17544
|
+
"Embedded",
|
|
17545
|
+
"Embedded Systems",
|
|
17546
|
+
"Embedded systems",
|
|
17547
|
+
"Firmware",
|
|
17548
|
+
"IoT",
|
|
17549
|
+
"Microcontroller Firmware"
|
|
17550
|
+
]
|
|
17551
|
+
},
|
|
17552
|
+
// Game development
|
|
17553
|
+
{
|
|
17554
|
+
slug: "game-dev",
|
|
17555
|
+
name: "Game Development",
|
|
17556
|
+
description: "Languages used for building video games and game engines.",
|
|
17557
|
+
aliases: ["game-dev", "games", "game-development", "gamedev"],
|
|
17558
|
+
targets: ["Game Development", "Games", "2D Games", "3D Games", "Indie Games", "Modding"]
|
|
17559
|
+
},
|
|
17560
|
+
// Mobile
|
|
17561
|
+
{
|
|
17562
|
+
slug: "mobile",
|
|
17563
|
+
name: "Mobile",
|
|
17564
|
+
description: "Languages used for iOS, Android, and cross-platform mobile development.",
|
|
17565
|
+
aliases: ["mobile", "ios", "android"],
|
|
17566
|
+
targets: ["Mobile", "iOS", "Android", "Flutter", "Mobile Applications", "Mobile UI"]
|
|
17567
|
+
},
|
|
17568
|
+
// Blockchain
|
|
17569
|
+
{
|
|
17570
|
+
slug: "blockchain",
|
|
17571
|
+
name: "Blockchain",
|
|
17572
|
+
description: "Languages used for smart contracts, DeFi, and blockchain development.",
|
|
17573
|
+
aliases: ["blockchain", "web3", "smart-contracts", "crypto"],
|
|
17574
|
+
targets: ["Blockchain", "Smart Contracts", "Ethereum", "Web3", "EVM", "DeFi"]
|
|
17575
|
+
},
|
|
17576
|
+
// GPU / Graphics
|
|
17577
|
+
{
|
|
17578
|
+
slug: "gpu",
|
|
17579
|
+
name: "GPU",
|
|
17580
|
+
description: "Languages used for GPU computing, graphics, and shader programming.",
|
|
17581
|
+
aliases: ["gpu", "graphics", "gpu-programming"],
|
|
17582
|
+
targets: [
|
|
17583
|
+
"GPU Programming",
|
|
17584
|
+
"GPU Computing",
|
|
17585
|
+
"GPU Compute",
|
|
17586
|
+
"WebGPU",
|
|
17587
|
+
"WebGL",
|
|
17588
|
+
"DirectX",
|
|
17589
|
+
"Graphics",
|
|
17590
|
+
"Khronos"
|
|
17591
|
+
]
|
|
17592
|
+
},
|
|
17593
|
+
// WebAssembly
|
|
17594
|
+
{
|
|
17595
|
+
slug: "wasm",
|
|
17596
|
+
name: "WebAssembly",
|
|
17597
|
+
description: "Languages that compile to or run on WebAssembly.",
|
|
17598
|
+
aliases: ["wasm", "webassembly"],
|
|
17599
|
+
targets: ["WebAssembly", "WASI", "WebAssembly Component Model"]
|
|
17600
|
+
},
|
|
17601
|
+
// Enterprise
|
|
17602
|
+
{
|
|
17603
|
+
slug: "enterprise",
|
|
17604
|
+
name: "Enterprise",
|
|
17605
|
+
description: "Languages used in large-scale enterprise software and business applications.",
|
|
17606
|
+
aliases: ["enterprise"],
|
|
17607
|
+
targets: ["Enterprise", "Enterprise Applications", "Enterprise Data", "Enterprise Integration"]
|
|
17608
|
+
},
|
|
17609
|
+
// Formal methods / Verification
|
|
17610
|
+
{
|
|
17611
|
+
slug: "formal-methods",
|
|
17612
|
+
name: "Formal Methods",
|
|
17613
|
+
description: "Languages used for formal proofs, verification, and correctness guarantees.",
|
|
17614
|
+
aliases: ["formal-methods", "verification", "proof-assistants"],
|
|
17615
|
+
targets: [
|
|
17616
|
+
"Formal Methods",
|
|
17617
|
+
"Formal methods",
|
|
17618
|
+
"Verification",
|
|
17619
|
+
"Proof Assistants",
|
|
17620
|
+
"Proof assistants",
|
|
17621
|
+
"Low-level Verification"
|
|
17622
|
+
]
|
|
17623
|
+
},
|
|
17624
|
+
// Compilers / Language tooling
|
|
17625
|
+
{
|
|
17626
|
+
slug: "compilers",
|
|
17627
|
+
name: "Compilers",
|
|
17628
|
+
description: "Languages used in compiler development, language design, and tooling.",
|
|
17629
|
+
aliases: ["compilers", "language-design", "language-tooling"],
|
|
17630
|
+
targets: [
|
|
17631
|
+
"Compilers",
|
|
17632
|
+
"Language Design",
|
|
17633
|
+
"Language Research",
|
|
17634
|
+
"Language Tools",
|
|
17635
|
+
"Language Implementation",
|
|
17636
|
+
"Compiler Development"
|
|
17637
|
+
]
|
|
17638
|
+
},
|
|
17639
|
+
// Unix / Linux
|
|
17640
|
+
{
|
|
17641
|
+
slug: "unix",
|
|
17642
|
+
name: "Unix",
|
|
17643
|
+
description: "Languages and tools used in Unix-like operating systems and shell environments.",
|
|
17644
|
+
aliases: ["unix", "linux", "posix"],
|
|
17645
|
+
targets: ["Unix", "Linux", "macOS", "BSD", "Operating systems"]
|
|
17646
|
+
},
|
|
17647
|
+
// Documentation / Publishing
|
|
17648
|
+
{
|
|
17649
|
+
slug: "documentation",
|
|
17650
|
+
name: "Documentation",
|
|
17651
|
+
description: "Languages used for writing, publishing, and technical documentation.",
|
|
17652
|
+
aliases: ["documentation", "publishing", "technical-writing"],
|
|
17653
|
+
targets: [
|
|
17654
|
+
"Documentation",
|
|
17655
|
+
"Publishing",
|
|
17656
|
+
"Technical Writing",
|
|
17657
|
+
"Technical writing",
|
|
17658
|
+
"Academic Writing",
|
|
17659
|
+
"Academic publishing"
|
|
17660
|
+
]
|
|
17661
|
+
},
|
|
17662
|
+
// Configuration
|
|
17663
|
+
{
|
|
17664
|
+
slug: "configuration",
|
|
17665
|
+
name: "Configuration",
|
|
17666
|
+
description: "Languages used for application and infrastructure configuration.",
|
|
17667
|
+
aliases: ["configuration", "config"],
|
|
17668
|
+
targets: ["Configuration", "Configuration Management"]
|
|
17669
|
+
},
|
|
17670
|
+
// Scripting / Automation
|
|
17671
|
+
{
|
|
17672
|
+
slug: "automation",
|
|
17673
|
+
name: "Automation",
|
|
17674
|
+
description: "Languages used for task automation, scripting, and workflow orchestration.",
|
|
17675
|
+
aliases: ["automation", "scripting"],
|
|
17676
|
+
targets: ["Automation", "Scripting", "DevOps", "CLI", "CLI Tools"]
|
|
17677
|
+
},
|
|
17678
|
+
// Apple / macOS
|
|
17679
|
+
{
|
|
17680
|
+
slug: "apple",
|
|
17681
|
+
name: "Apple",
|
|
17682
|
+
description: "Languages used for macOS, iOS, and the broader Apple platform.",
|
|
17683
|
+
aliases: ["apple", "macos", "apple-platforms"],
|
|
17684
|
+
targets: ["Apple", "Apple Platforms", "macOS", "iOS", "tvOS", "visionOS", "iPadOS"]
|
|
17685
|
+
},
|
|
17686
|
+
// Windows
|
|
17687
|
+
{
|
|
17688
|
+
slug: "windows",
|
|
17689
|
+
name: "Windows",
|
|
17690
|
+
description: "Languages used for Windows application and system development.",
|
|
17691
|
+
aliases: ["windows"],
|
|
17692
|
+
targets: ["Windows", "Windows Forms", "WPF", "UWP", "Desktop Applications"]
|
|
17693
|
+
},
|
|
17694
|
+
// Observability
|
|
17695
|
+
{
|
|
17696
|
+
slug: "observability",
|
|
17697
|
+
name: "Observability",
|
|
17698
|
+
description: "Languages used for monitoring, metrics, logging, and security analytics.",
|
|
17699
|
+
aliases: ["observability", "monitoring", "metrics"],
|
|
17700
|
+
targets: ["Observability", "Monitoring", "Metrics", "Security analytics"]
|
|
17701
|
+
}
|
|
17702
|
+
];
|
|
17703
|
+
function findEcosystem(value) {
|
|
17704
|
+
const key = value.trim().toLowerCase();
|
|
17705
|
+
return ECOSYSTEM_REGISTRY.find((e) => e.aliases.includes(key));
|
|
17706
|
+
}
|
|
17707
|
+
function matchesEcosystem(lang, targets) {
|
|
17708
|
+
const pool = lang.tooling?.ecosystems ?? [];
|
|
17709
|
+
return targets.some((t) => pool.some((s) => s.toLowerCase().includes(t.toLowerCase())));
|
|
17710
|
+
}
|
|
17711
|
+
function ecosystemInfoFromDefinition(def) {
|
|
17712
|
+
return {
|
|
17713
|
+
slug: def.slug,
|
|
17714
|
+
name: def.name,
|
|
17715
|
+
description: def.description,
|
|
17716
|
+
aliases: def.aliases
|
|
17717
|
+
};
|
|
17718
|
+
}
|
|
17719
|
+
function getEcosystems() {
|
|
17720
|
+
return ECOSYSTEM_REGISTRY.map(ecosystemInfoFromDefinition);
|
|
17721
|
+
}
|
|
17722
|
+
|
|
17438
17723
|
// src/domain/i18n/index.ts
|
|
17439
17724
|
var localizeLanguage = (language, locale = "en") => {
|
|
17440
17725
|
const { i18n, ...metadata } = language;
|
|
@@ -18040,7 +18325,6 @@ var languages = [
|
|
|
18040
18325
|
// src/domain/package-manager/registry.ts
|
|
18041
18326
|
var PACKAGE_MANAGER_REGISTRY = [
|
|
18042
18327
|
{
|
|
18043
|
-
slug: "npm",
|
|
18044
18328
|
name: "npm",
|
|
18045
18329
|
color: "#CB3837",
|
|
18046
18330
|
logo: "https://cdn.simpleicons.org/npm",
|
|
@@ -18049,7 +18333,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18049
18333
|
targets: ["npm"]
|
|
18050
18334
|
},
|
|
18051
18335
|
{
|
|
18052
|
-
slug: "pnpm",
|
|
18053
18336
|
name: "pnpm",
|
|
18054
18337
|
color: "#F69220",
|
|
18055
18338
|
logo: "https://cdn.simpleicons.org/pnpm",
|
|
@@ -18058,7 +18341,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18058
18341
|
targets: ["pnpm"]
|
|
18059
18342
|
},
|
|
18060
18343
|
{
|
|
18061
|
-
slug: "yarn",
|
|
18062
18344
|
name: "Yarn",
|
|
18063
18345
|
color: "#2C8EBB",
|
|
18064
18346
|
logo: "https://cdn.simpleicons.org/yarn",
|
|
@@ -18067,7 +18349,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18067
18349
|
targets: ["Yarn"]
|
|
18068
18350
|
},
|
|
18069
18351
|
{
|
|
18070
|
-
slug: "pip",
|
|
18071
18352
|
name: "pip",
|
|
18072
18353
|
color: "#3775A9",
|
|
18073
18354
|
logo: "https://cdn.simpleicons.org/pypi",
|
|
@@ -18076,7 +18357,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18076
18357
|
targets: ["pip"]
|
|
18077
18358
|
},
|
|
18078
18359
|
{
|
|
18079
|
-
slug: "poetry",
|
|
18080
18360
|
name: "Poetry",
|
|
18081
18361
|
color: "#60A5FA",
|
|
18082
18362
|
logo: "https://cdn.simpleicons.org/poetry",
|
|
@@ -18085,7 +18365,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18085
18365
|
targets: ["Poetry"]
|
|
18086
18366
|
},
|
|
18087
18367
|
{
|
|
18088
|
-
slug: "uv",
|
|
18089
18368
|
name: "uv",
|
|
18090
18369
|
color: "#DE5FE9",
|
|
18091
18370
|
logo: "https://avatars.githubusercontent.com/u/115962839?v=4",
|
|
@@ -18094,7 +18373,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18094
18373
|
targets: ["uv"]
|
|
18095
18374
|
},
|
|
18096
18375
|
{
|
|
18097
|
-
slug: "conda",
|
|
18098
18376
|
name: "conda",
|
|
18099
18377
|
color: "#44A833",
|
|
18100
18378
|
logo: "https://cdn.simpleicons.org/anaconda",
|
|
@@ -18103,7 +18381,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18103
18381
|
targets: ["conda"]
|
|
18104
18382
|
},
|
|
18105
18383
|
{
|
|
18106
|
-
slug: "cargo",
|
|
18107
18384
|
name: "Cargo",
|
|
18108
18385
|
color: "#CE422B",
|
|
18109
18386
|
logo: "https://cdn.simpleicons.org/rust",
|
|
@@ -18112,7 +18389,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18112
18389
|
targets: ["Cargo"]
|
|
18113
18390
|
},
|
|
18114
18391
|
{
|
|
18115
|
-
slug: "maven",
|
|
18116
18392
|
name: "Maven",
|
|
18117
18393
|
color: "#C71A36",
|
|
18118
18394
|
logo: "https://cdn.simpleicons.org/apachemaven",
|
|
@@ -18121,7 +18397,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18121
18397
|
targets: ["Maven"]
|
|
18122
18398
|
},
|
|
18123
18399
|
{
|
|
18124
|
-
slug: "gradle",
|
|
18125
18400
|
name: "Gradle",
|
|
18126
18401
|
color: "#02303A",
|
|
18127
18402
|
logo: "https://cdn.simpleicons.org/gradle",
|
|
@@ -18130,7 +18405,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18130
18405
|
targets: ["Gradle"]
|
|
18131
18406
|
},
|
|
18132
18407
|
{
|
|
18133
|
-
slug: "nuget",
|
|
18134
18408
|
name: "NuGet",
|
|
18135
18409
|
color: "#004880",
|
|
18136
18410
|
logo: "https://cdn.simpleicons.org/nuget",
|
|
@@ -18139,7 +18413,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18139
18413
|
targets: ["NuGet"]
|
|
18140
18414
|
},
|
|
18141
18415
|
{
|
|
18142
|
-
slug: "composer",
|
|
18143
18416
|
name: "Composer",
|
|
18144
18417
|
color: "#885630",
|
|
18145
18418
|
logo: "https://cdn.simpleicons.org/composer",
|
|
@@ -18148,7 +18421,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18148
18421
|
targets: ["Composer"]
|
|
18149
18422
|
},
|
|
18150
18423
|
{
|
|
18151
|
-
slug: "hex",
|
|
18152
18424
|
name: "Hex",
|
|
18153
18425
|
color: "#6E4A7E",
|
|
18154
18426
|
logo: "https://cdn.simpleicons.org/elixir",
|
|
@@ -18157,7 +18429,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18157
18429
|
targets: ["Hex"]
|
|
18158
18430
|
},
|
|
18159
18431
|
{
|
|
18160
|
-
slug: "mix",
|
|
18161
18432
|
name: "Mix",
|
|
18162
18433
|
color: "#6E4A7E",
|
|
18163
18434
|
logo: "https://cdn.simpleicons.org/elixir",
|
|
@@ -18166,7 +18437,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18166
18437
|
targets: ["Mix"]
|
|
18167
18438
|
},
|
|
18168
18439
|
{
|
|
18169
|
-
slug: "cabal",
|
|
18170
18440
|
name: "Cabal",
|
|
18171
18441
|
color: "#5D4F85",
|
|
18172
18442
|
logo: "https://cdn.simpleicons.org/haskell",
|
|
@@ -18175,7 +18445,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18175
18445
|
targets: ["Cabal"]
|
|
18176
18446
|
},
|
|
18177
18447
|
{
|
|
18178
|
-
slug: "stack",
|
|
18179
18448
|
name: "Stack",
|
|
18180
18449
|
color: "#5D4F85",
|
|
18181
18450
|
logo: "https://cdn.simpleicons.org/haskell",
|
|
@@ -18184,7 +18453,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18184
18453
|
targets: ["Stack"]
|
|
18185
18454
|
},
|
|
18186
18455
|
{
|
|
18187
|
-
slug: "pub",
|
|
18188
18456
|
name: "pub",
|
|
18189
18457
|
color: "#0175C2",
|
|
18190
18458
|
logo: "https://cdn.simpleicons.org/dart",
|
|
@@ -18193,7 +18461,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18193
18461
|
targets: ["pub"]
|
|
18194
18462
|
},
|
|
18195
18463
|
{
|
|
18196
|
-
slug: "cocoapods",
|
|
18197
18464
|
name: "CocoaPods",
|
|
18198
18465
|
color: "#EE3322",
|
|
18199
18466
|
logo: "https://cdn.simpleicons.org/cocoapods",
|
|
@@ -18202,7 +18469,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18202
18469
|
targets: ["CocoaPods"]
|
|
18203
18470
|
},
|
|
18204
18471
|
{
|
|
18205
|
-
slug: "spm",
|
|
18206
18472
|
name: "Swift PM",
|
|
18207
18473
|
color: "#F05138",
|
|
18208
18474
|
logo: "https://cdn.simpleicons.org/swift",
|
|
@@ -18211,7 +18477,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18211
18477
|
targets: ["Swift Package Manager"]
|
|
18212
18478
|
},
|
|
18213
18479
|
{
|
|
18214
|
-
slug: "rubygems",
|
|
18215
18480
|
name: "RubyGems",
|
|
18216
18481
|
color: "#E9573F",
|
|
18217
18482
|
logo: "https://cdn.simpleicons.org/rubygems",
|
|
@@ -18220,7 +18485,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18220
18485
|
targets: ["RubyGems", "Bundler"]
|
|
18221
18486
|
},
|
|
18222
18487
|
{
|
|
18223
|
-
slug: "go-mod",
|
|
18224
18488
|
name: "Go modules",
|
|
18225
18489
|
color: "#00ADD8",
|
|
18226
18490
|
logo: "https://cdn.simpleicons.org/go",
|
|
@@ -18229,7 +18493,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18229
18493
|
targets: ["Go modules"]
|
|
18230
18494
|
},
|
|
18231
18495
|
{
|
|
18232
|
-
slug: "luarocks",
|
|
18233
18496
|
name: "LuaRocks",
|
|
18234
18497
|
color: "#2C2D72",
|
|
18235
18498
|
logo: "https://cdn.simpleicons.org/lua",
|
|
@@ -18238,7 +18501,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18238
18501
|
targets: ["LuaRocks"]
|
|
18239
18502
|
},
|
|
18240
18503
|
{
|
|
18241
|
-
slug: "opam",
|
|
18242
18504
|
name: "Opam",
|
|
18243
18505
|
color: "#EF7A08",
|
|
18244
18506
|
logo: "https://avatars.githubusercontent.com/u/1841483?v=4",
|
|
@@ -18247,7 +18509,6 @@ var PACKAGE_MANAGER_REGISTRY = [
|
|
|
18247
18509
|
targets: ["opam"]
|
|
18248
18510
|
},
|
|
18249
18511
|
{
|
|
18250
|
-
slug: "cpan",
|
|
18251
18512
|
name: "CPAN",
|
|
18252
18513
|
color: "#39457E",
|
|
18253
18514
|
logo: "https://cdn.simpleicons.org/perl",
|
|
@@ -18265,8 +18526,9 @@ function matchesPackageManager(lang, targets) {
|
|
|
18265
18526
|
return targets.some((t) => pool.some((s) => s.toLowerCase().includes(t.toLowerCase())));
|
|
18266
18527
|
}
|
|
18267
18528
|
function packageManagerInfoFromDefinition(def) {
|
|
18529
|
+
const slug = def.aliases[0] ?? def.name.toLowerCase();
|
|
18268
18530
|
return {
|
|
18269
|
-
slug
|
|
18531
|
+
slug,
|
|
18270
18532
|
name: def.name,
|
|
18271
18533
|
website: def.website,
|
|
18272
18534
|
logo: def.logo,
|
|
@@ -18278,6 +18540,148 @@ function getPackageManagers() {
|
|
|
18278
18540
|
return PACKAGE_MANAGER_REGISTRY.map(packageManagerInfoFromDefinition);
|
|
18279
18541
|
}
|
|
18280
18542
|
|
|
18543
|
+
// src/domain/paradigm/registry.ts
|
|
18544
|
+
var PARADIGM_REGISTRY = [
|
|
18545
|
+
{
|
|
18546
|
+
slug: "functional",
|
|
18547
|
+
name: "Functional",
|
|
18548
|
+
description: "Computation through function evaluation, immutability, and avoiding side effects.",
|
|
18549
|
+
aliases: ["functional", "fp", "pure-functional"],
|
|
18550
|
+
targets: ["functional", "pure functional", "pure"]
|
|
18551
|
+
},
|
|
18552
|
+
{
|
|
18553
|
+
slug: "object-oriented",
|
|
18554
|
+
name: "Object-Oriented",
|
|
18555
|
+
description: "Organizes code around objects with encapsulation, inheritance, and polymorphism.",
|
|
18556
|
+
aliases: ["object-oriented", "oop", "object-oriented-programming"],
|
|
18557
|
+
targets: ["object-oriented", "class-based", "prototype-based"]
|
|
18558
|
+
},
|
|
18559
|
+
{
|
|
18560
|
+
slug: "imperative",
|
|
18561
|
+
name: "Imperative",
|
|
18562
|
+
description: "Specifies sequences of statements that change program state step by step.",
|
|
18563
|
+
aliases: ["imperative", "procedural"],
|
|
18564
|
+
targets: ["imperative", "procedural", "structured"]
|
|
18565
|
+
},
|
|
18566
|
+
{
|
|
18567
|
+
slug: "declarative",
|
|
18568
|
+
name: "Declarative",
|
|
18569
|
+
description: "Expresses the logic of a computation without describing control flow.",
|
|
18570
|
+
aliases: ["declarative"],
|
|
18571
|
+
targets: ["declarative"]
|
|
18572
|
+
},
|
|
18573
|
+
{
|
|
18574
|
+
slug: "logic",
|
|
18575
|
+
name: "Logic",
|
|
18576
|
+
description: "Programs expressed as logical facts, rules, and constraints.",
|
|
18577
|
+
aliases: ["logic", "logic-programming", "constraint"],
|
|
18578
|
+
targets: ["logic", "constraint", "relational"]
|
|
18579
|
+
},
|
|
18580
|
+
{
|
|
18581
|
+
slug: "concurrent",
|
|
18582
|
+
name: "Concurrent",
|
|
18583
|
+
description: "Languages with first-class support for concurrency, actors, and message passing.",
|
|
18584
|
+
aliases: ["concurrent", "actor-model", "parallel"],
|
|
18585
|
+
targets: ["concurrent", "actor-model", "message-passing", "parallel", "distributed"]
|
|
18586
|
+
},
|
|
18587
|
+
{
|
|
18588
|
+
slug: "reactive",
|
|
18589
|
+
name: "Reactive",
|
|
18590
|
+
description: "Languages oriented around data flows and propagation of change.",
|
|
18591
|
+
aliases: ["reactive", "dataflow", "event-driven"],
|
|
18592
|
+
targets: ["reactive", "dataflow", "event-driven"]
|
|
18593
|
+
},
|
|
18594
|
+
{
|
|
18595
|
+
slug: "generic",
|
|
18596
|
+
name: "Generic",
|
|
18597
|
+
description: "Languages with parametric polymorphism and generic type abstractions.",
|
|
18598
|
+
aliases: ["generic", "generics"],
|
|
18599
|
+
targets: ["generic"]
|
|
18600
|
+
},
|
|
18601
|
+
{
|
|
18602
|
+
slug: "scripting",
|
|
18603
|
+
name: "Scripting",
|
|
18604
|
+
description: "Languages designed for automation, shell scripting, and task execution.",
|
|
18605
|
+
aliases: ["scripting", "shell"],
|
|
18606
|
+
targets: ["scripting", "shell"]
|
|
18607
|
+
},
|
|
18608
|
+
{
|
|
18609
|
+
slug: "query",
|
|
18610
|
+
name: "Query",
|
|
18611
|
+
description: "Languages for querying structured data sources and databases.",
|
|
18612
|
+
aliases: ["query", "querying"],
|
|
18613
|
+
targets: ["query"]
|
|
18614
|
+
},
|
|
18615
|
+
{
|
|
18616
|
+
slug: "markup",
|
|
18617
|
+
name: "Markup",
|
|
18618
|
+
description: "Languages for annotating documents with structural tags and formatting.",
|
|
18619
|
+
aliases: ["markup"],
|
|
18620
|
+
targets: ["markup", "hypertext"]
|
|
18621
|
+
},
|
|
18622
|
+
{
|
|
18623
|
+
slug: "templating",
|
|
18624
|
+
name: "Templating",
|
|
18625
|
+
description: "Languages for generating text documents from parameterized templates.",
|
|
18626
|
+
aliases: ["templating", "template"],
|
|
18627
|
+
targets: ["templating", "template"]
|
|
18628
|
+
},
|
|
18629
|
+
{
|
|
18630
|
+
slug: "array",
|
|
18631
|
+
name: "Array",
|
|
18632
|
+
description: "Languages built around vectorized array and matrix operations.",
|
|
18633
|
+
aliases: ["array", "array-oriented"],
|
|
18634
|
+
targets: ["array", "array-oriented"]
|
|
18635
|
+
},
|
|
18636
|
+
{
|
|
18637
|
+
slug: "metaprogramming",
|
|
18638
|
+
name: "Metaprogramming",
|
|
18639
|
+
description: "Languages with strong support for macros, code generation, and reflection.",
|
|
18640
|
+
aliases: ["metaprogramming", "meta", "macro"],
|
|
18641
|
+
targets: ["metaprogramming", "meta-programming", "macro"]
|
|
18642
|
+
},
|
|
18643
|
+
{
|
|
18644
|
+
slug: "systems",
|
|
18645
|
+
name: "Systems",
|
|
18646
|
+
description: "Low-level languages designed for systems, embedded, and OS programming.",
|
|
18647
|
+
aliases: ["systems", "low-level"],
|
|
18648
|
+
targets: ["systems", "low-level"]
|
|
18649
|
+
},
|
|
18650
|
+
{
|
|
18651
|
+
slug: "stack-based",
|
|
18652
|
+
name: "Stack-Based",
|
|
18653
|
+
description: "Languages where computation operates on an explicit stack.",
|
|
18654
|
+
aliases: ["stack-based", "concatenative", "stack"],
|
|
18655
|
+
targets: ["stack-based", "concatenative"]
|
|
18656
|
+
},
|
|
18657
|
+
{
|
|
18658
|
+
slug: "shader",
|
|
18659
|
+
name: "Shader",
|
|
18660
|
+
description: "Languages for GPU programming, graphics pipelines, and shader stages.",
|
|
18661
|
+
aliases: ["shader", "shading", "gpu"],
|
|
18662
|
+
targets: ["shader", "shading", "gpu-programming", "gpu-compute"]
|
|
18663
|
+
}
|
|
18664
|
+
];
|
|
18665
|
+
function findParadigm(value) {
|
|
18666
|
+
const key = value.trim().toLowerCase();
|
|
18667
|
+
return PARADIGM_REGISTRY.find((p) => p.aliases.includes(key));
|
|
18668
|
+
}
|
|
18669
|
+
function matchesParadigm(lang, targets) {
|
|
18670
|
+
const pool = lang.paradigms;
|
|
18671
|
+
return targets.some((t) => pool.some((s) => s.toLowerCase().includes(t.toLowerCase())));
|
|
18672
|
+
}
|
|
18673
|
+
function paradigmInfoFromDefinition(def) {
|
|
18674
|
+
return {
|
|
18675
|
+
slug: def.slug,
|
|
18676
|
+
name: def.name,
|
|
18677
|
+
description: def.description,
|
|
18678
|
+
aliases: def.aliases
|
|
18679
|
+
};
|
|
18680
|
+
}
|
|
18681
|
+
function getParadigms() {
|
|
18682
|
+
return PARADIGM_REGISTRY.map(paradigmInfoFromDefinition);
|
|
18683
|
+
}
|
|
18684
|
+
|
|
18281
18685
|
// src/domain/runtime/registry.ts
|
|
18282
18686
|
var RUNTIME_REGISTRY = [
|
|
18283
18687
|
// JavaScript runtimes
|
|
@@ -18779,6 +19183,7 @@ function getRuntimes() {
|
|
|
18779
19183
|
|
|
18780
19184
|
// src/api.ts
|
|
18781
19185
|
var defaultLocale = "en";
|
|
19186
|
+
var languageMap = new Map(languages.map((l) => [l.slug, l]));
|
|
18782
19187
|
var normalizeLanguageSlug = (slug) => slug.trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
|
|
18783
19188
|
var localizeOptionalLanguage = (language, locale) => language ? localizeLanguage(language, locale) : void 0;
|
|
18784
19189
|
var createLanguageRequest = (getLanguage, loadLanguageModule) => {
|
|
@@ -18820,7 +19225,7 @@ var loadDetectedLanguages = async (filename) => {
|
|
|
18820
19225
|
);
|
|
18821
19226
|
return detectedLanguages.filter((language) => Boolean(language));
|
|
18822
19227
|
};
|
|
18823
|
-
var getLanguageBySlug = (slug) =>
|
|
19228
|
+
var getLanguageBySlug = (slug) => languageMap.get(slug);
|
|
18824
19229
|
var getDetectedLanguages = (filename) => detectLanguageSlugs(filename).map((slug) => getLanguageBySlug(slug)).filter((language) => Boolean(language));
|
|
18825
19230
|
var api = {
|
|
18826
19231
|
/**
|
|
@@ -18834,7 +19239,7 @@ var api = {
|
|
|
18834
19239
|
language(slug) {
|
|
18835
19240
|
const normalizedSlug = normalizeLanguageSlug(slug);
|
|
18836
19241
|
return createLanguageRequest(
|
|
18837
|
-
() =>
|
|
19242
|
+
() => languageMap.get(normalizedSlug),
|
|
18838
19243
|
() => loadLanguage(normalizedSlug)
|
|
18839
19244
|
);
|
|
18840
19245
|
},
|
|
@@ -18952,6 +19357,58 @@ var api = {
|
|
|
18952
19357
|
}
|
|
18953
19358
|
};
|
|
18954
19359
|
},
|
|
19360
|
+
/**
|
|
19361
|
+
* Selects every language that uses the given programming paradigm.
|
|
19362
|
+
*
|
|
19363
|
+
* Accepts common aliases: 'functional', 'fp', 'object-oriented', 'oop', 'declarative', etc.
|
|
19364
|
+
* Searches `language.paradigms`.
|
|
19365
|
+
*
|
|
19366
|
+
* @example
|
|
19367
|
+
* api.paradigm('functional').langs().locale('es').get();
|
|
19368
|
+
* api.paradigm('oop').info();
|
|
19369
|
+
*/
|
|
19370
|
+
paradigm(value) {
|
|
19371
|
+
const definition = findParadigm(value);
|
|
19372
|
+
const targets = definition?.targets ?? [value];
|
|
19373
|
+
return {
|
|
19374
|
+
info() {
|
|
19375
|
+
return definition ? paradigmInfoFromDefinition(definition) : void 0;
|
|
19376
|
+
},
|
|
19377
|
+
langs() {
|
|
19378
|
+
const filtered = () => languages.filter((lang) => matchesParadigm(lang, targets));
|
|
19379
|
+
return createLanguageCollectionRequest(filtered, async () => {
|
|
19380
|
+
const loaded = await Promise.all(filtered().map((lang) => loadLanguage(lang.slug)));
|
|
19381
|
+
return loaded.filter((lang) => Boolean(lang));
|
|
19382
|
+
});
|
|
19383
|
+
}
|
|
19384
|
+
};
|
|
19385
|
+
},
|
|
19386
|
+
/**
|
|
19387
|
+
* Selects every language that belongs to the given ecosystem.
|
|
19388
|
+
*
|
|
19389
|
+
* Accepts common aliases: 'web', 'jvm', 'dotnet', 'devops', 'data-science', 'embedded', etc.
|
|
19390
|
+
* Searches `tooling.ecosystems`.
|
|
19391
|
+
*
|
|
19392
|
+
* @example
|
|
19393
|
+
* api.ecosystem('jvm').langs().locale('es').get();
|
|
19394
|
+
* api.ecosystem('blockchain').info();
|
|
19395
|
+
*/
|
|
19396
|
+
ecosystem(value) {
|
|
19397
|
+
const definition = findEcosystem(value);
|
|
19398
|
+
const targets = definition?.targets ?? [value];
|
|
19399
|
+
return {
|
|
19400
|
+
info() {
|
|
19401
|
+
return definition ? ecosystemInfoFromDefinition(definition) : void 0;
|
|
19402
|
+
},
|
|
19403
|
+
langs() {
|
|
19404
|
+
const filtered = () => languages.filter((lang) => matchesEcosystem(lang, targets));
|
|
19405
|
+
return createLanguageCollectionRequest(filtered, async () => {
|
|
19406
|
+
const loaded = await Promise.all(filtered().map((lang) => loadLanguage(lang.slug)));
|
|
19407
|
+
return loaded.filter((lang) => Boolean(lang));
|
|
19408
|
+
});
|
|
19409
|
+
}
|
|
19410
|
+
};
|
|
19411
|
+
},
|
|
18955
19412
|
/**
|
|
18956
19413
|
* Detects every matching language for a filename or path.
|
|
18957
19414
|
*
|
|
@@ -19255,7 +19712,9 @@ exports.detectLanguageSlugs = detectLanguageSlugs;
|
|
|
19255
19712
|
exports.detectLanguages = detectLanguages;
|
|
19256
19713
|
exports.detectProjectLanguages = detectProjectLanguages;
|
|
19257
19714
|
exports.getCategories = getCategories;
|
|
19715
|
+
exports.getEcosystems = getEcosystems;
|
|
19258
19716
|
exports.getPackageManagers = getPackageManagers;
|
|
19717
|
+
exports.getParadigms = getParadigms;
|
|
19259
19718
|
exports.getRuntimes = getRuntimes;
|
|
19260
19719
|
exports.languages = languages;
|
|
19261
19720
|
exports.localizeLanguage = localizeLanguage;
|