@vltpkg/security-archive 1.1.0 → 1.2.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/dist/index.d.ts +0 -1
- package/dist/index.js +2 -4
- package/dist/update-expired.d.ts +0 -1
- package/dist/update-expired.js +2 -3
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import { mkdirSync } from 'node:fs';
|
|
|
5
5
|
import { dirname } from 'node:path';
|
|
6
6
|
import { LRUCache } from 'lru-cache';
|
|
7
7
|
import pRetry, { AbortError } from 'p-retry';
|
|
8
|
-
import { loadPackageJson } from 'package-json-from-dist';
|
|
9
8
|
import { asDepID, baseDepID } from '@vltpkg/dep-id';
|
|
10
9
|
import { error } from '@vltpkg/error-cause';
|
|
10
|
+
import { userAgent } from '@vltpkg/user-agent';
|
|
11
11
|
import { XDG } from '@vltpkg/xdg';
|
|
12
12
|
import { asPackageReportData } from "./types.js";
|
|
13
13
|
import { __CODE_SPLIT_SCRIPT_NAME } from "./update-expired.js";
|
|
@@ -16,8 +16,6 @@ export * from "./types.js";
|
|
|
16
16
|
export { npmRegistryURL, usesNpmRegistry } from "./browser.js";
|
|
17
17
|
const SOCKET_API_V0_URL = 'https://api.socket.dev/v0/purl?alerts=true';
|
|
18
18
|
const SOCKET_PUBLIC_API_TOKEN = 'sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api';
|
|
19
|
-
// Loads the version number to be used in the User-Agent header
|
|
20
|
-
export const { version } = loadPackageJson(import.meta.filename, process.env.__VLT_INTERNAL_CLI_PACKAGE_JSON);
|
|
21
19
|
/**
|
|
22
20
|
* A database of security information for given packages from a list of nodes.
|
|
23
21
|
*
|
|
@@ -243,7 +241,7 @@ export class SecurityArchive extends LRUCache {
|
|
|
243
241
|
method: 'POST',
|
|
244
242
|
headers: {
|
|
245
243
|
Authorization: `Basic ${Buffer.from(`${SOCKET_PUBLIC_API_TOKEN}:`).toString('base64url')}`,
|
|
246
|
-
'User-Agent':
|
|
244
|
+
'User-Agent': userAgent,
|
|
247
245
|
},
|
|
248
246
|
body: JSON.stringify({
|
|
249
247
|
components: Array.from(queue),
|
package/dist/update-expired.d.ts
CHANGED
package/dist/update-expired.js
CHANGED
|
@@ -5,12 +5,11 @@ import { pathToFileURL } from 'node:url';
|
|
|
5
5
|
import pRetry, { AbortError } from 'p-retry';
|
|
6
6
|
import { asDepID, baseDepID } from '@vltpkg/dep-id';
|
|
7
7
|
import { error } from '@vltpkg/error-cause';
|
|
8
|
-
import {
|
|
8
|
+
import { userAgent } from '@vltpkg/user-agent';
|
|
9
9
|
import { asPackageReportData } from "./types.js";
|
|
10
10
|
export const __CODE_SPLIT_SCRIPT_NAME = import.meta.filename;
|
|
11
11
|
const SOCKET_API_V0_URL = 'https://api.socket.dev/v0/purl?alerts=true';
|
|
12
12
|
const SOCKET_PUBLIC_API_TOKEN = 'sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api';
|
|
13
|
-
export const { version } = loadPackageJson(import.meta.filename, process.env.__VLT_INTERNAL_CLI_PACKAGE_JSON);
|
|
14
13
|
/* c8 ignore start */
|
|
15
14
|
const isMain = (path) => path === __CODE_SPLIT_SCRIPT_NAME ||
|
|
16
15
|
path === pathToFileURL(__CODE_SPLIT_SCRIPT_NAME).toString();
|
|
@@ -24,7 +23,7 @@ const retrieveRemoteData = async (queue, retries) => {
|
|
|
24
23
|
method: 'POST',
|
|
25
24
|
headers: {
|
|
26
25
|
Authorization: `Basic ${Buffer.from(`${SOCKET_PUBLIC_API_TOKEN}:`).toString('base64url')}`,
|
|
27
|
-
'User-Agent':
|
|
26
|
+
'User-Agent': userAgent,
|
|
28
27
|
},
|
|
29
28
|
body: JSON.stringify({
|
|
30
29
|
components: Array.from(queue),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/security-archive",
|
|
3
3
|
"description": "A database of security information of packages",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,21 +13,21 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/dep-id": "1.
|
|
17
|
-
"@vltpkg/error-cause": "1.
|
|
18
|
-
"@vltpkg/spec": "1.
|
|
19
|
-
"@vltpkg/types": "1.
|
|
20
|
-
"@vltpkg/
|
|
16
|
+
"@vltpkg/dep-id": "1.2.0",
|
|
17
|
+
"@vltpkg/error-cause": "1.2.0",
|
|
18
|
+
"@vltpkg/spec": "1.2.0",
|
|
19
|
+
"@vltpkg/types": "1.2.0",
|
|
20
|
+
"@vltpkg/user-agent": "1.2.0",
|
|
21
|
+
"@vltpkg/xdg": "1.2.0",
|
|
21
22
|
"lru-cache": "^11.2.4",
|
|
22
|
-
"p-retry": "^7.1.1"
|
|
23
|
-
"package-json-from-dist": "^1.0.1"
|
|
23
|
+
"p-retry": "^7.1.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@eslint/js": "^9.39.1",
|
|
27
27
|
"@types/node": "^22.19.2",
|
|
28
28
|
"eslint": "^9.39.1",
|
|
29
29
|
"prettier": "^3.7.4",
|
|
30
|
-
"tap": "^21.
|
|
30
|
+
"tap": "^21.8.0",
|
|
31
31
|
"typedoc": "~0.27.9",
|
|
32
32
|
"typescript": "5.7.3",
|
|
33
33
|
"typescript-eslint": "^8.49.0"
|