Compare commits

..

1 commit

Author SHA1 Message Date
github-actions[bot]
5c7bf673ee Update KiCad symbols and footprints lists [no ci] 2026-07-20 05:47:16 +00:00
16 changed files with 20 additions and 197 deletions

1
.env
View file

@ -8,7 +8,6 @@ APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
# Change this and uncomment the following line to set the trusted hosts for your Part-DB installation, aka under which
# domain names it is reachable. This is makes things more secure, because it can prevent certain header attacks.
# You have to escape dots in the domain name with a backslash
# IMPORTANT: In .env files (like this one), the value must be wrapped in single quotes as shown below.
#TRUSTED_HOSTS='^(your-domain\.invalid)$'
# You can also allow multiple domain names, e.g. for testing or development purposes, with an | between the domain names.

View file

@ -65,7 +65,7 @@ jobs:
${{ runner.os }}-yarn-
- name: Setup node
uses: actions/setup-node@v7
uses: actions/setup-node@v6
with:
node-version: '22'

View file

@ -104,7 +104,7 @@ jobs:
run: composer install --prefer-dist --no-progress
- name: Setup node
uses: actions/setup-node@v7
uses: actions/setup-node@v6
with:
node-version: '22'

View file

@ -1 +1 @@
2.13.4
2.13.3

View file

@ -265,16 +265,10 @@ See the [information providers]({% link usage/information_provider_system.md %})
should be accessible. If accessed via a hostname not matching the regex, an error page will be shown instead. By default this
is empty, meaning Part-DB accepts requests for any host name, which is not recommended for production use.
For example, if Part-DB should only be reachable under `part-db.example.invalid`, set the following in your
`.env.local` file (the value must be wrapped in single quotes here):
For example, if Part-DB should only be reachable under `part-db.example.invalid`, set:
```
TRUSTED_HOSTS='^(part-db\.example\.invalid)$'
```
If you set `TRUSTED_HOSTS` as an environment variable in your `docker-compose.yaml` instead, the value must
**not** be quoted:
```
TRUSTED_HOSTS=^(part-db\.example\.invalid)$
```
You can specify multiple host names separated by `|`, e.g. `^(localhost|part-db\.example\.invalid)$`.
Part-DB displays a warning on the homepage (visible to administrators only) as long as this value is not set.
* `DEMO_MODE` (env only): Set Part-DB into demo mode, which forbids users to change their passwords and settings. Used for the demo

View file

