@vltpkg/registry-client 1.0.0-rc.9 → 1.0.1

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.
Files changed (91) hide show
  1. package/README.md +14 -1
  2. package/dist/{esm/add-header.d.ts → add-header.d.ts} +0 -1
  3. package/dist/{esm/add-header.js → add-header.js} +0 -1
  4. package/dist/auth.d.ts +44 -0
  5. package/dist/auth.js +118 -0
  6. package/dist/{esm/cache-entry.d.ts → cache-entry.d.ts} +0 -1
  7. package/dist/{esm/cache-entry.js → cache-entry.js} +0 -1
  8. package/dist/{esm/cache-revalidate.d.ts → cache-revalidate.d.ts} +0 -1
  9. package/dist/{esm/cache-revalidate.js → cache-revalidate.js} +7 -17
  10. package/dist/{esm/delete-header.d.ts → delete-header.d.ts} +0 -1
  11. package/dist/{esm/delete-header.js → delete-header.js} +0 -1
  12. package/dist/{esm/env.d.ts → env.d.ts} +0 -1
  13. package/dist/{esm/env.js → env.js} +0 -1
  14. package/dist/{esm/get-header.d.ts → get-header.d.ts} +0 -1
  15. package/dist/{esm/get-header.js → get-header.js} +0 -1
  16. package/dist/handle-304-response.d.ts +3 -0
  17. package/dist/handle-304-response.js +8 -0
  18. package/dist/{esm/index.d.ts → index.d.ts} +4 -3
  19. package/dist/{esm/index.js → index.js} +50 -22
  20. package/dist/{esm/is-cacheable.d.ts → is-cacheable.d.ts} +0 -1
  21. package/dist/{esm/is-cacheable.js → is-cacheable.js} +0 -1
  22. package/dist/{esm/is-iterable.d.ts → is-iterable.d.ts} +0 -1
  23. package/dist/{esm/is-iterable.js → is-iterable.js} +0 -1
  24. package/dist/oidc.d.ts +17 -0
  25. package/dist/oidc.js +150 -0
  26. package/dist/{esm/otplease.d.ts → otplease.d.ts} +6 -2
  27. package/dist/{esm/otplease.js → otplease.js} +31 -10
  28. package/dist/proxy.d.ts +14 -0
  29. package/dist/proxy.js +18 -0
  30. package/dist/{esm/raw-header.d.ts → raw-header.d.ts} +0 -1
  31. package/dist/{esm/raw-header.js → raw-header.js} +2 -5
  32. package/dist/{esm/redirect.d.ts → redirect.d.ts} +0 -1
  33. package/dist/{esm/redirect.js → redirect.js} +0 -1
  34. package/dist/{esm/revalidate.d.ts → revalidate.d.ts} +0 -1
  35. package/dist/{esm/revalidate.js → revalidate.js} +1 -6
  36. package/dist/{esm/set-cache-headers.d.ts → set-cache-headers.d.ts} +0 -1
  37. package/dist/{esm/set-cache-headers.js → set-cache-headers.js} +0 -1
  38. package/dist/{esm/set-raw-header.d.ts → set-raw-header.d.ts} +0 -1
  39. package/dist/{esm/set-raw-header.js → set-raw-header.js} +1 -3
  40. package/dist/{esm/string-encoding.d.ts → string-encoding.d.ts} +0 -1
  41. package/dist/{esm/string-encoding.js → string-encoding.js} +0 -1
  42. package/dist/{esm/token-response.d.ts → token-response.d.ts} +0 -1
  43. package/dist/{esm/token-response.js → token-response.js} +0 -1
  44. package/dist/{esm/web-auth-challenge.d.ts → web-auth-challenge.d.ts} +0 -1
  45. package/dist/{esm/web-auth-challenge.js → web-auth-challenge.js} +0 -1
  46. package/package.json +43 -47
  47. package/dist/esm/add-header.d.ts.map +0 -1
  48. package/dist/esm/add-header.js.map +0 -1
  49. package/dist/esm/auth.d.ts +0 -9
  50. package/dist/esm/auth.d.ts.map +0 -1
  51. package/dist/esm/auth.js +0 -39
  52. package/dist/esm/auth.js.map +0 -1
  53. package/dist/esm/cache-entry.d.ts.map +0 -1
  54. package/dist/esm/cache-entry.js.map +0 -1
  55. package/dist/esm/cache-revalidate.d.ts.map +0 -1
  56. package/dist/esm/cache-revalidate.js.map +0 -1
  57. package/dist/esm/delete-header.d.ts.map +0 -1
  58. package/dist/esm/delete-header.js.map +0 -1
  59. package/dist/esm/env.d.ts.map +0 -1
  60. package/dist/esm/env.js.map +0 -1
  61. package/dist/esm/get-header.d.ts.map +0 -1
  62. package/dist/esm/get-header.js.map +0 -1
  63. package/dist/esm/handle-304-response.d.ts +0 -4
  64. package/dist/esm/handle-304-response.d.ts.map +0 -1
  65. package/dist/esm/handle-304-response.js +0 -10
  66. package/dist/esm/handle-304-response.js.map +0 -1
  67. package/dist/esm/index.d.ts.map +0 -1
  68. package/dist/esm/index.js.map +0 -1
  69. package/dist/esm/is-cacheable.d.ts.map +0 -1
  70. package/dist/esm/is-cacheable.js.map +0 -1
  71. package/dist/esm/is-iterable.d.ts.map +0 -1
  72. package/dist/esm/is-iterable.js.map +0 -1
  73. package/dist/esm/otplease.d.ts.map +0 -1
  74. package/dist/esm/otplease.js.map +0 -1
  75. package/dist/esm/package.json +0 -3
  76. package/dist/esm/raw-header.d.ts.map +0 -1
  77. package/dist/esm/raw-header.js.map +0 -1
  78. package/dist/esm/redirect.d.ts.map +0 -1
  79. package/dist/esm/redirect.js.map +0 -1
  80. package/dist/esm/revalidate.d.ts.map +0 -1
  81. package/dist/esm/revalidate.js.map +0 -1
  82. package/dist/esm/set-cache-headers.d.ts.map +0 -1
  83. package/dist/esm/set-cache-headers.js.map +0 -1
  84. package/dist/esm/set-raw-header.d.ts.map +0 -1
  85. package/dist/esm/set-raw-header.js.map +0 -1
  86. package/dist/esm/string-encoding.d.ts.map +0 -1
  87. package/dist/esm/string-encoding.js.map +0 -1
  88. package/dist/esm/token-response.d.ts.map +0 -1
  89. package/dist/esm/token-response.js.map +0 -1
  90. package/dist/esm/web-auth-challenge.d.ts.map +0 -1
  91. package/dist/esm/web-auth-challenge.js.map +0 -1
