checkly 8.22.0 → 8.23.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.
Files changed (85) hide show
  1. package/dist/ai-context/skills-command/references/configure-playwright-checks.md +24 -19
  2. package/dist/commands/debug/parse-project.js +3 -0
  3. package/dist/commands/debug/parse-project.js.map +1 -1
  4. package/dist/commands/deploy.js +3 -0
  5. package/dist/commands/deploy.js.map +1 -1
  6. package/dist/commands/pw-test.js +3 -0
  7. package/dist/commands/pw-test.js.map +1 -1
  8. package/dist/commands/test.js +3 -0
  9. package/dist/commands/test.js.map +1 -1
  10. package/dist/config.d.ts +1 -1
  11. package/dist/config.js.map +1 -1
  12. package/dist/constructs/playwright-check-bundle.d.ts +5 -5
  13. package/dist/constructs/playwright-check-bundle.js.map +1 -1
  14. package/dist/constructs/project.js +5 -2
  15. package/dist/constructs/project.js.map +1 -1
  16. package/dist/constructs/session.d.ts +2 -1
  17. package/dist/constructs/session.js +2 -1
  18. package/dist/constructs/session.js.map +1 -1
  19. package/dist/index.d.ts +1 -0
  20. package/dist/services/check-parser/bundler.d.ts +79 -8
  21. package/dist/services/check-parser/bundler.js +567 -9
  22. package/dist/services/check-parser/bundler.js.map +1 -1
  23. package/dist/services/check-parser/cache-hash.d.ts +141 -17
  24. package/dist/services/check-parser/cache-hash.js +78 -12
  25. package/dist/services/check-parser/cache-hash.js.map +1 -1
  26. package/dist/services/check-parser/faux-package.d.ts +5 -0
  27. package/dist/services/check-parser/faux-package.js +9 -1
  28. package/dist/services/check-parser/faux-package.js.map +1 -1
  29. package/dist/services/check-parser/lockfile-pruner.d.ts +104 -0
  30. package/dist/services/check-parser/lockfile-pruner.js +1107 -0
  31. package/dist/services/check-parser/lockfile-pruner.js.map +1 -0
  32. package/dist/services/check-parser/package-files/package-manager.d.ts +34 -0
  33. package/dist/services/check-parser/package-files/package-manager.js +131 -3
  34. package/dist/services/check-parser/package-files/package-manager.js.map +1 -1
  35. package/dist/services/check-parser/package-files/pnpmfile.d.ts +40 -0
  36. package/dist/services/check-parser/package-files/pnpmfile.js +322 -0
  37. package/dist/services/check-parser/package-files/pnpmfile.js.map +1 -0
  38. package/dist/services/check-parser/package-files/resolver.d.ts +6 -1
  39. package/dist/services/check-parser/package-files/resolver.js +34 -0
  40. package/dist/services/check-parser/package-files/resolver.js.map +1 -1
  41. package/dist/services/check-parser/package-files/workspace.d.ts +16 -1
  42. package/dist/services/check-parser/package-files/workspace.js +17 -2
  43. package/dist/services/check-parser/package-files/workspace.js.map +1 -1
  44. package/dist/services/check-parser/package-prune.d.ts +68 -0
  45. package/dist/services/check-parser/package-prune.js +274 -0
  46. package/dist/services/check-parser/package-prune.js.map +1 -0
  47. package/dist/services/check-parser/parser.js +9 -0
  48. package/dist/services/check-parser/parser.js.map +1 -1
  49. package/dist/services/check-parser/patched-dependencies.d.ts +133 -0
  50. package/dist/services/check-parser/patched-dependencies.js +428 -0
  51. package/dist/services/check-parser/patched-dependencies.js.map +1 -0
  52. package/dist/services/checkly-config-loader.d.ts +164 -10
  53. package/dist/services/checkly-config-loader.js +39 -0
  54. package/dist/services/checkly-config-loader.js.map +1 -1
  55. package/dist/services/embedded-packages/cache.d.ts +8 -4
  56. package/dist/services/embedded-packages/cache.js +27 -6
  57. package/dist/services/embedded-packages/cache.js.map +1 -1
  58. package/dist/services/embedded-packages/diagnostics.d.ts +129 -0
  59. package/dist/services/embedded-packages/diagnostics.js +212 -0
  60. package/dist/services/embedded-packages/diagnostics.js.map +1 -0
  61. package/dist/services/embedded-packages/lockfile-filter.d.ts +20 -0
  62. package/dist/services/embedded-packages/lockfile-filter.js +40 -0
  63. package/dist/services/embedded-packages/lockfile-filter.js.map +1 -0
  64. package/dist/services/embedded-packages/lockfile-packages.d.ts +31 -2
  65. package/dist/services/embedded-packages/lockfile-packages.js +234 -30
  66. package/dist/services/embedded-packages/lockfile-packages.js.map +1 -1
  67. package/dist/services/embedded-packages/materializer.d.ts +19 -5
  68. package/dist/services/embedded-packages/materializer.js +445 -91
  69. package/dist/services/embedded-packages/materializer.js.map +1 -1
  70. package/dist/services/embedded-packages/npmrc.d.ts +163 -21
  71. package/dist/services/embedded-packages/npmrc.js +440 -75
  72. package/dist/services/embedded-packages/npmrc.js.map +1 -1
  73. package/dist/services/embedded-packages/spec.d.ts +89 -17
  74. package/dist/services/embedded-packages/spec.js +199 -30
  75. package/dist/services/embedded-packages/spec.js.map +1 -1
  76. package/dist/services/embedded-packages/url.d.ts +39 -0
  77. package/dist/services/embedded-packages/url.js +60 -0
  78. package/dist/services/embedded-packages/url.js.map +1 -0
  79. package/dist/services/playwright-project-bundler.js +27 -23
  80. package/dist/services/playwright-project-bundler.js.map +1 -1
  81. package/dist/services/runner/registries.d.ts +144 -0
  82. package/dist/services/runner/registries.js +232 -0
  83. package/dist/services/runner/registries.js.map +1 -0
  84. package/oclif.manifest.json +1 -1
  85. package/package.json +5 -5
