@ecosyste-ms/critical 1.3.20261027 → 1.3.20261030
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 -65
- package/critical-packages.db.gz +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@ npm install @ecosyste-ms/critical
|
|
|
13
13
|
The package includes a pre-built `critical-packages.db` file:
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { databasePath } from
|
|
17
|
-
import { DatabaseSync } from
|
|
16
|
+
import { databasePath } from "@ecosyste-ms/critical";
|
|
17
|
+
import { DatabaseSync } from "node:sqlite";
|
|
18
18
|
|
|
19
|
-
const db = new DatabaseSync(databasePath)
|
|
20
|
-
const pkg = db.prepare(
|
|
19
|
+
const db = new DatabaseSync(databasePath);
|
|
20
|
+
const pkg = db.prepare("SELECT * FROM packages WHERE name = ?").get("lodash");
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Written in TypeScript and published with type declarations; the row shapes the build
|
|
@@ -38,7 +38,6 @@ See [ecosyste-ms/mcp](https://github.com/ecosyste-ms/mcp) for a full example.
|
|
|
38
38
|
## Download
|
|
39
39
|
|
|
40
40
|
You can also grab the database directly from the [releases page](../../releases/latest):
|
|
41
|
-
|
|
42
41
|
- `critical-packages.db` - uncompressed SQLite
|
|
43
42
|
- `critical-packages.db.gz` - gzip compressed
|
|
44
43
|
|
|
@@ -47,13 +46,13 @@ You can also grab the database directly from the [releases page](../../releases/
|
|
|
47
46
|
To build the database yourself:
|
|
48
47
|
|
|
49
48
|
```javascript
|
|
50
|
-
import { build, createDatabase } from
|
|
49
|
+
import { build, createDatabase } from "@ecosyste-ms/critical";
|
|
51
50
|
|
|
52
51
|
await build({
|
|
53
|
-
dbPath:
|
|
52
|
+
dbPath: "critical-packages.db",
|
|
54
53
|
fetchVersionsData: true,
|
|
55
|
-
onProgress: console.log
|
|
56
|
-
})
|
|
54
|
+
onProgress: console.log,
|
|
55
|
+
});
|
|
57
56
|
```
|
|
58
57
|
|
|
59
58
|
From the command line:
|
|
@@ -99,71 +98,71 @@ that `node:sqlite` sets.
|
|
|
99
98
|
|
|
100
99
|
### packages
|
|
101
100
|
|
|
102
|
-
| Column
|
|
103
|
-
|
|
104
|
-
| id
|
|
105
|
-
| ecosystem
|
|
106
|
-
| name
|
|
107
|
-
| purl
|
|
108
|
-
| namespace
|
|
109
|
-
| description
|
|
110
|
-
| homepage
|
|
111
|
-
| repository_url
|
|
112
|
-
| licenses
|
|
113
|
-
| normalized_licenses
|
|
114
|
-
| latest_version
|
|
115
|
-
| versions_count
|
|
116
|
-
| downloads
|
|
117
|
-
| downloads_period
|
|
118
|
-
| dependent_packages_count | INTEGER | Number of packages depending on this
|
|
119
|
-
| dependent_repos_count
|
|
120
|
-
| first_release_at
|
|
121
|
-
| latest_release_at
|
|
122
|
-
| last_synced_at
|
|
123
|
-
| keywords
|
|
101
|
+
| Column | Type | Description |
|
|
102
|
+
| ------------------------ | ------- | --------------------------------------------- |
|
|
103
|
+
| id | INTEGER | Primary key from ecosyste.ms |
|
|
104
|
+
| ecosystem | TEXT | Package ecosystem (npm, pypi, rubygems, etc.) |
|
|
105
|
+
| name | TEXT | Package name |
|
|
106
|
+
| purl | TEXT | Package URL (pkg:npm/lodash) |
|
|
107
|
+
| namespace | TEXT | Package namespace if applicable |
|
|
108
|
+
| description | TEXT | Package description |
|
|
109
|
+
| homepage | TEXT | Project homepage URL |
|
|
110
|
+
| repository_url | TEXT | Source repository URL |
|
|
111
|
+
| licenses | TEXT | SPDX license identifier |
|
|
112
|
+
| normalized_licenses | TEXT | JSON array of normalized license identifiers |
|
|
113
|
+
| latest_version | TEXT | Latest release version number |
|
|
114
|
+
| versions_count | INTEGER | Total number of versions |
|
|
115
|
+
| downloads | INTEGER | Download count |
|
|
116
|
+
| downloads_period | TEXT | Period for download count (e.g., last-month) |
|
|
117
|
+
| dependent_packages_count | INTEGER | Number of packages depending on this |
|
|
118
|
+
| dependent_repos_count | INTEGER | Number of repositories depending on this |
|
|
119
|
+
| first_release_at | TEXT | ISO 8601 timestamp of first release |
|
|
120
|
+
| latest_release_at | TEXT | ISO 8601 timestamp of latest release |
|
|
121
|
+
| last_synced_at | TEXT | When ecosyste.ms last synced this package |
|
|
122
|
+
| keywords | TEXT | Space-separated keywords for FTS |
|
|
124
123
|
|
|
125
124
|
Indexes: `(ecosystem, name)` unique, `purl`, `licenses`, `ecosystem`
|
|
126
125
|
|
|
127
126
|
### versions
|
|
128
127
|
|
|
129
|
-
| Column
|
|
130
|
-
|
|
128
|
+
| Column | Type | Description |
|
|
129
|
+
| ---------- | ------- | ----------------------- |
|
|
131
130
|
| package_id | INTEGER | Foreign key to packages |
|
|
132
|
-
| number
|
|
131
|
+
| number | TEXT | Version number |
|
|
133
132
|
|
|
134
133
|
Primary key: `(package_id, number)`
|
|
135
134
|
|
|
136
135
|
### advisories
|
|
137
136
|
|
|
138
|
-
| Column
|
|
139
|
-
|
|
140
|
-
| id
|
|
141
|
-
| package_id
|
|
142
|
-
| uuid
|
|
143
|
-
| url
|
|
144
|
-
| title
|
|
145
|
-
| description
|
|
146
|
-
| severity
|
|
147
|
-
| published_at | TEXT
|
|
148
|
-
| cvss_score
|
|
137
|
+
| Column | Type | Description |
|
|
138
|
+
| ------------ | ------- | ---------------------------------------------- |
|
|
139
|
+
| id | INTEGER | Auto-increment primary key |
|
|
140
|
+
| package_id | INTEGER | Foreign key to packages |
|
|
141
|
+
| uuid | TEXT | Advisory UUID (GHSA-xxxx-xxxx-xxxx) |
|
|
142
|
+
| url | TEXT | Advisory URL |
|
|
143
|
+
| title | TEXT | Advisory title |
|
|
144
|
+
| description | TEXT | Advisory description |
|
|
145
|
+
| severity | TEXT | Severity level (LOW, MODERATE, HIGH, CRITICAL) |
|
|
146
|
+
| published_at | TEXT | ISO 8601 publish timestamp |
|
|
147
|
+
| cvss_score | REAL | CVSS score |
|
|
149
148
|
|
|
150
149
|
Indexes: `package_id`, `uuid`, `severity`, `(package_id, uuid)` unique
|
|
151
150
|
|
|
152
151
|
### repo_metadata
|
|
153
152
|
|
|
154
|
-
| Column
|
|
155
|
-
|
|
156
|
-
| package_id
|
|
157
|
-
| owner
|
|
158
|
-
| repo_name
|
|
159
|
-
| full_name
|
|
160
|
-
| host
|
|
161
|
-
| language
|
|
162
|
-
| stargazers_count
|
|
163
|
-
| forks_count
|
|
164
|
-
| open_issues_count | INTEGER | Open issues
|
|
165
|
-
| archived
|
|
166
|
-
| fork
|
|
153
|
+
| Column | Type | Description |
|
|
154
|
+
| ----------------- | ------- | ------------------------------------ |
|
|
155
|
+
| package_id | INTEGER | Primary key, foreign key to packages |
|
|
156
|
+
| owner | TEXT | Repository owner/organization |
|
|
157
|
+
| repo_name | TEXT | Repository name |
|
|
158
|
+
| full_name | TEXT | Full name (owner/repo) |
|
|
159
|
+
| host | TEXT | Host (github.com, gitlab.com, etc.) |
|
|
160
|
+
| language | TEXT | Primary language |
|
|
161
|
+
| stargazers_count | INTEGER | GitHub stars |
|
|
162
|
+
| forks_count | INTEGER | Fork count |
|
|
163
|
+
| open_issues_count | INTEGER | Open issues |
|
|
164
|
+
| archived | INTEGER | 1 if archived, 0 otherwise |
|
|
165
|
+
| fork | INTEGER | 1 if a fork, 0 otherwise |
|
|
167
166
|
|
|
168
167
|
Indexes: `full_name`, `owner`
|
|
169
168
|
|
|
@@ -173,13 +172,13 @@ FTS5 virtual table for full-text search on `ecosystem`, `name`, `description`, a
|
|
|
173
172
|
|
|
174
173
|
### build_info
|
|
175
174
|
|
|
176
|
-
| Column
|
|
177
|
-
|
|
178
|
-
| id
|
|
179
|
-
| built_at
|
|
180
|
-
| package_count
|
|
181
|
-
| version_count
|
|
182
|
-
| advisory_count | INTEGER | Total advisories
|
|
175
|
+
| Column | Type | Description |
|
|
176
|
+
| -------------- | ------- | ------------------------ |
|
|
177
|
+
| id | INTEGER | Always 1 |
|
|
178
|
+
| built_at | TEXT | ISO 8601 build timestamp |
|
|
179
|
+
| package_count | INTEGER | Total packages |
|
|
180
|
+
| version_count | INTEGER | Total versions |
|
|
181
|
+
| advisory_count | INTEGER | Total advisories |
|
|
183
182
|
|
|
184
183
|
## Example Queries
|
|
185
184
|
|
package/critical-packages.db.gz
CHANGED
|
Binary file
|