package/dist/oidc.js ADDED
@@ -0,0 +1,150 @@
1
+ import { request } from 'undici';
2
+ import { setRuntimeToken } from "./auth.js";
3
+ const log = (...args) =>
4
+ // eslint-disable-next-line no-console
5
+ console.error('[vlt:oidc]', ...args);
6
+ /**
7
+ * Safely parse a JSON response body, returning undefined on failure.
8
+ */
9
+ const safeJson = async (res) => {
10
+ try {
11
+ return (await res.body.json());
12
+ /* c8 ignore next 3 - defensive: non-JSON response body */
13
+ }
14
+ catch {
15
+ return undefined;
16
+ }
17
+ };
18
+ /**
19
+ * Keys that are always replaced with '[REDACTED]' before logging.
20
+ */
21
+ const SENSITIVE_KEYS = new Set(['token', 'value', 'secret', 'key']);
22
+ /**
23
+ * Recursively redact sensitive fields from a value before logging.
24
+ * Works as a JSON.stringify replacer so nested objects are handled
25
+ * automatically — no sensitive value is ever serialised.
26
+ */
27
+ const redact = (obj) => JSON.parse(JSON.stringify(obj, (k, v) => SENSITIVE_KEYS.has(k) ? '[REDACTED]' : v));
28
+ /**
29
+ * Detect CI environment and exchange an OIDC ID token for a
30
+ * registry auth token. Sets the token into the runtime token
31
+ * store so subsequent requests are authenticated.
32
+ *
33
+ * This function **never throws**. OIDC is always optional — if
34
+ * it is unavailable or any step fails the function returns
35
+ * `undefined` silently.
36
+ */
37
+ export const oidc = async (opts) => {
38
+ try {
39
+ return await _oidc(opts);
40
+ }
41
+ catch (err) /* c8 ignore start - defensive */ {
42
+ log('Unexpected error:', err instanceof Error ? err.message : String(err));
43
+ return undefined;
44
+ } /* c8 ignore stop */
45
+ };
46
+ const _oidc = async ({ packageName, registry, }) => {
47
+ const isGitHub = process.env.GITHUB_ACTIONS === 'true';
48
+ const isGitLab = process.env.GITLAB_CI === 'true';
49
+ const isCircle = process.env.CIRCLECI === 'true';
50
+ if (!isGitHub && !isGitLab && !isCircle) {
51
+ return undefined;
52
+ }
53
+ log(`CI detected: github=${isGitHub} gitlab=${isGitLab} circle=${isCircle}`);
54
+ // NPM_ID_TOKEN is supported as an override in all CI environments
55
+ let idToken = process.env.NPM_ID_TOKEN;
56
+ log(`NPM_ID_TOKEN: ${idToken ? `set (length=${idToken.length})` : 'not set'}`);
57
+ if (!idToken && isGitHub) {
58
+ idToken = await fetchGitHubIdToken(registry);
59
+ }
60
+ if (!idToken) {
61
+ log('No ID token available — skipping');
62
+ return undefined;
63
+ }
64
+ const token = await exchangeToken(idToken, packageName, registry);
65
+ if (token) {
66
+ setRuntimeToken(registry, token);
67
+ log(`Token set for registry ${registry}`);
68
+ }
69
+ else {
70
+ log('Token exchange did not return a token');
71
+ }
72
+ return token;
73
+ };
74
+ /**
75
+ * Fetch an OIDC ID token from GitHub Actions.
76
+ * Requires `id-token: write` permission in the workflow.
77
+ */
78
+ const fetchGitHubIdToken = async (registry) => {
79
+ const requestUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
80
+ const requestToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
81
+ log(`ACTIONS_ID_TOKEN_REQUEST_URL: ${requestUrl ? `set (length=${requestUrl.length})` : 'not set — skipping (missing id-token permissions?)'}`);
82
+ log(`ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${requestToken ? 'set' : 'not set'}`);
83
+ if (!requestUrl || !requestToken) {
84
+ return undefined;
85
+ }
86
+ const audience = `npm:${new URL(registry).hostname}`;
87
+ const url = new URL(requestUrl);
88
+ url.searchParams.append('audience', audience);
89
+ log(`Fetching GitHub ID token with audience ${audience}`);
90
+ try {
91
+ const res = await request(url, {
92
+ method: 'GET',
93
+ headers: {
94
+ accept: 'application/json',
95
+ authorization: `Bearer ${requestToken}`,
96
+ },
97
+ });
98
+ log(`GitHub ID token response: status=${res.statusCode}`);
99
+ if (res.statusCode < 200 || res.statusCode >= 300) {
100
+ const body = await safeJson(res);
101
+ log(`GitHub ID token error body: ${body ? JSON.stringify(redact(body)) : '(non-JSON response)'}`);
102
+ return undefined;
103
+ }
104
+ const json = await safeJson(res);
105
+ const value = json?.value;
106
+ log(`GitHub ID token: hasValue=${!!value}`);
107
+ return value || undefined;
108
+ }
109
+ catch (err) /* c8 ignore start - network error */ {
110
+ log('GitHub ID token fetch error:', err instanceof Error ? err.message : String(err));
111
+ return undefined;
112
+ } /* c8 ignore stop */
113
+ };
114
+ /**
115
+ * Exchange an OIDC ID token for an npm auth token via the
116
+ * registry token exchange endpoint.
117
+ */
118
+ const exchangeToken = async (idToken, packageName, registry) => {
119
+ // npm escaping: @scope/name → @scope%2Fname
120
+ const escapedName = packageName.replace('/', '%2F');
121
+ const exchangeUrl = new URL(`/-/npm/v1/oidc/token/exchange/package/${escapedName}`, registry);
122
+ log(`Exchanging token for package: ${packageName}`);
123
+ log(`Exchange URL: ${exchangeUrl.href}`);
124
+ try {
125
+ const res = await request(exchangeUrl, {
126
+ method: 'POST',
127
+ headers: {
128
+ 'content-type': 'application/json',
129
+ authorization: `Bearer ${idToken}`,
130
+ },
131
+ });
132
+ log(`Exchange response: status=${res.statusCode}`);
133
+ if (res.statusCode < 200 || res.statusCode >= 300) {
134
+ const body = await safeJson(res);
135
+ log(`Exchange error body: ${body ? JSON.stringify(redact(body)) : '(non-JSON response)'}`);
136
+ return undefined;
137
+ }
138
+ const json = await safeJson(res);
139
+ const hasToken = !!json?.token;
140
+ log(`Exchange result: hasToken=${hasToken}`);
141
+ if (!json?.token || typeof json.token !== 'string') {
142
+ return undefined;
143
+ }
144
+ return `Bearer ${json.token}`;
145
+ }
146
+ catch (err) /* c8 ignore start - network error */ {
147
+ log('Exchange request error:', err instanceof Error ? err.message : String(err));
148
+ return undefined;
149
+ } /* c8 ignore stop */
150
+ };
@@ -1,4 +1,8 @@
1
1
  import type { Dispatcher } from 'undici';
