device-eol-check 0.0.0-stage → 0.1.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/LICENSE +27 -0
- package/README.md +112 -2
- package/cli.js +163 -0
- package/data.json +17829 -0
- package/index.js +270 -0
- package/package.json +44 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
CC0 1.0 Universal — Public Domain Dedication
|
|
2
|
+
|
|
3
|
+
The person who associated a work with this deed has dedicated the work to the
|
|
4
|
+
public domain by waiving all of his or her rights to the work worldwide under
|
|
5
|
+
copyright law, including all related and neighboring rights, to the extent
|
|
6
|
+
allowed by law.
|
|
7
|
+
|
|
8
|
+
You can copy, modify, distribute and perform the work, even for commercial
|
|
9
|
+
purposes, all without asking permission.
|
|
10
|
+
|
|
11
|
+
Full text: https://creativecommons.org/publicdomain/zero/1.0/legalcode
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
This dedication covers the compilation and the code in this package.
|
|
16
|
+
|
|
17
|
+
The underlying facts are taken from third-party sources, each of which is cited
|
|
18
|
+
by URL in the shipped data alongside the verbatim quote the value was read from:
|
|
19
|
+
|
|
20
|
+
* PyTorch's RELEASE.md and .ci/manywheel/build_cuda.sh — BSD-3-Clause
|
|
21
|
+
(pytorch/pytorch LICENSE)
|
|
22
|
+
* NVIDIA's CUDA Toolkit release notes and CUDA GPUs page — vendor technical
|
|
23
|
+
documentation
|
|
24
|
+
|
|
25
|
+
Facts are not copyrightable. What is reproduced from those sources is a fact
|
|
26
|
+
plus a short attributed quote linking back to it; neither document is
|
|
27
|
+
reproduced.
|
package/README.md
CHANGED
|
@@ -1,3 +1,113 @@
|
|
|
1
|
-
#
|
|
1
|
+
# device-eol-check
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Point it at your device inventory. It tells you which router, access point and
|
|
4
|
+
firewall models are past the vendor's end of firmware support — and for every
|
|
5
|
+
one, it prints the vendor's own sentence and the page that sentence was read
|
|
6
|
+
from, so you can check it rather than believe it.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx device-eol-check inventory.csv
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
FAIL TP-Link Archer A10 1.0 (US): end of firmware support 2022-06-29 (the vendor's page writes "6/29/2022")
|
|
14
|
+
> AC2600 MU-MIMO Wi-Fi Archer A10 1.0 US 12/31/2021 6/29/2022 Router
|
|
15
|
+
https://static.tp-link.com/upload/manual/2026/202606/20260624/US%20EOL_List_Home%20-%20V8.1.pdf
|
|
16
|
+
our record: https://referencesource.org/router-firmware-support-status/archer-a10-1-0/ (last re-checked 2026-11-15)
|
|
17
|
+
named in: inventory.csv
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Exit status is 1 if anything in the file is past end of support or is listed
|
|
21
|
+
end-of-life by its vendor, so it works as a CI step.
|
|
22
|
+
|
|
23
|
+
## Why a file and not a web form
|
|
24
|
+
|
|
25
|
+
There is a web page that answers this one model at a time. A fleet is a file of
|
|
26
|
+
three hundred models, not three hundred form submissions — so this reads the
|
|
27
|
+
file you already have.
|
|
28
|
+
|
|
29
|
+
## Use
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx device-eol-check inventory.csv # one file, any text format
|
|
33
|
+
npx device-eol-check . # every inventory-shaped file in a repo
|
|
34
|
+
npx device-eol-check --model "Archer A10" # ask about one model
|
|
35
|
+
npx device-eol-check inventory.csv --json # machine-readable
|
|
36
|
+
npx device-eol-check inventory.csv --all # print the supported ones too
|
|
37
|
+
npx device-eol-check inventory.csv --today 2027-01-01 # ask about a future date
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
It does not need to be told the format. A NetBox or Nautobot CSV export, an
|
|
41
|
+
Ansible inventory, a JSON dump, a Terraform file, a spreadsheet saved as text
|
|
42
|
+
and a hand-typed list all name the model somewhere, and none of them agree on
|
|
43
|
+
where — so it reads the text and matches the longest model name it knows at each
|
|
44
|
+
position. `.csv`, `.tsv`, `.txt`, `.json`, `.yaml`, `.yml`, `.ini`, `.cfg`,
|
|
45
|
+
`.conf`, `.md`, `.tf`, `.toml`, `.xml` and `.log` files are read; `.git`,
|
|
46
|
+
`node_modules`, `.venv`, `dist` and `build` are skipped.
|
|
47
|
+
|
|
48
|
+
As a library:
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
const { lookup, scanText, scanDir, denominator } = require('device-eol-check');
|
|
52
|
+
|
|
53
|
+
lookup('RT-AC68U'); // what do the records say about one model?
|
|
54
|
+
scanText(fs.readFileSync('inventory.csv', 'utf8'));
|
|
55
|
+
scanDir('.');
|
|
56
|
+
denominator(); // what this package can and cannot answer
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## What it holds, and what it does not
|
|
60
|
+
|
|
61
|
+
1,092 device models, built from two datasets on referencesource.org and rebuilt
|
|
62
|
+
from them whenever the records change:
|
|
63
|
+
|
|
64
|
+
| | models |
|
|
65
|
+
|---|---|
|
|
66
|
+
| TP-Link | 649 |
|
|
67
|
+
| ASUS | 347 |
|
|
68
|
+
| Palo Alto Networks | 42 |
|
|
69
|
+
| SonicWall | 33 |
|
|
70
|
+
| Cisco Meraki | 18 |
|
|
71
|
+
| Linksys | 3 |
|
|
72
|
+
|
|
73
|
+
Of those, **728 state an end-of-support date**, **347 are listed by the vendor
|
|
74
|
+
as end-of-life with no date on the page we read**, and **15 state something this
|
|
75
|
+
build could not read as a date** (eleven TP-Link rows say "Before 2018").
|
|
76
|
+
|
|
77
|
+
Three things it will not do:
|
|
78
|
+
|
|
79
|
+
- **It never invents a date.** Where the vendor states none, the line says the
|
|
80
|
+
vendor lists the model as end-of-life and states no date. That still fails the
|
|
81
|
+
build — an end-of-life listing is the thing worth failing on, dated or not.
|
|
82
|
+
- **An unreadable value is neither a pass nor a failure.** It prints the
|
|
83
|
+
vendor's own characters and says it cannot order them. It does not count as a
|
|
84
|
+
failure and it does not count as supported.
|
|
85
|
+
- **A model it holds no record for is reported as that, never as supported.**
|
|
86
|
+
Absence of a record is absence of a record.
|
|
87
|
+
|
|
88
|
+
### The date ambiguity, and how it is settled
|
|
89
|
+
|
|
90
|
+
TP-Link's own list prints dates as `6/29/2022`. `3/4/2022` cannot be read two
|
|
91
|
+
ways by looking at it, so the build does not assume: it reads the whole column
|
|
92
|
+
and decides the order from the values that can only be read one way. In the
|
|
93
|
+
build this package ships, 481 of 652 values had a second component above 12
|
|
94
|
+
and **not one** had a first component above 12, which is only possible if the
|
|
95
|
+
month comes first. If a future rebuild finds that evidence absent or
|
|
96
|
+
contradictory, every slashed date ships unreadable rather than guessed.
|
|
97
|
+
|
|
98
|
+
Every line prints the ISO date *and* the vendor's characters, so you never have
|
|
99
|
+
to trust this package's reading of them.
|
|
100
|
+
|
|
101
|
+
## Where the facts come from
|
|
102
|
+
|
|
103
|
+
- [TP-Link and ASUS routers and network gear — end-of-life and end-of-support
|
|
104
|
+
dates by model](https://referencesource.org/router-firmware-support-status/)
|
|
105
|
+
- [Firewall and network security appliance hardware end-of-life dates by
|
|
106
|
+
brand](https://referencesource.org/firewall-hardware-end-of-life-dates-by-brand/)
|
|
107
|
+
|
|
108
|
+
Both are re-checked against the vendors' own pages on a schedule, and every
|
|
109
|
+
record carries the source URL and a verbatim quote containing the value. The
|
|
110
|
+
data file names the date it was built and the newest re-check behind it.
|
|
111
|
+
|
|
112
|
+
This package is built and published automatically. CC0-1.0 — the facts are
|
|
113
|
+
nobody's property and neither is this.
|
package/cli.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* device-eol-check — point it at an inventory file (or a directory) and it
|
|
4
|
+
* prints which device models are past the vendor's end of firmware support,
|
|
5
|
+
* with the vendor's own sentence and the page it was read from.
|
|
6
|
+
*
|
|
7
|
+
* npx device-eol-check inventory.csv
|
|
8
|
+
* npx device-eol-check . # every inventory-shaped file in a repo
|
|
9
|
+
* npx device-eol-check --model "Archer A10"
|
|
10
|
+
* npx device-eol-check inventory.csv --json
|
|
11
|
+
*
|
|
12
|
+
* Exit 1 when anything in the file is past end of support or is listed
|
|
13
|
+
* end-of-life; exit 0 otherwise. An unreadable date is never a failure and
|
|
14
|
+
* never a pass: it is printed as unreadable and said out loud in the summary.
|
|
15
|
+
*/
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
const lib = require('./index.js');
|
|
19
|
+
const pkg = require('./package.json');
|
|
20
|
+
|
|
21
|
+
function parseArgs(argv) {
|
|
22
|
+
const o = { paths: [], json: false, today: null, model: null, all: false, help: false };
|
|
23
|
+
for (let i = 0; i < argv.length; i++) {
|
|
24
|
+
const a = argv[i];
|
|
25
|
+
if (a === '--json') o.json = true;
|
|
26
|
+
else if (a === '--all') o.all = true;
|
|
27
|
+
else if (a === '-h' || a === '--help') o.help = true;
|
|
28
|
+
else if (a === '--version' || a === '-v') o.version = true;
|
|
29
|
+
else if (a === '--today') o.today = argv[++i];
|
|
30
|
+
else if (a === '--model') o.model = argv[++i];
|
|
31
|
+
else if (a.startsWith('--today=')) o.today = a.slice(8);
|
|
32
|
+
else if (a.startsWith('--model=')) o.model = a.slice(8);
|
|
33
|
+
else if (a.startsWith('-')) o.unknown = a;
|
|
34
|
+
else o.paths.push(a);
|
|
35
|
+
}
|
|
36
|
+
return o;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const USAGE = `device-eol-check ${pkg.version}
|
|
40
|
+
|
|
41
|
+
device-eol-check <file-or-directory>... read an inventory, report each model
|
|
42
|
+
device-eol-check --model "<model>" ask about one model
|
|
43
|
+
device-eol-check <path> --json machine-readable
|
|
44
|
+
device-eol-check <path> --all print supported models too
|
|
45
|
+
device-eol-check <path> --today YYYY-MM-DD
|
|
46
|
+
|
|
47
|
+
Every line carries the vendor's own sentence and the page it was read from.
|
|
48
|
+
Exit 1 if anything is past end of support or listed end-of-life.`;
|
|
49
|
+
|
|
50
|
+
function line(r) {
|
|
51
|
+
const d = r.worst;
|
|
52
|
+
const where = d.region ? ` (${d.region})` : '';
|
|
53
|
+
const rev = r.match === 'base' && r.revisions > 1
|
|
54
|
+
? ` — ${r.revisions} hardware revisions in our records, worst shown`
|
|
55
|
+
: '';
|
|
56
|
+
if (d.verdict === 'support-ended') {
|
|
57
|
+
return `FAIL ${d.vendor} ${d.model}${where}: end of firmware support ${d.end_of_support}`
|
|
58
|
+
+ ` (the vendor's page writes "${d.end_of_support_as_printed}")${rev}`;
|
|
59
|
+
}
|
|
60
|
+
if (d.verdict === 'supported-until') {
|
|
61
|
+
return `ok ${d.vendor} ${d.model}${where}: supported until ${d.end_of_support}`
|
|
62
|
+
+ ` (the vendor's page writes "${d.end_of_support_as_printed}")${rev}`;
|
|
63
|
+
}
|
|
64
|
+
if (d.verdict === 'end-of-life-no-date') {
|
|
65
|
+
return `FAIL ${d.vendor} ${d.model}${where}: the vendor lists this model as `
|
|
66
|
+
+ `"${d.status}" and states no date on the page we read${rev}`;
|
|
67
|
+
}
|
|
68
|
+
if (d.verdict === 'date-unreadable') {
|
|
69
|
+
return `? ${d.vendor} ${d.model}${where}: the vendor's page writes `
|
|
70
|
+
+ `"${d.end_of_support_as_printed}", which is not a date this package can order${rev}`;
|
|
71
|
+
}
|
|
72
|
+
return `? ${d.vendor} ${d.model}${where}: our record states neither a date nor a status${rev}`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function main(argv) {
|
|
76
|
+
const o = parseArgs(argv);
|
|
77
|
+
if (o.help || (!o.paths.length && !o.model)) {
|
|
78
|
+
console.log(USAGE);
|
|
79
|
+
return o.help ? 0 : 1;
|
|
80
|
+
}
|
|
81
|
+
if (o.version) {
|
|
82
|
+
console.log(pkg.version);
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
if (o.unknown) {
|
|
86
|
+
console.error(`device-eol-check: unknown option ${o.unknown}\n`);
|
|
87
|
+
console.error(USAGE);
|
|
88
|
+
return 2;
|
|
89
|
+
}
|
|
90
|
+
const today = o.today || new Date().toISOString().slice(0, 10);
|
|
91
|
+
|
|
92
|
+
let hits = [];
|
|
93
|
+
let asked = null;
|
|
94
|
+
if (o.model) {
|
|
95
|
+
asked = o.model;
|
|
96
|
+
const r = lib.lookup(o.model, { today });
|
|
97
|
+
if (r) hits.push(r);
|
|
98
|
+
}
|
|
99
|
+
for (const p of o.paths) {
|
|
100
|
+
try {
|
|
101
|
+
hits = hits.concat(lib.scanDir(p, { today }));
|
|
102
|
+
} catch (e) {
|
|
103
|
+
console.error(`device-eol-check: cannot read ${p}: ${e.message}`);
|
|
104
|
+
return 2;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const failed = hits.filter((h) => h.failed);
|
|
109
|
+
const unreadable = hits.filter((h) => !h.failed && h.unreadable);
|
|
110
|
+
const den = lib.denominator();
|
|
111
|
+
|
|
112
|
+
if (o.json) {
|
|
113
|
+
console.log(JSON.stringify({
|
|
114
|
+
today,
|
|
115
|
+
found: hits.length,
|
|
116
|
+
failed: failed.length,
|
|
117
|
+
unreadable: unreadable.length,
|
|
118
|
+
results: hits,
|
|
119
|
+
records: den,
|
|
120
|
+
}, null, 1));
|
|
121
|
+
return failed.length ? 1 : 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (!hits.length) {
|
|
125
|
+
if (asked) {
|
|
126
|
+
console.log(`device-eol-check: our records do not hold "${asked}". `
|
|
127
|
+
+ `They hold ${den.devices} models from ${Object.keys(den.vendors).join(', ')}. `
|
|
128
|
+
+ `That is not a statement that the model is supported.`);
|
|
129
|
+
} else {
|
|
130
|
+
console.log(`device-eol-check: no model we hold a record for was named in what you gave me. `
|
|
131
|
+
+ `Our ${den.devices} models are ${Object.keys(den.vendors).join(', ')} gear `
|
|
132
|
+
+ `(${den.assets['router-firmware-support-status'].page}).`);
|
|
133
|
+
}
|
|
134
|
+
return 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const show = o.all ? hits : hits.filter((h) => h.failed || h.unreadable);
|
|
138
|
+
for (const h of show) {
|
|
139
|
+
console.log(line(h));
|
|
140
|
+
const d = h.worst;
|
|
141
|
+
console.log(` > ${d.source_quote}`);
|
|
142
|
+
console.log(` ${d.source}`);
|
|
143
|
+
console.log(` our record: ${d.page} (last re-checked ${d.rechecked})`);
|
|
144
|
+
if (h.file) console.log(` named in: ${h.file}`);
|
|
145
|
+
console.log('');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
console.log(`${hits.length} model(s) we hold a record for were named; `
|
|
149
|
+
+ `${failed.length} past end of support or listed end-of-life, `
|
|
150
|
+
+ `${unreadable.length} with a date this package could not read.`);
|
|
151
|
+
console.log(`Read against ${den.devices} device records built ${den.built} `
|
|
152
|
+
+ `(${den.with_a_date} state a date, ${den.end_of_life_with_no_date_stated} are listed `
|
|
153
|
+
+ `end-of-life with no date stated, ${den.date_stated_but_unreadable} state something `
|
|
154
|
+
+ `this build could not order). A model we hold no record for is reported as that, `
|
|
155
|
+
+ `never as supported.`);
|
|
156
|
+
return failed.length ? 1 : 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (require.main === module) {
|
|
160
|
+
process.exit(main(process.argv.slice(2)));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
module.exports = { main, parseArgs, line };
|