@@ -1,11 +1,19 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
+ import Debug from 'debug';
5
+ import { parseComposableUrl, parseFetchableUrl } from './url.js';
6
+ const debug = Debug('checkly:cli:services:embedded-packages');
4
7
  export const DEFAULT_REGISTRY_URL = 'https://registry.npmjs.org/';
8
+ /** The prefix that marks an environment variable as npm configuration. */
9
+ export const NPM_CONFIG_ENV_PREFIX = 'npm_config_';
5
10
  export class NpmrcEnvVarError extends Error {
6
11
  constructor(key, varName) {
7
- super(`The .npmrc value for '${key}' references the environment variable`
8
- + ` '${varName}', which is not set`);
12
+ super(
13
+ // Not necessarily an .npmrc: the value may equally have come from
14
+ // pnpm's auth.ini or an npm_config_* environment variable.
15
+ `The npm configuration value for '${key}' references the environment`
16
+ + ` variable '${varName}', which is not set`);
9
17
  this.name = 'NpmrcEnvVarError';
10
18
  }
11
19
  }
@@ -38,31 +46,50 @@ export function parseNpmrc(content) {
38
46
  return config;
39
47
  }
40
48
  /**
41
- * Extracts npm configuration from `npm_config_*` environment variables
42
- * (e.g. `npm_config_registry`, commonly set in CI and by package managers
43
- * running lifecycle scripts). In npm's precedence order these sit above
44
- * every `.npmrc` file. The prefix is matched case-insensitively; the key
45
- * is stored both verbatim and lowercased, because plain keys are written
46
- * in any case (`NPM_CONFIG_REGISTRY`) while nerf-darted auth keys carry a
47
- * case-sensitive spelling (`npm_config_//host/:_authToken`).
49
+ * Every `npm_config_*` variable in an environment, as the config key it
50
+ * carries plus the variable's verbatim name. The prefix is matched
51
+ * case-insensitively; the name is kept because only it is something the
52
+ * user can search their environment for.
48
53
  */