2
2
  import type { RegistryClient, RegistryClientRequestOptions } from './index.ts';
3
- export declare const otplease: (client: RegistryClient, options: RegistryClientRequestOptions, response: Dispatcher.ResponseData) => Promise<RegistryClientRequestOptions | undefined>;
4
- //# sourceMappingURL=otplease.d.ts.map
3
+ export type OtpResult = {
4
+ retry: RegistryClientRequestOptions;
5
+ } | {
6
+ bodyConsumed: string;
7
+ } | undefined;
8
+ export declare const otplease: (client: RegistryClient, options: RegistryClientRequestOptions, response: Dispatcher.ResponseData) => Promise<OtpResult>;
@@ -2,6 +2,7 @@ import { error } from '@vltpkg/error-cause';
2
2
  import { getWebAuthChallenge } from "./web-auth-challenge.js";
3
3
  import { urlOpen } from '@vltpkg/url-open';
4
4
  import { createInterface } from 'node:readline/promises';
5
+ import { gunzipSync } from 'node:zlib';
5
6
  // eslint-disable-next-line no-console
6
7
  const log = (msg) => console.error(msg);
7
8
  const question = async (text) => {
@@ -14,6 +15,13 @@ const question = async (text) => {
14
15
  return answer;
15
16
  };
16
17
  const otpChallengeNotice = /^Open ([^ ]+) to use your security key for authentication or enter OTP from your authenticator app/i;
18
+ const responseBodyText = async (response) => {
19
+ const contentEncoding = String(response.headers['content-encoding'] ?? '');
20
+ if (/\bgzip\b/i.test(contentEncoding)) {
21
+ return gunzipSync(await response.body.arrayBuffer()).toString();
22
+ }
23
+ return await response.body.text();
24
+ };
17
25
  export const otplease = async (client, options, response) => {
18
26
  const waHeader = String(response.headers['www-authenticate'] ?? '');
19
27
  const wwwAuth = new Set(waHeader ? waHeader.toLowerCase().split(/,\s*/) : []);
@@ -24,11 +32,15 @@ export const otplease = async (client, options, response) => {
24
32
  }
25
33
  if (wwwAuth.has('otp')) {
26
34
  // do a web auth opener to get otp token
27
- const challenge = getWebAuthChallenge(await response.body.json().catch(() => null));
35
+ const challenge = getWebAuthChallenge(await responseBodyText(response)
36
+ .then(text => JSON.parse(text))
37
+ .catch(() => null));
28
38
  if (challenge) {
29
39
  return {
30
- ...options,
31
- otp: (await client.webAuthOpener(challenge)).token,
40
+ retry: {
41
+ ...options,
42
+ otp: (await client.webAuthOpener(challenge)).token,
43
+ },
32
44
  };
33
45
  }
34
46
  const { 'npm-notice': npmNotice } = response.headers;
@@ -39,8 +51,10 @@ export const otplease = async (client, options, response) => {
39
51
  await urlOpen(match[1]);
40
52
  log(notice);
41
53
  return {
42
- ...options,
43
- otp: await question('OTP: '),
54
+ retry: {
55
+ ...options,
56
+ otp: await question('OTP: '),
57
+ },
44
58
  };
45
59
  }
46
60
  }
@@ -48,16 +62,23 @@ export const otplease = async (client, options, response) => {
48
62
  response,
49
63
  });
50
64
  }