@ -87,7 +87,6 @@ services:
# To prevent HTTP Host header attacks, set this to a regex matching all host names Part-DB should be reachable under.
# By default (unset) Part-DB accepts requests for any host name, which is not recommended for production use.
# IMPORTANT: Unlike in .env files, the value here must NOT be wrapped in quotes.
# - TRUSTED_HOSTS=^(part-db\.example\.invalid)$
# If you need to install additional composer packages (e.g., for specific mailer transports), you can specify them here:
@ -102,8 +101,7 @@ services:
openssl rand -hex 32
```
6. Uncomment and set the `TRUSTED_HOSTS` variable to a regex matching the host name(s) Part-DB should be reachable under
(e.g. `^(part-db\.example\.invalid)$`), to prevent HTTP Host header attacks. Note that, unlike in `.env` files, the
value must **not** be quoted in `docker-compose.yaml`. See [Configuration]({% link configuration.md %})
(e.g. `^(part-db\.example\.invalid)$`), to prevent HTTP Host header attacks. See [Configuration]({% link configuration.md %})
for more information.
7. Inside the folder, run
@ -183,7 +181,6 @@ services:
# To prevent HTTP Host header attacks, set this to a regex matching all host names Part-DB should be reachable under.
# By default (unset) Part-DB accepts requests for any host name, which is not recommended for production use.
# IMPORTANT: Unlike in .env files, the value here must NOT be wrapped in quotes.
# - TRUSTED_HOSTS=^(part-db\.example\.invalid)$
# If you need to install additional composer packages (e.g., for specific mailer transports), you can specify them here:

View file

@ -24,18 +24,12 @@ the reverse proxy).
You should also set the `TRUSTED_HOSTS` environment variable to a regex matching the host name(s) Part-DB is reachable
under via the reverse proxy, to prevent `HTTP Host header attacks`. For example, if Part-DB is reachable via
`part-db.example.invalid`, set the following in your `.env.local` file (the value must be wrapped in single quotes here):
`part-db.example.invalid`, set:
```
TRUSTED_HOSTS='^(part-db\.example\.invalid)$'
```
If you set `TRUSTED_HOSTS` in your `docker-compose.yaml` instead, the value must **not** be quoted:
```
TRUSTED_HOSTS=^(part-db\.example\.invalid)$
```
See the [configuration options](../configuration.md) page for more information about `TRUSTED_HOSTS`.
## Part-DB in a subpath via reverse proxy

View file

@ -109,21 +109,6 @@ supplier is not specified, the price and supplier product number fields will be
* **`supplier_product_number`** or **`supplier_part_number`** or * **`spn`**: The supplier product number of the part.
* **`price`**: The price of the part in the base currency of the database (by default euro).
The following fields set the EDA / KiCad metadata of the part (see [EDA / KiCad integration](eda_integration.md)).
These can be given either as the flat column names below, or in the nested `eda_info.*` form used by the
CSV/JSON export and the [example file](#example-data) (e.g. `eda_info.kicad_symbol`), so a file exported from
Part-DB can be re-imported without renaming its headers:
* **`eda_kicad_symbol`** or **`kicad_symbol`**: The KiCad symbol of the part, e.g. `Device:R`.
* **`eda_kicad_footprint`** or **`kicad_footprint`**: The KiCad footprint, e.g. `Resistor_SMD:R_0805_2012Metric`.
* **`eda_reference_prefix`** or **`kicad_reference`**: The schematic reference prefix, e.g. `R`, `C`, `L`.
* **`eda_value`** or **`kicad_value`**: The value shown in the EDA tool, e.g. `10k`.
* **`eda_exclude_from_bom`** (or **`eda_exclude_bom`**), **`eda_exclude_from_board`** (or **`eda_exclude_board`**),
**`eda_exclude_from_sim`** (or **`eda_exclude_sim`**): Booleans (`1`/`0`) to exclude the part from the BOM, board
or simulation.
* **`eda_visibility`**: Boolean (`1`/`0`) controlling whether the part is exposed to the EDA tool. The inverse
convenience alias **`eda_invisible`** is also accepted (so `eda_invisible=1` hides the part).
#### Example data
Here you can find some example data for the import of parts, you can use it as a template for your own import (

View file

@ -1,4 +1,4 @@
# Generated on Mon Jul 27 05:55:56 UTC 2026
# Generated on Mon Jul 20 05:45:44 UTC 2026
# This file contains all footprints available in the offical KiCAD library
Audio_Module:Reverb_BTDR-1H
Audio_Module:Reverb_BTDR-1V

View file

@ -1,4 +1,4 @@
# Generated on Mon Jul 27 05:56:38 UTC 2026
# Generated on Mon Jul 20 05:46:23 UTC 2026
# This file contains all symbols available in the offical KiCAD library
4xxx:14528
4xxx:14529
@ -5358,18 +5358,6 @@ Converter_DCDC_Isolated:THN10-7215UIR
Converter_DCDC_Isolated:THN10-7221UIR
Converter_DCDC_Isolated:THN10-7222UIR
Converter_DCDC_Isolated:THN10-7223UIR
Converter_DCDC_Isolated:THN15-3611UIR
Converter_DCDC_Isolated:THN15-3612UIR
Converter_DCDC_Isolated:THN15-3613UIR
Converter_DCDC_Isolated:THN15-3615UIR
Converter_DCDC_Isolated:THN15-3622UIR
Converter_DCDC_Isolated:THN15-3623UIR
Converter_DCDC_Isolated:THN15-7211UIR
Converter_DCDC_Isolated:THN15-7212UIR
Converter_DCDC_Isolated:THN15-7213UIR
Converter_DCDC_Isolated:THN15-7215UIR
Converter_DCDC_Isolated:THN15-7222UIR
Converter_DCDC_Isolated:THN15-7223UIR
Converter_DCDC_Isolated:THR40-7211WI
Converter_DCDC_Isolated:THR40-7212WI
Converter_DCDC_Isolated:THR40-7213WI
@ -5508,24 +5496,6 @@ Converter_DCDC_Isolated:TMR4-4813WI
Converter_DCDC_Isolated:TMR4-4815WI
Converter_DCDC_Isolated:TMR4-4822WI
Converter_DCDC_Isolated:TMR4-4823WI
Converter_DCDC_Isolated:TMR8-1211WI
Converter_DCDC_Isolated:TMR8-1212WI
Converter_DCDC_Isolated:TMR8-1213WI
Converter_DCDC_Isolated:TMR8-1215WI
Converter_DCDC_Isolated:TMR8-1222WI
Converter_DCDC_Isolated:TMR8-1223WI
Converter_DCDC_Isolated:TMR8-2411WI
Converter_DCDC_Isolated:TMR8-2412WI
Converter_DCDC_Isolated:TMR8-2413WI
Converter_DCDC_Isolated:TMR8-2415WI
Converter_DCDC_Isolated:TMR8-2422WI
Converter_DCDC_Isolated:TMR8-2423WI
Converter_DCDC_Isolated:TMR8-4811WI
Converter_DCDC_Isolated:TMR8-4812WI
Converter_DCDC_Isolated:TMR8-4813WI
Converter_DCDC_Isolated:TMR8-4815WI
Converter_DCDC_Isolated:TMR8-4822WI
Converter_DCDC_Isolated:TMR8-4823WI
Converter_DCDC_Isolated:TMR_1-0511
Converter_DCDC_Isolated:TMR_1-0511SM
Converter_DCDC_Isolated:TMR_1-0512
@ -9696,9 +9666,7 @@ Logic_Programmable:PAL20L10xxNS
Logic_Programmable:PAL20L8
Logic_Programmable:PAL20R8xx-P
Logic_Programmable:PAL20RS10
Logic_Programmable:PAL22V10-xxP
Logic_Programmable:PALCE16V8
Logic_Programmable:PALCE22V10x-xxP
Logic_Programmable:PEEL22CV10AP
Logic_Programmable:PEEL22CV10AS
MCU_AnalogDevices:ADUC816BSZ

View file

@ -63,9 +63,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm
'eda_exclude_bom' => 'eda_exclude_from_bom',
'eda_exclude_board' => 'eda_exclude_from_board',
'eda_exclude_sim' => 'eda_exclude_from_sim',
//NOTE: "eda_invisible" is intentionally NOT mapped here: it is the *inverse* of
//"eda_visibility", so a plain key rename would store the wrong value. It is handled
//(and inverted) explicitly in applyEdaFields().
'eda_invisible' => 'eda_visibility',
];
public function __construct(
@ -237,9 +235,6 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm
}
if (isset($data['eda_visibility']) && $data['eda_visibility'] !== '') {
$edaInfo->setVisibility(filter_var($data['eda_visibility'], FILTER_VALIDATE_BOOLEAN));
} elseif (isset($data['eda_invisible']) && $data['eda_invisible'] !== '') {
//"eda_invisible" is the inverse convenience alias of "eda_visibility"
$edaInfo->setVisibility(!filter_var($data['eda_invisible'], FILTER_VALIDATE_BOOLEAN));
}
}

View file

@ -23,16 +23,12 @@
<p>Try following things:</p>
<ul>
<li>Ensure that you are using the correct URL to access Part-DB.</li>
<li>Set the <code>TRUSTED_HOSTS</code> environment variable to a regular expression matching all host names Part-DB should be reachable under. Note that the required quoting differs depending on where you set it:
<ul>
{% if seen_host %}
<li>In your <code>.env.local</code> file, the value must be wrapped in single quotes: <code>TRUSTED_HOSTS='^({{ seen_host|replace({'.': '\\.'}) }})$'</code> (if <code>{{ seen_host }}</code> is a host name you trust)</li>
<li>In <code>docker-compose.yaml</code>, the value must NOT be quoted: <code>TRUSTED_HOSTS=^({{ seen_host|replace({'.': '\\.'}) }})$</code> (if <code>{{ seen_host }}</code> is a host name you trust)</li>
{% else %}
<li>In your <code>.env.local</code> file, the value must be wrapped in single quotes: <code>TRUSTED_HOSTS='^(localhost|example\.com)$'</code></li>
<li>In <code>docker-compose.yaml</code>, the value must NOT be quoted: <code>TRUSTED_HOSTS=^(localhost|example\.com)$</code></li>
{% endif %}
</ul>
<li>Set the <code>TRUSTED_HOSTS</code> environment variable in your <code>.env.local</code> file (or your docker-compose environment) to a regular expression matching all host names Part-DB should be reachable under, e.g.
{% if seen_host %}
<code>TRUSTED_HOSTS='^({{ seen_host|replace({'.': '\\.'}) }})$'</code> (if <code>{{ seen_host }}</code> is a host name you trust)
{% else %}
<code>TRUSTED_HOSTS='^(localhost|example\.com)$'</code>
{% endif %}
</li>
<li>If Part-DB is running behind a reverse proxy, also make sure that <code>TRUSTED_PROXIES</code> is configured correctly, so the original host name is forwarded properly.</li>
<li>Run <kbd>php bin/console cache:clear</kbd> after changing the configuration.</li>

View file

@ -98,12 +98,9 @@
{% if trusted_hosts_unconfigured and is_granted('@system.server_infos') %}
<div class="alert alert-warning" role="alert">
<h5><i class="fa-solid fa-triangle-exclamation fa-fw"></i> {% trans %}system.trusted_hosts.unconfigured.title{% endtrans %}</h5>
<p class="mb-1">{% trans %}system.trusted_hosts.unconfigured.message{% endtrans %}
{% trans %}system.trusted_hosts.unconfigured.suggestion{% endtrans %}</p>
<p class="mb-0">{% trans %}system.trusted_hosts.unconfigured.env_example{% endtrans %}
<code>TRUSTED_HOSTS='^({{ app.request.host|replace({'.': '\\.'}) }})$'</code></p>
<p class="mb-0">{% trans %}system.trusted_hosts.unconfigured.docker_example{% endtrans %}
<code>TRUSTED_HOSTS=^({{ app.request.host|replace({'.': '\\.'}) }})$</code></p>
<p class="mb-1">{% trans %}system.trusted_hosts.unconfigured.message{% endtrans %}</p>
<p class="mb-0">{% trans %}system.trusted_hosts.unconfigured.suggestion{% endtrans %}
<br><code>TRUSTED_HOSTS='^({{ app.request.host|replace({'.': '\\.'}) }})$'</code></p>
<small>{% trans %}update_manager.new_version_available.only_administrators_can_see{% endtrans %}</small>
</div>
{% endif %}

View file

@ -350,84 +350,6 @@ EOT;
$this->assertSame('test,test2', $results[0]->getTags());
}
public function testImportAcceptsNestedEdaInfoColumns(): void
{
//The API / JSON export writes EDA columns as "eda_info.kicad_symbol"; re-importing such a
//file must fill the EDA fields (previously these columns were silently dropped).
$input = "name;eda_info.kicad_symbol;eda_info.kicad_footprint;eda_info.reference_prefix;eda_info.value\n"
."Nested EDA part;Device:L;Inductor_THT:L_Axial_0307;L;100uH";
$category = new Category();
$category->setName('Test EDA category');
$errors = [];
$results = $this->service->importString($input, [
'class' => Part::class,
'format' => 'csv',
'csv_delimiter' => ';',
'create_unknown_datastructures' => true,
'part_category' => $category,
], $errors);
$this->assertCount(1, $results);
$this->assertEmpty($errors);
$eda = $results[0]->getEdaInfo();
$this->assertSame('Device:L', $eda->getKicadSymbol());
$this->assertSame('Inductor_THT:L_Axial_0307', $eda->getKicadFootprint());
$this->assertSame('L', $eda->getReferencePrefix());
$this->assertSame('100uH', $eda->getValue());
}
public function testImportAcceptsFlatEdaColumns(): void
{
//The documented flat form (and its short aliases) must keep working.
$input = "name;eda_kicad_symbol;kicad_footprint;kicad_reference\n"
."Flat EDA part;Device:R;Resistor_SMD:R_0805_2012Metric;R";
$category = new Category();
$category->setName('Test EDA category');
$errors = [];
$results = $this->service->importString($input, [
'class' => Part::class,
'format' => 'csv',
'csv_delimiter' => ';',
'create_unknown_datastructures' => true,
'part_category' => $category,
], $errors);
$this->assertCount(1, $results);
$this->assertEmpty($errors);
$eda = $results[0]->getEdaInfo();
$this->assertSame('Device:R', $eda->getKicadSymbol());
$this->assertSame('Resistor_SMD:R_0805_2012Metric', $eda->getKicadFootprint());
$this->assertSame('R', $eda->getReferencePrefix());
}
public function testImportInvisibleAliasInvertsVisibility(): void
{
//"eda_invisible" is the inverse convenience alias of "eda_visibility": eda_invisible=1
//must make the part NOT visible to the EDA tool (visibility=false), not visible.
$input = "name;eda_invisible\n"
."Hidden EDA part;1";
$category = new Category();
$category->setName('Test EDA category');
$errors = [];
$results = $this->service->importString($input, [
'class' => Part::class,
'format' => 'csv',
'csv_delimiter' => ';',
'create_unknown_datastructures' => true,
'part_category' => $category,
], $errors);
$this->assertCount(1, $results);
$this->assertEmpty($errors);
$this->assertFalse($results[0]->getEdaInfo()->getVisibility());
}
public function testImportExcelFileProjects(): void
{
$spreadsheet = new Spreadsheet();

View file

@ -13710,19 +13710,7 @@ Buerklin-API-Authentication-Server:
<unit id="qZ_kgWT" name="system.trusted_hosts.unconfigured.suggestion">
<segment state="translated">
<source>system.trusted_hosts.unconfigured.suggestion</source>
<target>Legen Sie einen regulären Ausdruck fest, der alle Hostnamen abdeckt, unter denen Part-DB erreichbar sein soll, z. B. basierend auf dem Hostnamen, den Sie für den Zugriff auf diese Seite verwendet haben. Beachten Sie, dass die erforderliche Anführungszeichen-Schreibweise davon abhängt, wo Sie den Wert setzen:</target>
</segment>
</unit>
<unit id="ie4thSr" name="system.trusted_hosts.unconfigured.env_example">
<segment state="translated">
<source>system.trusted_hosts.unconfigured.env_example</source>
<target>In Ihrer Datei &lt;code&gt;.env.local&lt;/code&gt; muss der Wert in einfache Anführungszeichen eingeschlossen werden:</target>
</segment>
</unit>
<unit id="ni3hSTN" name="system.trusted_hosts.unconfigured.docker_example">
<segment state="translated">
<source>system.trusted_hosts.unconfigured.docker_example</source>
<target>In &lt;code&gt;docker-compose.yaml&lt;/code&gt; darf der Wert NICHT in Anführungszeichen stehen:</target>
<target>Legen Sie einen regulären Ausdruck fest, der alle Hostnamen abdeckt, unter denen Part-DB erreichbar sein soll, z. B. basierend auf dem Hostnamen, den Sie für den Zugriff auf diese Seite verwendet haben. Dies ist möglich in Ihrer Datei &lt;code&gt;.env.local&lt;/code&gt; oder &lt;code&gt;docker-compose.yaml&lt;/code&gt;:</target>
</segment>
</unit>
<unit id="cEwxoSj" name="info_providers.provider_key">

View file

@ -13712,19 +13712,7 @@ Buerklin-API Authentication server:
<unit id="qZ_kgWT" name="system.trusted_hosts.unconfigured.suggestion">
<segment state="translated">
<source>system.trusted_hosts.unconfigured.suggestion</source>
<target>Set it to a regular expression matching all host names Part-DB should be reachable under, e.g. based on the host name you used to access this page. Note that the required quoting differs depending on where you set it:</target>
</segment>
</unit>
<unit id="ie4thSr" name="system.trusted_hosts.unconfigured.env_example">
<segment state="translated">
<source>system.trusted_hosts.unconfigured.env_example</source>
<target>In your &lt;code&gt;.env.local&lt;/code&gt; file, the value must be wrapped in single quotes:</target>
</segment>
</unit>
<unit id="ni3hSTN" name="system.trusted_hosts.unconfigured.docker_example">
<segment state="translated">
<source>system.trusted_hosts.unconfigured.docker_example</source>
<target>In &lt;code&gt;docker-compose.yaml&lt;/code&gt;, the value must NOT be quoted:</target>
<target>Set it to a regular expression matching all host names Part-DB should be reachable under in your &lt;code&gt;.env.local&lt;/code&gt; or &lt;code&gt;docker-compose.yaml&lt;/code&gt; file, e.g. based on the host name you used to access this page:</target>
</segment>
</unit>
<unit id="cEwxoSj" name="info_providers.provider_key">