49
- export function npmrcConfigFromEnv(env) {
50
- const config = new Map();
51
- const prefix = 'npm_config_';
52
- for (const [name, value] of Object.entries(env)) {
53
- if (value === undefined || !name.toLowerCase().startsWith(prefix)) {
54
+ function* npmConfigEnvEntries(env) {
55
+ for (const [variable, value] of Object.entries(env)) {
56
+ if (value === undefined || !variable.toLowerCase().startsWith(NPM_CONFIG_ENV_PREFIX)) {
54
57
  continue;
55
58
  }
56
- const key = name.slice(prefix.length);
59
+ const key = variable.slice(NPM_CONFIG_ENV_PREFIX.length);
57
60
  // npm drops env config entries with empty values rather than treating
58
61
  // them as set-to-empty.
59
62
  if (key === '' || value === '') {
60
63
  continue;
61
64
  }
62
- config.set(key, value);
63
- if (!config.has(key.toLowerCase())) {
64
- config.set(key.toLowerCase(), value);
65
- }
65
+ yield { key, value, variable };
66
+ }
67
+ }
68
+ /**
69
+ * Records an env-derived entry under both the verbatim key and, unless one
70
+ * is already present, its lowercased alias. Shared so that the config map
71
+ * and the origins map cannot drift apart: they must key identically, or a
72
+ * value resolves while its origin does not.
73
+ */
74
+ function setEnvEntry(map, key, value) {
75
+ map.set(key, value);
76
+ if (!map.has(key.toLowerCase())) {
77
+ map.set(key.toLowerCase(), value);
78
+ }
79
+ }
80
+ /**
81
+ * Extracts npm configuration from `npm_config_*` environment variables
82
+ * (e.g. `npm_config_registry`, commonly set in CI and by package managers
83
+ * running lifecycle scripts). In npm's precedence order these sit above
84
+ * every `.npmrc` file. The key is stored both verbatim and lowercased,
85
+ * because plain keys are written in any case (`NPM_CONFIG_REGISTRY`) while
86
+ * nerf-darted auth keys carry a case-sensitive spelling
87
+ * (`npm_config_//host/:_authToken`).
88
+ */
89
+ export function npmrcConfigFromEnv(env) {
90
+ const config = new Map();
91
+ for (const { key, value } of npmConfigEnvEntries(env)) {
92
+ setEnvEntry(config, key, value);
66
93
  }
67
94
  return config;
68
95
  }
@@ -72,9 +99,16 @@ export function npmrcConfigFromEnv(env) {
72
99
  * earlier paths winning over later ones (pass project first, then user).
73
100
  * Missing files are skipped.
74
101
  */
75
- export async function loadNpmrcConfig(filePaths, env = process.env) {
102
+ export async function loadNpmrcConfig(files, env = process.env) {
76
103
  const merged = npmrcConfigFromEnv(env);
77
- for (const filePath of filePaths) {
104
+ const unreadable = [];
105
+ const origins = new Map();
106
+ // Keyed exactly as the config map above, so every spelling that resolves
107
+ // a value can also name the variable the user actually set.
108
+ for (const { key, variable } of npmConfigEnvEntries(env)) {
109
+ setEnvEntry(origins, key, { kind: 'env', variable });
110
+ }
111
+ for (const { path: filePath, optional = false } of files) {
78
112
  let content;
79
113
  try {
80
114
  content = await fs.readFile(filePath, 'utf8');
@@ -85,29 +119,81 @@ export async function loadNpmrcConfig(filePaths, env = process.env) {
85
119
  }
86
120
  // An unreadable .npmrc (e.g. bad permissions) must not silently drop
87
121
  // registry credentials — that would surface later as a baffling 401.
88
- throw new Error(`Unable to read npm configuration from '${filePath}'`, { cause: err });
122
+ // Optional files belong to another tool rather than to this project,
123
+ // so an unreadable one must not take the whole command down with it.
124
+ // It is still recorded so an authentication failure can say the file
125
+ // was skipped. Note this covers more than bad permissions on the file
126
+ // itself — an unsearchable parent directory lands here too — so the
127
+ // reported wording must not claim the file exists.
128
+ if (!optional) {
129
+ throw new Error(`Unable to read npm configuration from '${filePath}'`, { cause: err });
130
+ }
131
+ debug('skipping unreadable optional config %s: %s', filePath, err.message);
132
+ unreadable.push(filePath);
133
+ continue;
89
134
  }
90
135
  for (const [key, value] of parseNpmrc(content)) {
91
136
  if (!merged.has(key)) {
92
137
  merged.set(key, value);
138
+ origins.set(key, { kind: 'file', path: filePath });
139
+ }
140
+ }
141
+ }
142
+ return { config: merged, files: files.map(file => file.path), unreadable, origins };
143
+ }
144
+ /**
145
+ * The file pnpm keeps its global registry credentials in. pnpm 11 stopped
146
+ * writing them to `.npmrc`: `pnpm login` writes `auth.ini` in pnpm's global
147
+ * config directory instead, so a logged-in pnpm user looks unauthenticated
148
+ * to anything that only reads `.npmrc`.
149
+ *
150
+ * The directory resolution mirrors pnpm's own `getConfigDir` branch for
151
+ * branch. Note that `PNPM_HOME` is deliberately NOT consulted: pnpm uses it
152
+ * for the data and state directories, never for the config directory.
153
+ */
154
+ export function pnpmAuthIniPath(env, platform, homedir) {
155
+ const xdgConfigHome = env.XDG_CONFIG_HOME;
156
+ if (xdgConfigHome !== undefined && xdgConfigHome !== '') {
157
+ return path.join(xdgConfigHome, 'pnpm', 'auth.ini');
158
+ }
159
+ switch (platform) {
160
+ case 'darwin':
161
+ return path.join(homedir, 'Library', 'Preferences', 'pnpm', 'auth.ini');
162
+ case 'win32': {
163
+ const localAppData = env.LOCALAPPDATA;
164
+ if (localAppData !== undefined && localAppData !== '') {
165
+ return path.join(localAppData, 'pnpm', 'config', 'auth.ini');
93
166
  }
167
+ return path.join(homedir, '.config', 'pnpm', 'auth.ini');
94
168
  }
169
+ default:
170
+ return path.join(homedir, '.config', 'pnpm', 'auth.ini');
95
171
  }
96
- return merged;
97
172
  }
98
173
  /**
99
- * The `.npmrc` locations relevant to a project, in npm's precedence order:
174
+ * The configuration files relevant to a project, highest precedence first:
100
175
  * the directory the Checkly project lives in (the nearest project config,
101
- * which may be a workspace member), the workspace root, then the
102
- * user-level file. (npm's global and builtin configs are not consulted.)
103
- */
104
- export function defaultNpmrcPaths(workspaceRoot, homedir = os.homedir(), contextDir) {
105
- const paths = [
106
- ...(contextDir !== undefined ? [path.join(contextDir, '.npmrc')] : []),
107
- path.join(workspaceRoot, '.npmrc'),
108
- path.join(homedir, '.npmrc'),
176
+ * which may be a workspace member), the workspace root, then pnpm's global
177
+ * `auth.ini` and the user-level `.npmrc` in whichever order the project's
178
+ * package manager implies. (npm's global and builtin configs are not
179
+ * consulted.)
180
+ */
181
+ export function defaultNpmrcPaths(options) {
182
+ const { workspaceRoot, contextDir, homedir = os.homedir(), pnpmAuthFile, pnpmAuthFilePreferred } = options;
183
+ const userNpmrc = { path: path.join(homedir, '.npmrc') };
184
+ // Not a file this project chose to have, so an unreadable one is skipped
185
+ // rather than failing the command.
186
+ const authIni = pnpmAuthFile !== undefined
187
+ ? [{ path: pnpmAuthFile, optional: true }]
188
+ : [];
189
+ const files = [
190
+ ...(contextDir !== undefined ? [{ path: path.join(contextDir, '.npmrc') }] : []),
191
+ { path: path.join(workspaceRoot, '.npmrc') },
192
+ ...(pnpmAuthFilePreferred === true ? [...authIni, userNpmrc] : [userNpmrc, ...authIni]),
109
193
  ];
110
- return [...new Set(paths)];
194
+ // Dedupe by path, keeping the highest-precedence occurrence: `new Set` on
195
+ // the records themselves would compare by identity and never match.
196
+ return files.filter((file, index) => files.findIndex(other => other.path === file.path) === index);
111
197
  }
112
198
  function expandValue(key, value, env) {
113
199
  return value.replace(/\$\{([^}]+)\}/g, (_, varName) => {
@@ -118,55 +204,334 @@ function expandValue(key, value, env) {
118
204
  return envValue;
119
205
  });
120
206
  }
121
- function getExpanded(config, key, env) {
122
- const value = config.get(key) ?? config.get(key.toLowerCase());
123
- if (value === undefined) {
207
+ /**
208
+ * Looks a key up, falling back to its lowercased spelling, and reports
209
+ * which spelling actually matched. Callers that trace a value back to the
210
+ * file it came from need the matched key, not the one they asked for: only
211
+ * the former is a key in `LoadedNpmrcConfig`'s `origins`.
212
+ */
213
+ function getExpandedEntry(config, key, env) {
214
+ // npm matches config keys case-insensitively, so both spellings count.
215
+ for (const candidate of key === key.toLowerCase() ? [key] : [key, key.toLowerCase()]) {
216
+ const value = config.get(candidate);
217
+ if (value !== undefined) {
218
+ return { value: expandValue(candidate, value, env), key: candidate };
219
+ }
220
+ }
221
+ return undefined;
222
+ }
223
+ /**
224
+ * The same lookup for a credential, where a blank value counts as no value
225
+ * at all: an entry left empty rather than deleted — by a token rotation, or
226
+ * a logout that clears the line — must not shadow a credential that still
227
+ * works. npm and pnpm both test credential values for truthiness for the
228
+ * same reason.
229
+ *
230
+ * What it falls through to is another *key*: another credential kind at the
231
+ * same prefix, the other slash-spelling of the same dart, or a shallower
232
+ * nerf dart. That is as far as it goes, and
233
+ * deliberately so — it matches npm, whose `hasAuth` likewise only tries
234
+ * other credential kinds at the same or a shallower dart. It does not fall
235
+ * through to the other case spelling of the same key, which would reach
236
+ * past a blank into a different file.
237
+ *
238
+ * It does not reach the same key in a lower-precedence file: the merge in
239
+ * `loadNpmrcConfig` is first-writer-wins per key, so a blank `_authToken`
240
+ * in a project `.npmrc` still masks a working one in `~/.npmrc`. Skipping
241
+ * blanks during the merge would fix that, and was tried, but it makes this
242
+ * CLI send a credential npm and pnpm would not — they keep blank values
243
+ * read from files — so a project that deliberately blanks an entry to force
244
+ * anonymous access would have the developer's personal token sent instead.
245
+ * The mask covers only the spelling that is blank: the walk still probes
246
+ * the other slash-spelling of the same dart, whichever file supplies it,
247
+ * exactly as npm's walk does.
248
+ *
249
+ * Deliberately confined to credentials. A blank `registry` is a broken
250
+ * setting rather than an absent one, and treating it as absent would fall
251
+ * back to the public registry and send private package names to it. That
252
+ * holds for values read from files; a blank `npm_config_registry` never
253
+ * reaches the config at all, because `npmConfigEnvEntries` drops empty
254
+ * environment values at load, matching npm.
255
+ *
256
+ * A blank value and an unset `${VAR}` are deliberately not the same thing,
257
+ * here as in npm and pnpm: a blank value is an entry that exists and holds
258
+ * nothing, while an unset variable is a reference to something that does
259
+ * not exist — a typo, or a secret missing from the environment — which
260
+ * `expandValue` reports by name rather than papering over.
261
+ */
262
+ function getCredentialEntry(config, key, env) {
263
+ // `getExpandedEntry` already stops at the first spelling that exists, so
264
+ // mapping its blank result to undefined is the whole difference.
265
+ const entry = getExpandedEntry(config, key, env);
266
+ return entry?.value === '' ? undefined : entry;
267
+ }
268
+ /**
269
+ * The scope of a package name (`@acme/foo` → `@acme`), or undefined when
270
+ * the name is unscoped. A leading `@` with no slash is not a scope: it is a
271
+ * malformed name, and treating it as one would silently truncate it.
272
+ */
273
+ function packageScope(packageName) {
274
+ if (!packageName.startsWith('@')) {
124
275
  return undefined;
125
276
  }
126
- return expandValue(key, value, env);
277
+ const separator = packageName.indexOf('/');
278
+ return separator > 1 ? packageName.slice(0, separator) : undefined;
127
279
  }
128
280
  /**
129
- * Resolves the registry URL for a package name: the `@scope:registry` entry
130
- * if the package is scoped and one exists, the `registry` entry otherwise,
131
- * falling back to the public npm registry. Always ends with a slash.
281
+ * Resolves the registry for a package name: the `@scope:registry` entry if
282
+ * the package is scoped and one exists, the `registry` entry otherwise,
283
+ * falling back to the public npm registry.
132
284
  */
133
- export function resolveRegistryUrl(config, packageName, env = process.env) {
285
+ export function resolveRegistry(config, packageName, env = process.env) {
134
286
  let registry;
135
- if (packageName.startsWith('@')) {
136
- const scope = packageName.slice(0, packageName.indexOf('/'));
137
- registry = getExpanded(config, `${scope}:registry`, env);
138
- }
139
- registry ??= getExpanded(config, 'registry', env);
140
- registry ??= DEFAULT_REGISTRY_URL;
141
- return registry.endsWith('/') ? registry : `${registry}/`;
142
- }
143
- /**
144
- * Resolves the `Authorization` header value applicable to a URL, matching
145
- * npm's "nerf dart" scheme: credentials are keyed by the registry URL minus
146
- * its protocol (`//host/path/:_authToken=...`). The URL's path is walked
147
- * upward so credentials configured for a registry root also apply to
148
- * tarball URLs beneath it. Supports `_authToken` (Bearer), `_auth`
149
- * (pre-encoded Basic), and `username` + `_password` (base64-encoded, per
150
- * npm convention). Returns undefined when no credentials match.
151
- */
152
- export function resolveAuthHeader(config, url, env = process.env) {
153
- const parsed = new URL(url);
154
- const segments = parsed.pathname.split('/').filter(segment => segment !== '');
287
+ const scope = packageScope(packageName);
288
+ if (scope !== undefined) {
289
+ registry = getExpandedEntry(config, `${scope}:registry`, env);
290
+ // npm and pnpm both treat a blank `@scope:registry` as unset and use the
291
+ // global `registry`, whatever that points at — including the public
292
+ // registry, if that is what the project configured. Only a usable value
293
+ // counts as the fallback: with nothing to fall back to, the blank entry
294
+ // is kept, so the caller reports the key to fix instead of quietly
295
+ // assuming the public registry nobody configured.
296
+ if (registry?.value === '') {
297
+ // An unexpandable global entry is no more usable than a missing one,
298
+ // and reporting it would name a key that is not the one in use, so it
299
+ // counts as nothing to fall back to.
300
+ const fallback = attempt(() => getExpandedEntry(config, 'registry', env));
301
+ if (fallback.error !== undefined) {
302
+ debug('ignoring unusable global registry while %s is blank: %s', registry.key, fallback.error.message);
303
+ }
304
+ if (fallback.value !== undefined && fallback.value.value !== '') {
305
+ debug('%s is blank, falling back to the registry configured by %s', registry.key, fallback.value.key);
306
+ registry = fallback.value;
307
+ }
308
+ }
309
+ }
310
+ registry ??= getExpandedEntry(config, 'registry', env);
311
+ if (registry === undefined) {
312
+ return { usable: true, url: DEFAULT_REGISTRY_URL };
313
+ }
314
+ // The trailing slash goes on first: it is part of what a registry URL
315
+ // means here, and `//host/npm` composes differently from `//host/npm/`.
316
+ const url = registry.value.endsWith('/') ? registry.value : `${registry.value}/`;
317
+ return parseComposableUrl(url) !== undefined
318
+ ? { usable: true, url, key: registry.key }
319
+ : { usable: false, key: registry.key };
320
+ }
321
+ /**
322
+ * The nerf darts a URL's credentials may be keyed by, deepest path first:
323
+ * `https://host/a/b` yields `//host/a/b/`, `//host/a/`, `//host/`. The path
324
+ * is walked upward because a credential configured for a registry root
325
+ * also applies to everything served beneath it.
326
+ *
327
+ * Only the canonical slash-terminated spelling is produced;
328
+ * lookup-candidate construction in `resolveAuthHeader` expands each dart
329
+ * into both accepted spellings with `dartSpellings`.
330
+ */
331
+ function nerfDarts(url) {
332
+ const segments = url.pathname.split('/').filter(segment => segment !== '');
333
+ const darts = [];
155
334
  for (let depth = segments.length; depth >= 0; depth--) {
156
- const nerfDart = `//${parsed.host}/${segments.slice(0, depth).map(segment => `${segment}/`).join('')}`;
157
- const authToken = getExpanded(config, `${nerfDart}:_authToken`, env);
158
- if (authToken !== undefined) {
159
- return `Bearer ${authToken}`;
160
- }
161
- const auth = getExpanded(config, `${nerfDart}:_auth`, env);
162
- if (auth !== undefined) {
163
- return `Basic ${auth}`;
164
- }
165
- const username = getExpanded(config, `${nerfDart}:username`, env);
166
- const password = getExpanded(config, `${nerfDart}:_password`, env);
167
- if (username !== undefined && password !== undefined) {
168
- const decodedPassword = Buffer.from(password, 'base64').toString('utf8');
169
- return `Basic ${Buffer.from(`${username}:${decodedPassword}`, 'utf8').toString('base64')}`;
335
+ const prefix = segments.slice(0, depth).map(segment => `${segment}/`).join('');
336
+ darts.push(`//${url.host}/${prefix}`);
337
+ }
338
+ return darts;
339
+ }
340
+ /**
341
+ * Both accepted spellings of a nerf dart, in npm's probe order: the
342
+ * canonical slash-terminated form (`//host/a/`), then the slashless one
343
+ * (`//host/a`). npm probes both at every depth of its walk, and pnpm
344
+ * normalises the slashless spelling to the canonical one when it loads the
345
+ * config, so a hand-written `//host/a:_authToken` authenticates under both
346
+ * package managers and must do so here too.
347
+ *
348
+ * That parity argument is established for plain darts only. The expansion
349
+ * is nevertheless applied to every candidate spelling — the
350
+ * scope-qualified colon form and the path form included — because those
351
+ * spellings are already read more generously than npm reads them (see
352
+ * `resolveAuthHeader`), and tolerating the missing slash uniformly beats a
353
+ * per-form rule about which keys forgive it.
354
+ */
355
+ function dartSpellings(dart) {
356
+ return [dart, dart.slice(0, -1)];
357
+ }
358
+ /**
359
+ * The credentials configured under one key prefix, in npm's own order:
360
+ * `_authToken` (Bearer), then `username` + `_password` (base64-encoded, per
361
+ * npm convention), then `_auth` (pre-encoded Basic).
362
+ *
363
+ * A prefix is a nerf dart in either slash-spelling, optionally qualified by
364
+ * a scope (`//host/:@acme`). Both halves of a `username` + `_password` pair
365
+ * must live under the same prefix: pairing a scoped username with an
366
+ * unscoped password — or one spelling's username with the other spelling's
367
+ * password — would send a credential neither entry describes.
368
+ *
369
+ * pnpm's `tokenHelper` is deliberately absent from this list. It names an
370
+ * external command to run for a token, and running a command found in a
371
+ * config file is a decision well beyond resolving a credential. A user who
372
+ * has only that configured resolves no credential here and fails as if
373
+ * none were configured.
374
+ */
375
+ function credentialsAt(config, prefix, env, { skipUnexpandable = false } = {}) {
376
+ // `skipUnexpandable` is per key, not per prefix: one entry referencing a
377
+ // variable that is not set says nothing about the other credential kinds
378
+ // configured beside it.
379
+ const entry = (kind) => {
380
+ const key = `${prefix}:${kind}`;
381
+ try {
382
+ return getCredentialEntry(config, key, env);
383
+ }
384
+ catch (err) {
385
+ if (skipUnexpandable && err instanceof NpmrcEnvVarError) {
386
+ debug('skipping credential %s: %s', key, err.message);
387
+ return undefined;
388
+ }
389
+ throw err;
390
+ }
391
+ };
392
+ const authToken = entry('_authToken');
393
+ if (authToken !== undefined) {
394
+ return { header: `Bearer ${authToken.value}`, keys: [authToken.key] };
395
+ }
396
+ // The pair outranks `_auth`, which is npm's order (`getCredentialsByURI`
397
+ // tries `_authToken`, then `username` + `_password`, then `_auth`) and
398
+ // matters when a legacy `_auth` line has been left behind beside a pair
399
+ // written later: npm authenticates with the pair, and so must this.
400
+ //
401
+ // Neither half is worth failing over alone — a leftover `username` from a
402
+ // setup that moved to a token must not abort a download that a credential
403
+ // further along the walk would have authenticated. Whether a half is
404
+ // usable is only knowable after expanding it, since a `${VAR}` set to the
405
+ // empty string is as absent as a literal blank, so both are attempted and
406
+ // an unexpandable one is held rather than thrown.
407
+ const username = attempt(() => entry('username'));
408
+ const password = attempt(() => entry('_password'));
409
+ if (username.value !== undefined && password.value !== undefined) {
410
+ const decodedPassword = Buffer.from(password.value.value, 'base64').toString('utf8');
411
+ const encoded = Buffer.from(`${username.value.value}:${decodedPassword}`, 'utf8').toString('base64');
412
+ return { header: `Basic ${encoded}`, keys: [username.value.key, password.value.key] };
413
+ }
414
+ // Both halves are here in some form, so the pair was meant and a variable
415
+ // is genuinely missing — worth naming rather than falling through to a
416
+ // credential the user did not intend to use.
417
+ const unexpandable = username.error ?? password.error;
418
+ if (unexpandable !== undefined) {
419
+ if (found(username) && found(password)) {
420
+ throw unexpandable;
421
+ }
422
+ // Dropped because its other half never materialised, so no pair was
423
+ // ever going to form here. Traceable rather than silent: "the CLI
424
+ // ignored my entry" is the report this explains.
425
+ debug('ignoring half a credential pair at %s: %s', prefix, unexpandable.message);
426
+ }
427
+ const auth = entry('_auth');
428
+ if (auth !== undefined) {
429
+ return { header: `Basic ${auth.value}`, keys: [auth.key] };
430
+ }
431
+ return undefined;
432
+ }
433
+ /** Whether a held lookup produced anything at all, usable or not. */
434
+ function found(attempted) {
435
+ return attempted.value !== undefined || attempted.error !== undefined;
436
+ }
437
+ /**
438
+ * Runs a lookup, holding an `NpmrcEnvVarError` instead of raising it so the
439
+ * caller can decide whether the key it names was ever going to be used.
440
+ */
441
+ function attempt(lookup) {
442
+ try {
443
+ return { value: lookup() };
444
+ }
445
+ catch (err) {
446
+ if (err instanceof NpmrcEnvVarError) {
447
+ return { error: err };
448
+ }
449
+ throw err;
450
+ }
451
+ }
452
+ /**
453
+ * Resolves the `Authorization` header applicable to a URL, matching npm's
454
+ * "nerf dart" scheme: credentials are keyed by the registry URL minus its
455
+ * protocol (`//host/path/:_authToken=...`). Every dart is probed in both
456
+ * slash-spellings, canonical first at each depth — `dartSpellings` says
457
+ * why both are honored. npm's walk agrees at every depth above the
458
+ * request's own; at that deepest depth npm probes only the URL's literal
459
+ * spelling, a difference observable only with a key at exactly the
460
+ * request's full path — not a key anything writes.
461
+ *
462
+ * `pnpm login --scope=@acme` writes a scope-qualified key instead
463
+ * (`//host/:@acme:_authToken=...`, or equivalently `//host/@acme/:_authToken`),
464
+ * so the package being downloaded decides which keys apply. Mirroring pnpm,
465
+ * every scoped key is tried before any unscoped one — a shallow scoped
466
+ * credential outranks a deeper unscoped one, rather than the two being
467
+ * interleaved by depth. An unscoped package never falls back to a scoped
468
+ * key: a scoped token belongs to one organisation by construction, and
469
+ * reusing it elsewhere would send that organisation's credential somewhere
470
+ * it was never meant to go.
471
+ *
472
+ * Scope-qualified keys are honored for every project, not only pnpm ones:
473
+ * npm, yarn, bun and pnpm 10 ignore the spelling entirely, but writing one
474
+ * is an unambiguous statement of which token that scope should use, and
475
+ * refusing to read it would leave a user whose only login is
476
+ * `pnpm login --scope` unauthenticated for exactly the packages the key
477
+ * names.
478
+ *
479
+ * Returns undefined when no credentials match.
480
+ */
481
+ export function resolveAuthHeader(config, url, packageName, env = process.env) {
482
+ // The same rule the request itself has to pass. Callers check it first,
483
+ // so this is belt and braces — but the safe answer for a URL that could
484
+ // not be validated is no credentials rather than a thrown parse error.
485
+ const parsed = parseFetchableUrl(url);
486
+ if (parsed === undefined) {
487
+ return undefined;
488
+ }
489
+ const canonicalDarts = nerfDarts(parsed);
490
+ const darts = canonicalDarts.flatMap(dartSpellings);
491
+ const scope = packageScope(packageName);
492
+ const scoped = scope !== undefined ? darts.map(dart => `${dart}:${scope}`) : [];
493
+ for (const prefix of [...scoped, ...darts]) {
494
+ const credentials = credentialsAt(config, prefix, env);
495
+ if (credentials !== undefined) {
496
+ return credentials;
497
+ }
498
+ }
499
+ // pnpm accepts a second spelling, `//host/@acme/:_authToken`, which it
500
+ // binds to the registry the scope segment was stripped from rather than to
501
+ // the path — so it covers every `@acme` package on that host, including
502
+ // tarball URLs that never mention the scope at that depth, as GitHub
503
+ // Packages' `/download/@acme/...` URLs do not.
504
+ //
505
+ // It is tried last rather than with the colon form, which is where pnpm
506
+ // ranks it. The spelling is indistinguishable from an ordinary nerf dart
507
+ // for the path `/@acme/`, which is exactly how npm, yarn and bun read it,
508
+ // so giving it pnpm's rank would let it outrank a deeper unscoped key that
509
+ // authenticates a working setup today.
510
+ //
511
+ // Tried last it can only supply a credential where nothing else matched,
512
+ // and an unexpandable one is skipped rather than fatal — but only when
513
+ // this walk is the sole reading of that key. For a URL whose path does
514
+ // contain the scope, such as the `${registry}/@acme/foo/-/…` this CLI
515
+ // composes, `//host/@acme/` is an ordinary nerf dart the unscoped walk
516
+ // above already visited, and there it is a key that plainly applies to
517
+ // this request, so a variable missing from it is fatal like any other.
518
+ // The tolerance is for the other shape — GitHub Packages' `/download/…`,
519
+ // or a CDN URL — where the key names a location this request never
520
+ // touches and must not abort a download that would otherwise go out.
521
+ //
522
+ // A skip is only visible on the debug channel, so a download that then
523
+ // fails to authenticate reports finding no credentials at all.
524
+ // Composed from the canonical darts alone: the concatenation relies on
525
+ // the dart's trailing slash — a slashless dart would yield `//host@acme/`,
526
+ // a key nothing writes. The composed key then gets both of its own
527
+ // spellings, like every other candidate.
528
+ const pathForm = scope !== undefined
529
+ ? canonicalDarts.flatMap(dart => dartSpellings(`${dart}${scope}/`))
530
+ : [];
531
+ for (const prefix of pathForm) {
532
+ const credentials = credentialsAt(config, prefix, env, { skipUnexpandable: true });
533
+ if (credentials !== undefined) {
534
+ return credentials;
170
535
  }
171
536
  }
172
537
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"npmrc.js","sourceRoot":"","sources":["../../../src/services/embedded-packages/npmrc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AASjE,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAa,GAAW,EAAE,OAAe;QACvC,KAAK,CACH,yBAAyB,GAAG,uCAAuC;cACjE,KAAK,OAAO,qBAAqB,CACpC,CAAA;QACD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAA;IAChC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAE,OAAe;IACzC,MAAM,MAAM,GAAgB,IAAI,GAAG,EAAE,CAAA;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