65
+ if (wwwAuth.has('bearer')) {
66
+ throw error('Missing or invalid authentication token. Run `vlt login` or `vlt token add` to authenticate.', { response });
67
+ }
51
68
  if (wwwAuth.size) {
52
69
  throw error('Unknown authentication challenge', { response });
53
70
  }
54
- // see if the body is prompting for otp
55
- const text = await response.body.text().catch(() => '');
71
+ // Consume the body to check if it's prompting for OTP.
72
+ // We must return the consumed text so the caller doesn't try to
73
+ // re-read from the already-drained stream.
74
+ const text = await responseBodyText(response).catch(() => '');
56
75
  if (text.toLowerCase().includes('one-time pass')) {
57
76
  return {
58
- ...options,
59
- otp: await question(text),
77
+ retry: {
78
+ ...options,
79
+ otp: await question(text),
80
+ },
60
81
  };
61
82
  }
83
+ return { bodyConsumed: text };
62
84
  };
63
- //# sourceMappingURL=otplease.js.map
@@ -0,0 +1,14 @@
1
+ import type { Dispatcher } from 'undici';
2
+ import { Agent } from 'undici';
3
+ /**
4
+ * Build the dispatcher that all registry traffic goes through.
5
+ *
6
+ * With no proxy in the environment this is the same plain {@link Agent}
7
+ * vlt has always used, so the default path is unchanged. When
8
+ * `http_proxy` or `https_proxy` is set, undici's
9
+ * {@link EnvHttpProxyAgent} takes over. It tunnels proxied origins with
10
+ * `CONNECT`, still dials `no_proxy` origins directly, and receives the
11
+ * identical options, so timeouts, keepalive, and pooling are the same
12
+ * either way.
13
+ */
14
+ export declare const getDispatcher: (options: Agent.Options) => Dispatcher;
package/dist/proxy.js ADDED
@@ -0,0 +1,18 @@
1
+ import proc from 'node:process';
2
+ import { Agent, EnvHttpProxyAgent } from 'undici';
3
+ // Matches how undici's EnvHttpProxyAgent reads these: lowercase wins
4
+ // over uppercase, and an empty string counts as unset.
5
+ const hasProxyEnv = () => !!(proc.env.http_proxy ?? proc.env.HTTP_PROXY) ||
6
+ !!(proc.env.https_proxy ?? proc.env.HTTPS_PROXY);
7
+ /**
8
+ * Build the dispatcher that all registry traffic goes through.
9
+ *
10
+ * With no proxy in the environment this is the same plain {@link Agent}
11
+ * vlt has always used, so the default path is unchanged. When
12
+ * `http_proxy` or `https_proxy` is set, undici's
13
+ * {@link EnvHttpProxyAgent} takes over. It tunnels proxied origins with
14
+ * `CONNECT`, still dials `no_proxy` origins directly, and receives the
15
+ * identical options, so timeouts, keepalive, and pooling are the same
16
+ * either way.
17
+ */
18
+ export const getDispatcher = (options) => hasProxyEnv() ? new EnvHttpProxyAgent(options) : new Agent(options);
@@ -6,4 +6,3 @@ export declare const getRawHeader: (headers: Uint8Array[], key: string) => Uint8
6
6
  * Give it a key and value, and it'll overwrite or add the header entry
