Skip to content

Commit 746eedf

Browse files
authored
Merge pull request #8 from JoeShade/Development
Release Easy ECAD Downloader v1.0.0
2 parents 21b29fe + 41e92d2 commit 746eedf

83 files changed

Lines changed: 15551 additions & 3136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
validate:
9+
name: Validate on Node ${{ matrix.node-version }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
node-version:
15+
- 20.19.0
16+
- 22.13.0
17+
- 24.x
18+
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Run validation
35+
run: npm run validate

.gitignore

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
1-
easyEdaDownloader.crx
2-
easyEdaDownloader.zip
1+
easyECADDownloader.crx
2+
easyECADDownloader.zip
33
node_modules/
44
coverage/
5+
docs/easy-ecad-downloader-architecture.drawio
6+
docs/professional-grade-review.md
7+
*.psd
8+
9+
# Local secrets and environment files
10+
.env
11+
.env.*
12+
*.pem
13+
*.key
14+
*.p12
15+
*.pfx
16+
17+
# Temporary, editor, and log artifacts
18+
*.log
19+
*.tmp
20+
*.temp
21+
*.bak
22+
*.backup
23+
*.old
24+
*.orig
25+
*.rej
26+
*.swp
27+
*.swo
28+
*~
29+
.DS_Store
30+
Thumbs.db
31+
desktop.ini

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.13.0

AGENTS.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
## Repository at a glance
44

5-
This repository is a compact browser extension that detects LCSC part numbers on supported product pages and exports EasyEDA-backed CAD assets in KiCad-friendly formats.
5+
This repository is a compact browser extension that detects supported distributor part contexts and exports CAD assets in KiCad-friendly formats.
66

7-
- `src/content_script.js`: page detection and LCSC id extraction
7+
- `src/content_script.js`: page detection for EasyEDA/LCSC and SamacSys-backed Mouser/Farnell contexts
88
- `src/popup.js`: popup UI state, settings interaction, preview requests, and export requests
9-
- `src/service_worker.js`: orchestration, EasyEDA fetches, preview generation, storage-backed library assembly, and downloads
10-
- `src/kicad_converter.js`: EasyEDA-to-KiCad conversion and OBJ-to-WRL conversion
9+
- `src/service_worker.js`: thin background entrypoint that registers the runtime
10+
- `src/service_worker_runtime.js`: provider routing, runtime gating, response shaping, and worker dependency composition
11+
- `src/core/`: shared worker helpers for settings, downloads, preview data, export artifacts, and storage-backed libraries
12+
- `src/sources/`: EasyEDA and SamacSys source adapters and upstream fetch/archive helpers
13+
- `src/kicad_converter.js` and `src/kicad/`: EasyEDA-to-KiCad conversion and OBJ-to-WRL conversion
1114
- `tests`: regression suite for pure logic, implementation behavior, and repository hygiene
1215

1316
`systemDesign.md` is the design source of truth.
@@ -32,8 +35,9 @@ This repository is a compact browser extension that detects LCSC part numbers on
3235
- Add or update tests with every substantive behavior change.
3336
- Prefer regression tests for bug fixes.
3437
- Use test-only harnesses, mocks, fixtures, and loaders instead of production refactors for testability.
38+
- Run `npm run lint` for JavaScript source or test changes.
3539
- Run targeted tests while iterating.
36-
- Run `npm test` before finalizing.
40+
- Run `npm run validate` before finalizing when Node/npm are available.
3741

3842
## Using `systemDesign.md`
3943

@@ -61,6 +65,7 @@ This repository is a compact browser extension that detects LCSC part numbers on
6165
- Remove obsolete references when files or behaviors change.
6266
- Keep test harnesses and developer support code under `tests/` or other clearly developer-only locations.
6367
- Let the repo-hygiene tests enforce governance files, footer coverage, and documentation discipline.
68+
- Keep CI, linting, audit, and local validation scripts aligned.
6469

6570
## Source footer
6671

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Changelog
2+
3+
Notable changes are recorded here in reverse chronological order.
4+
5+
## Unreleased
6+
7+
This section summarizes the current `Development` branch compared with `main` as reviewed on 2026-05-08.
8+
9+
### Added
10+
11+
- Added Mouser SamacSys support for part detection, preview loading, upstream KiCad ZIP download, and KiCad library or loose-file export.
12+
- Added Farnell SamacSys support through the shared SamacSys distributor flow.
13+
- Added Firefox SamacSys relay support for preview and export requests through a user-managed relay URL.
14+
- Added SamacSys authentication settings for relay auth and upstream username/password Basic auth generation.
15+
- Added a configurable Downloads-relative KiCad library folder.
16+
- Added runtime ZIP extraction for SamacSys archives, including KiCad symbols, footprints, STEP models, and WRL files already present in the archive.
17+
- Added `systemDesign.md`, architecture notes, Firefox relay documentation, contribution guidance, and security reporting documentation.
18+
- Added a Node/Vitest regression suite covering content-script detection, popup behavior, service-worker orchestration, EasyEDA conversion, and repository hygiene.
19+
- Added CI, ESLint, dependency audit, `npm run validate`, `.nvmrc`, and `package-lock.json` for repeatable local and GitHub Actions validation.
20+
- Added repository hygiene checks for source footers, governance docs, validation wiring, high-confidence secret patterns, generated archives, local environment files, logs, editor files, and temporary files.
21+
- Added repository hygiene checks for conventional file naming, lower camelCase function declarations, and maintained-file line-count limits.
22+
23+
### Changed
24+
25+
- Renamed the extension to Easy ECAD Downloader, including package metadata, UI labels, documentation links, generated KiCad metadata, and the default library folder name.
26+
- Split the service worker into a thin Manifest V3 entrypoint plus a runtime/router module with source adapters and shared core helpers.
27+
- Split the EasyEDA-to-KiCad converter into focused parser, emitter, shared conversion, and OBJ-to-WRL modules while keeping `src/kicad_converter.js` as the public facade.
28+
- Split the oversized service-worker regression file into focused core, EasyEDA, direct SamacSys, and Firefox SamacSys test files backed by a shared harness.
29+
- Reworked the popup into a provider-aware UI that shows fixed manufacturer metadata plus source-specific part metadata and advanced SamacSys/Firefox settings.
30+
- Moved persistent download layout, Firefox relay, and SamacSys auth settings from the popup into a dedicated extension settings page.
31+
- Grouped Firefox helper controls into a Firefox-only advanced settings menu.
32+
- Added explicit `Save` and `Discard` controls to the settings page.
33+
- Made helper tokens and SamacSys passwords session-only by default, with explicit remember-on-this-device opt-ins and warning copy.
34+
- Removed hidden upstream `Authorization` capture, manual override handling, and automatic Firefox auth-refresh retry behavior.
35+
- Updated the manifest for Chrome service-worker operation and Firefox background-document fallback on Firefox `121+`.
36+
- Updated README and project docs to describe supported providers, setup, settings, auth behavior, browser support, validation, and repository layout.
37+
38+
### Fixed
39+
40+
- Treated WRL-only SamacSys ZIP archives as valid 3D model exports.
41+
- Preserved SamacSys library footprint model references when an archive provides only a WRL model.
42+
- Replaced repeated KiCad footprint template fields so generated vias and text sizes no longer leave raw placeholders.
43+
- Corrected EasyEDA WRL placement by centering OBJ geometry, bottom-aligning Z, and writing KiCad 3D-unit offsets.
44+
- Rendered EasyEDA footprint previews for oval pads and solid-region geometry used by several LCSC footprints.
45+
- Detected JLCPCB manufacturer part numbers when product pages use compact labels such as `MFR.Part #`.
46+
- Improved provider-aware page detection for JLCPCB, LCSC, Mouser, and Farnell product pages.
47+
- Reconciled EasyEDA footprint model references with exported STEP/WRL artifacts and removed stale model blocks when no 3D artifact is exported.
48+
- Preserved SamacSys KiCad library relationships by rewriting symbol footprint properties and footprint model paths in library mode.
49+
- Handled SamacSys ZIP structures where `KiCad/` and `3D/` folders appear either at the archive root or under a part-specific parent folder.
50+
- Reworked SamacSys ZIP `401` handling into clearer sign-in-required errors and retry behavior.
51+
- Kept relay auth separate from upstream SamacSys auth so relay credentials are not forwarded to upstream providers.
52+
- Saved EasyEDA datasheets in the documented library-mode `datasheets/` folder and warned when selected export assets are unavailable.
53+
- Removed real-looking SamacSys auth values from tests and fixtures.
54+
- Removed a stale repository review plan from tracked docs so `systemDesign.md` remains the design source of truth.
55+
56+
### Security
57+
58+
- Documented credential storage, relay responsibility, vulnerability reporting, and stored credential clearing in `SECURITY.md`.
59+
- Added automated checks for common secret/token formats and private-key material in text files.
60+
- Added ignore rules and hygiene checks for local secret files, generated extension archives, logs, editor backups, OS metadata, and temporary files.
61+
- Added full-history security hygiene validation for reachable Git commits.

0 commit comments

Comments
 (0)