7
7
  */
8
8
  export declare const setRawHeader: (headers: Uint8Array[], key: string, value: Uint8Array | string) => Uint8Array[];
9
- //# sourceMappingURL=raw-header.d.ts.map
@@ -6,8 +6,7 @@ export const getRawHeader = (headers, key) => {
6
6
  const k = key.toLowerCase();
7
7
  for (let i = 0; i < headers.length; i += 2) {
8
8
  const name = headers[i];
9
- if (name &&
10
- name.length === key.length &&
9
+ if (name?.length === key.length &&
11
10
  getDecodedValue(name).toLowerCase() === k) {
12
11
  return headers[i + 1];
13
12
  }
@@ -21,8 +20,7 @@ export const setRawHeader = (headers, key, value) => {
21
20
  const encVal = typeof value === 'string' ? getEncondedValue(value) : value;
22
21
  for (let i = 0; i < headers.length; i += 2) {
23
22
  const name = headers[i];
24
- if (name &&
25
- name.length === k.length &&
23
+ if (name?.length === k.length &&
26
24
  getDecodedValue(name).toLowerCase() === k) {
27
25
  return [
28
26
  ...headers.slice(0, i + 1),
@@ -33,4 +31,3 @@ export const setRawHeader = (headers, key, value) => {
33
31
  }
34
32
  return [...headers, getEncondedValue(k), encVal];
35
33
  };
36
- //# sourceMappingURL=raw-header.js.map
@@ -20,4 +20,3 @@ export declare const isRedirect: (response: CacheEntry) => response is RedirectR
20
20
  * {@link isRedirect} on it.
21
21
  */
22
22
  export declare const redirect: (options: RegistryClientRequestOptions, response: RedirectResponse, from: URL) => [] | [URL, RegistryClientRequestOptions];
23
- //# sourceMappingURL=redirect.d.ts.map
@@ -62,4 +62,3 @@ export const redirect = (options, response, from) => {
62
62
  }
63
63
  }
64
64
  };
65
- //# sourceMappingURL=redirect.js.map
@@ -2,4 +2,3 @@ export declare const __CODE_SPLIT_SCRIPT_NAME: string;
2
2
  export declare const main: (cache?: string, input?: NodeJS.ReadStream & {
3
3
  fd: 0;
4
4
  }) => Promise<boolean>;
5
- //# sourceMappingURL=revalidate.d.ts.map
@@ -40,16 +40,11 @@ export const main = async (cache, input = process.stdin) => {
40
40
  }));
41
41
  return true;
42
42
  };
43
- const g = globalThis;
44
- if (isMain(g.__VLT_INTERNAL_MAIN ?? process.argv[1])) {
43
+ if (isMain(process.argv[1])) {
45
44
  process.title = 'vlt-cache-revalidate';
46
- // When compiled there can be other leading args supplied by Deno
47
- // so always use the last arg unless there are only two which means
48
- // no path was supplied.
49
45
  const cacheFolder = process.argv.length === 2 ? undefined : process.argv.at(-1);
50
46
  const res = await main(cacheFolder, process.stdin);
51
47
  if (!res) {
52
48
  process.exit(1);
53
49
  }
54
50
  }
55
- //# sourceMappingURL=revalidate.js.map
@@ -1,4 +1,3 @@
1
1
  import type { CacheEntry } from './cache-entry.ts';
2
2
  import type { RegistryClientRequestOptions } from './index.ts';
3
3
  export declare const setCacheHeaders: (options: RegistryClientRequestOptions, entry?: CacheEntry) => void;
4
- //# sourceMappingURL=set-cache-headers.d.ts.map
@@ -14,4 +14,3 @@ export const setCacheHeaders = (options, entry) => {
14
14
  options.headers = addHeader(options.headers, 'if-modified-since', date);
15
15
  }
16
16
  };
17
- //# sourceMappingURL=set-cache-headers.js.map
@@ -3,4 +3,3 @@
3
3
  * overwrite the current value of a header, or if not found, append
4
4
  */
5
5
  export declare const setRawHeader: (headers: Uint8Array[], key: string, value: Uint8Array | string) => Uint8Array[];
6
- //# sourceMappingURL=set-raw-header.d.ts.map
@@ -9,8 +9,7 @@ export const setRawHeader = (headers, key, value) => {
9
9
  const valBuf = getEncondedValue(value);
10
10
  for (let i = 0; i < headers.length; i += 2) {
11
11
  const k = headers[i];
12
- if (k &&
13
- k.length === keyBuf.length &&
12
+ if (k?.length === keyBuf.length &&
14
13
  getDecodedValue(k).toLowerCase() === key) {
15
14
  headers[i + 1] = valBuf;
16
15
  return headers;
@@ -19,4 +18,3 @@ export const setRawHeader = (headers, key, value) => {
19
18
  headers.push(keyBuf, valBuf);
20
19
  return headers;
21
20
  };
22
- //# sourceMappingURL=set-raw-header.js.map
@@ -6,4 +6,3 @@ export declare const getDecodedValue: (value: string | Uint8Array | undefined) =
6
6
  * Encodes a string to a Uint8Array
7
7
  */
8
8
  export declare const getEncondedValue: (value: Uint8Array | string | undefined) => Uint8Array;
9
- //# sourceMappingURL=string-encoding.d.ts.map
@@ -22,4 +22,3 @@ export const getEncondedValue = (value) => {
22
22
  }
23
23
  return value;
24
24
  };
25
- //# sourceMappingURL=string-encoding.js.map
@@ -2,4 +2,3 @@ export type TokenResponse = {
2
2
  token: string;
3
3
  };
4
4
  export declare const getTokenResponse: (b: unknown) => TokenResponse | undefined;
5
- //# sourceMappingURL=token-response.d.ts.map
@@ -5,4 +5,3 @@ export const getTokenResponse = (b) => (!!b &&
5
5
  b.token) ?
6
6
  { token: b.token }
7
7
  : undefined;
8
- //# sourceMappingURL=token-response.js.map
@@ -3,4 +3,3 @@ export type WebAuthChallenge = {
3
3
  authUrl: string;
4
4
  };
5
5
  export declare const getWebAuthChallenge: (o: unknown) => WebAuthChallenge | undefined;
6
- //# sourceMappingURL=web-auth-challenge.d.ts.map
@@ -11,4 +11,3 @@ export const getWebAuthChallenge = (o) => {
11
11
  return authUrl ? { doneUrl: o.doneUrl, authUrl } : undefined;
12
12
  }
13
13
  };
14
- //# sourceMappingURL=web-auth-challenge.js.map
package/package.json CHANGED
@@ -1,86 +1,82 @@
1
1
  {
2
2
  "name": "@vltpkg/registry-client",
3
3
  "description": "Fetch package artifacts and metadata from registries",
4
- "version": "1.0.0-rc.9",
4
+ "version": "1.0.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
8
8
  "directory": "src/registry-client"
9
9
  },
10
- "author": "vlt technology inc. <support@vlt.sh> (http://vlt.sh)",
11
- "tshy": {
12
- "selfLink": false,
13
- "liveDev": true,
14
- "dialects": [
15
- "esm"
16
- ],
17
- "exports": {
18
- "./package.json": "./package.json",
19
- ".": "./src/index.ts",
20
- "./cache-entry": "./src/cache-entry.ts"
21
- }
10
+ "author": {
11
+ "name": "vlt technology inc.",
12
+ "email": "support@vlt.sh",
13
+ "url": "http://vlt.sh"
22
14
  },
23
15
  "dependencies": {
16
+ "@vltpkg/cache": "1.0.1",
17
+ "@vltpkg/cache-unzip": "1.0.1",
18
+ "@vltpkg/error-cause": "1.0.1",
19
+ "@vltpkg/keychain": "1.0.1",
20
+ "@vltpkg/output": "1.0.1",
21
+ "@vltpkg/types": "1.0.1",
22
+ "@vltpkg/url-open": "1.0.1",
23
+ "@vltpkg/xdg": "1.0.1",
24
24
  "cache-control-parser": "^2.0.6",
25
25
  "package-json-from-dist": "^1.0.1",
26
- "undici": "^7.15.0",
27
- "@vltpkg/cache": "1.0.0-rc.9",
28
- "@vltpkg/error-cause": "1.0.0-rc.9",
29
- "@vltpkg/keychain": "1.0.0-rc.9",
30
- "@vltpkg/cache-unzip": "1.0.0-rc.9",
31
- "@vltpkg/output": "1.0.0-rc.9",
32
- "@vltpkg/types": "1.0.0-rc.9",
33
- "@vltpkg/url-open": "1.0.0-rc.9",
34
- "@vltpkg/xdg": "1.0.0-rc.9"
26
+ "undici": "^7.16.0"
35
27
  },
36
28
  "devDependencies": {
37
- "@eslint/js": "^9.34.0",
38
- "@types/node": "^22.17.2",
39
- "eslint": "^9.34.0",
40
- "prettier": "^3.6.2",
41
- "tap": "^21.1.0",
42
- "tshy": "^3.0.2",
29
+ "@eslint/js": "^9.39.1",
30
+ "@types/node": "^22.19.2",
31
+ "eslint": "^9.39.1",
32
+ "prettier": "^3.7.4",
33
+ "tap": "^21.5.0",
43
34
  "typedoc": "~0.27.9",
44
35
  "typescript": "5.7.3",
45
- "typescript-eslint": "^8.40.0"
36
+ "typescript-eslint": "^8.49.0"
46
37
  },
47
38
  "license": "BSD-2-Clause-Patent",
48
39
  "engines": {
49
- "node": ">=22"
40
+ "node": ">=22.22.0"
41
+ },
42
+ "scripts": {
43
+ "format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
44
+ "format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
45
+ "lint": "eslint . --fix",
46
+ "lint:check": "eslint .",
47
+ "prepack": "tsc -p tsconfig.publish.json && ../../scripts/update-dist-exports.ts",
48
+ "snap": "tap",
49
+ "test": "tap",
50
+ "posttest": "tsc --noEmit",
51
+ "typecheck": "tsc --noEmit"
50
52
  },
51
53
  "tap": {
52
54
  "extends": "../../tap-config.yaml"
53
55
  },
54
56
  "prettier": "../../.prettierrc.js",
55
- "module": "./dist/esm/index.js",
57
+ "module": "./dist/index.js",
56
58
  "type": "module",
57
59
  "exports": {
58
60
  "./package.json": "./package.json",
59
61
  ".": {
60
62
  "import": {
61
- "types": "./dist/esm/index.d.ts",
62
- "default": "./dist/esm/index.js"
63
+ "default": "./dist/index.js"
63
64
  }
64
65
  },
65
66
  "./cache-entry": {
66
67
  "import": {
67
- "types": "./dist/esm/cache-entry.d.ts",
68
- "default": "./dist/esm/cache-entry.js"
68
+ "default": "./dist/cache-entry.js"
69
69
  }
70
70
  }
71
71
  },
72
72
  "files": [
73
73
  "dist"
74
74
  ],
75
- "scripts": {
76
- "format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
77
- "format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
78
- "lint": "eslint . --fix",
79
- "lint:check": "eslint .",
80
- "snap": "tap",
81
- "test": "tap",
82
- "posttest": "tsc --noEmit",
83
- "tshy": "tshy",
84
- "typecheck": "tsc --noEmit"
85
- }
86
- }
75
+ "bugs": [
76
+ {
77
+ "type": "link",
78
+ "url": "https://github.com/vltpkg/vltpkg/issues"
79
+ }
80
+ ],
81
+ "homepage": "https://github.com/vltpkg/vltpkg/tree/main/src/registry-client#readme"
82
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-header.d.ts","sourceRoot":"","sources":["../../src/add-header.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAA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EAC5D,CAAC;QACD,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,CAAiB,CAAA;IACnD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QACpB,OAAO,OAAO,CAAA;IAChB,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { deleteHeader } from './delete-header.ts'\nimport { isIterable } from './is-iterable.ts'\n\n// this does some rude things with types, but not much way around it,\n// since the opts.headers type is so loosey goosey to begin with.\nexport const addHeader = <\n H extends\n | [string, string[] | string][]\n | Iterable<[string, string[] | string | undefined]>\n | Record<string, string[] | string | undefined>\n | string[],\n>(\n headers: H | null | undefined,\n key: string,\n value?: string,\n): H => {\n if (!value) return deleteHeader(headers, key)\n\n if (!headers) return { [key]: value } as H\n if (Array.isArray(headers)) {\n if (!headers.length) return [[key, value]] as unknown as H\n if (Array.isArray(headers[0]))\n (headers as [string, string][]).push([key, value])\n else (headers as string[]).push(key, value)\n return headers\n } else if (\n isIterable<[string, string[] | string | undefined]>(headers)\n ) {\n return [...headers, [key, value]] as unknown as H\n } else {\n headers[key] = value\n return headers\n }\n}\n"]}
@@ -1,9 +0,0 @@
1
- import { Keychain } from '@vltpkg/keychain';
2
- export type Token = `Bearer ${string}` | `Basic ${string}`;
3
- export declare const keychains: Map<string, Keychain<Token>>;
4
- export declare const getKC: (identity: string) => Keychain<Token>;
5
- export declare const isToken: (t: any) => t is Token;
6
- export declare const deleteToken: (registry: string, identity: string) => Promise<void>;
7
- export declare const setToken: (registry: string, token: Token, identity: string) => Promise<void>;
8
- export declare const getToken: (registry: string, identity: string) => Promise<Token | undefined>;
9
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,MAAM,MAAM,KAAK,GAAG,UAAU,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAA;AAG1D,eAAO,MAAM,SAAS,8BAAqC,CAAA;AAE3D,eAAO,MAAM,KAAK,aAAc,MAAM,oBAOrC,CAAA;AAED,eAAO,MAAM,OAAO,MAAO,GAAG,KAAG,CAAC,IAAI,KAEe,CAAA;AAErD,eAAO,MAAM,WAAW,aACZ,MAAM,YACN,MAAM,KACf,OAAO,CAAC,IAAI,CAKd,CAAA;AAED,eAAO,MAAM,QAAQ,aACT,MAAM,SACT,KAAK,YACF,MAAM,KACf,OAAO,CAAC,IAAI,CAGd,CAAA;AAED,eAAO,MAAM,QAAQ,aACT,MAAM,YACN,MAAM,KACf,OAAO,CAAC,KAAK,GAAG,SAAS,CAc3B,CAAA"}
package/dist/esm/auth.js DELETED
@@ -1,39 +0,0 @@
1
- import { Keychain } from '@vltpkg/keychain';
2
- // just exported for testing
3
- export const keychains = new Map();
4
- export const getKC = (identity) => {
5
- const kc = keychains.get(identity);
6
- if (kc)
7
- return kc;
8
- const i = identity ? `vlt/auth/${identity}` : 'vlt/auth';
9
- const nkc = new Keychain(i);
10
- keychains.set(identity, nkc);
11
- return nkc;
12
- };
13
- export const isToken = (t) => typeof t === 'string' &&
14
- (t.startsWith('Bearer ') || t.startsWith('Basic '));
15
- export const deleteToken = async (registry, identity) => {
16
- const kc = getKC(identity);
17
- await kc.load();
18
- kc.delete(new URL(registry).origin);
19
- await kc.save();
20
- };
21
- export const setToken = async (registry, token, identity) => {
22
- const kc = getKC(identity);
23
- return kc.set(new URL(registry).origin, token);
24
- };
25
- export const getToken = async (registry, identity) => {
26
- const kc = getKC(identity);
27
- registry = new URL(registry).origin;
28
- const envReg = process.env.VLT_REGISTRY;
29
- if (envReg && registry === new URL(envReg).origin) {
30
- const envTok = process.env.VLT_TOKEN;
31
- if (envTok)
32
- return `Bearer ${envTok}`;
33
- }
34
- const tok = process.env[`VLT_TOKEN_${registry.replace(/[^a-zA-Z0-9]+/g, '_')}`];
35
- if (tok)
36
- return `Bearer ${tok}`;
37
- return kc.get(registry);
38
- };
39
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAI3C,4BAA4B;AAC5B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,GAAG,EAA2B,CAAA;AAE3D,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,QAAgB,EAAE,EAAE;IACxC,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAClC,IAAI,EAAE;QAAE,OAAO,EAAE,CAAA;IACjB,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAA;IACxD,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAQ,CAAC,CAAC,CAAA;IAClC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAM,EAAc,EAAE,CAC5C,OAAO,CAAC,KAAK,QAAQ;IACrB,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAA;AAErD,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC9B,QAAgB,EAChB,QAAgB,EACD,EAAE;IACjB,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,CAAA;IACf,EAAE,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC3B,QAAgB,EAChB,KAAY,EACZ,QAAgB,EACD,EAAE;IACjB,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC1B,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAChD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC3B,QAAgB,EAChB,QAAgB,EACY,EAAE;IAC9B,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC1B,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAA;IACnC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAA;IACvC,IAAI,MAAM,IAAI,QAAQ,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAA;QACpC,IAAI,MAAM;YAAE,OAAO,UAAU,MAAM,EAAE,CAAA;IACvC,CAAC;IACD,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CACT,aAAa,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,EAAE,CACvD,CAAA;IACH,IAAI,GAAG;QAAE,OAAO,UAAU,GAAG,EAAE,CAAA;IAC/B,OAAO,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AACzB,CAAC,CAAA","sourcesContent":["import { Keychain } from '@vltpkg/keychain'\n\nexport type Token = `Bearer ${string}` | `Basic ${string}`\n\n// just exported for testing\nexport const keychains = new Map<string, Keychain<Token>>()\n\nexport const getKC = (identity: string) => {\n const kc = keychains.get(identity)\n if (kc) return kc\n const i = identity ? `vlt/auth/${identity}` : 'vlt/auth'\n const nkc = new Keychain<Token>(i)\n keychains.set(identity, nkc)\n return nkc\n}\n\nexport const isToken = (t: any): t is Token =>\n typeof t === 'string' &&\n (t.startsWith('Bearer ') || t.startsWith('Basic '))\n\nexport const deleteToken = async (\n registry: string,\n identity: string,\n): Promise<void> => {\n const kc = getKC(identity)\n await kc.load()\n kc.delete(new URL(registry).origin)\n await kc.save()\n}\n\nexport const setToken = async (\n registry: string,\n token: Token,\n identity: string,\n): Promise<void> => {\n const kc = getKC(identity)\n return kc.set(new URL(registry).origin, token)\n}\n\nexport const getToken = async (\n registry: string,\n identity: string,\n): Promise<Token | undefined> => {\n const kc = getKC(identity)\n registry = new URL(registry).origin\n const envReg = process.env.VLT_REGISTRY\n if (envReg && registry === new URL(envReg).origin) {\n const envTok = process.env.VLT_TOKEN\n if (envTok) return `Bearer ${envTok}`\n }\n const tok =\n process.env[\n `VLT_TOKEN_${registry.replace(/[^a-zA-Z0-9]+/g, '_')}`\n ]\n if (tok) return `Bearer ${tok}`\n return kc.get(registry)\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache-entry.d.ts","sourceRoot":"","sources":["../../src/cache-entry.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,GAAG,MAAM,sBAAsB,CAAA;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAS/C,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAyB/C,QAAA,MAAM,cAAc,eAA2C,CAAA;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,SA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