@uipath/cli 1.206.0-preview.303 → 1.207.0-preview.305

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 (69) hide show
  1. package/README.md +48 -0
  2. package/dist/{browser-strategy-p5fhwxqj.js → browser-strategy-5rfwnk5q.js} +1 -1
  3. package/dist/cli-10857d67.js +28 -0
  4. package/dist/cliInstaller-3dxg6fbd.js +23 -0
  5. package/dist/{contentStore-w35jnkxk.js → contentStore-z3t1yt3n.js} +7 -6
  6. package/dist/{environmentInfo-nz3126q4.js → environmentInfo-dyhpheza.js} +6 -6
  7. package/dist/{feedbackPrompts-bx209g5v.js → feedbackPrompts-fc66gq0p.js} +3 -3
  8. package/dist/forcedUpdate-5hd8cp9x.js +21 -0
  9. package/dist/{handlers-jjwt24f2.js → handlers-rg3d62gb.js} +13 -9
  10. package/dist/index-2f6vv7yr.js +81 -0
  11. package/dist/{index-v3vx48v0.js → index-2g332j2f.js} +8 -12
  12. package/dist/index-319vtrwd.js +264 -0
  13. package/dist/{index-jqt7p70w.js → index-3vkb4j13.js} +26 -17
  14. package/dist/index-5j78gm9c.js +41 -0
  15. package/dist/index-5ygg5mrs.js +1272 -0
  16. package/dist/{index-99emfvtm.js → index-65pyx6c9.js} +4 -2
  17. package/dist/{index-rr5hdtcy.js → index-81197qe5.js} +15 -17
  18. package/dist/{index-2mm750yx.js → index-8n0z4r6f.js} +69 -13
  19. package/dist/{index-8zhmg5tz.js → index-8pk6n4t9.js} +2 -2
  20. package/dist/{index-cef72dzy.js → index-9v7334md.js} +1 -1
  21. package/dist/{index-nsrrst23.js → index-ack311y7.js} +12 -2
  22. package/dist/{index-2n2vr5w5.js → index-dt6mjnkf.js} +39 -57
  23. package/dist/{index-y7d0cth0.js → index-e82sznr2.js} +7 -7
  24. package/dist/index-ej6eeger.js +23 -0
  25. package/dist/index-evcsjfyy.js +248 -0
  26. package/dist/{index-bxc30q35.js → index-gk5pc8xr.js} +2 -2
  27. package/dist/{index-7q9kcs3w.js → index-h2ctqv68.js} +14 -5
  28. package/dist/index-jk7em40j.js +37 -0
  29. package/dist/{index-vhn8f5d2.js → index-kdr4xvby.js} +5 -5
  30. package/dist/{index-y7j0ant5.js → index-kmacaa53.js} +2130 -834
  31. package/dist/{index-ckp8r4dh.js → index-mb62swmp.js} +2 -2
  32. package/dist/{index-dxfqvgqg.js → index-md27nny8.js} +7 -10
  33. package/dist/{index-85fa5z1t.js → index-nex3q8cg.js} +2 -2
  34. package/dist/index-nyx7fh45.js +331 -0
  35. package/dist/index-nzfpbep9.js +14 -0
  36. package/dist/{index-z070caqq.js → index-p64w2wrt.js} +30 -8
  37. package/dist/{index-0pan2k7w.js → index-t6hrzpm7.js} +30 -14
  38. package/dist/index-v7yphxb8.js +118 -0
  39. package/dist/index-vrfbee4d.js +340 -0
  40. package/dist/{index-69mcde3n.js → index-xw81b1gn.js} +196 -81
  41. package/dist/{index-wg3cne7n.js → index-xxms6rt8.js} +24 -5
  42. package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
  43. package/dist/{index-6wzpac34.js → index-z3q16ts7.js} +81 -58
  44. package/dist/{index-fdztq951.js → index-zhp702kh.js} +393 -82
  45. package/dist/index.js +23 -18
  46. package/dist/{install-kgcwdbqs.js → install-h76qyy1e.js} +6 -7
  47. package/dist/{node-strategy-p1n8wr5s.js → node-strategy-9t0ttffv.js} +2 -2
  48. package/dist/{project-context-caht70an.js → project-context-rc4ghykm.js} +13 -5
  49. package/dist/{prompt-tvxwpvxh.js → prompt-66bnttv7.js} +5 -5
  50. package/dist/{server-pge2gheb.js → server-pxfn9w9m.js} +5 -5
  51. package/dist/{skillCatalog-b3z68z4n.js → skillCatalog-7gh14b4s.js} +8 -7
  52. package/dist/skillsService-wz3c21qb.js +35 -0
  53. package/dist/{telemetry-drain-rt346cfz.js → telemetry-drain-8qr5tzmf.js} +2 -2
  54. package/dist/tree-fk9gwh4v.js +16 -0
  55. package/dist/updateService-ybs9274t.js +377 -0
  56. package/dist/updateService.cli-xtqp78g7.js +15 -0
  57. package/dist/updateService.skills-pgst1fyj.js +27 -0
  58. package/dist/updateService.tools-m58m2fbt.js +19 -0
  59. package/package.json +2 -2
  60. package/dist/cli-0p8c9t5r.js +0 -23
  61. package/dist/index-1n5v3afn.js +0 -45
  62. package/dist/index-3qp7d08f.js +0 -240
  63. package/dist/index-3zf0ywpb.js +0 -95
  64. package/dist/index-753mncpq.js +0 -271
  65. package/dist/skillsService-qzzqacmg.js +0 -29
  66. package/dist/tree-4dhk82fh.js +0 -17
  67. package/dist/updateService-b579ys6m.js +0 -522
  68. package/dist/updateService.skills-teejc562.js +0 -22
  69. package/dist/updateService.tools-3zfct9yk.js +0 -16
@@ -0,0 +1,15 @@
1
+ import {
2
+ checkCliVersion2,
3
+ isVersionPublished2
4
+ } from "./index-2f6vv7yr.js";
5
+ import"./index-v7yphxb8.js";
6
+ import"./index-ej6eeger.js";
7
+ import"./index-xw81b1gn.js";
8
+ import"./index-zhp702kh.js";
9
+ import"./index-p64w2wrt.js";
10
+ export {
11
+ checkCliVersion2 as checkCliVersion,
12
+ isVersionPublished2 as isVersionPublished
13
+ };
14
+
15
+ //# debugId=6B9AE7CB4EFDE32464756E2164756E21
@@ -0,0 +1,27 @@
1
+ import {
2
+ runSkillsUpdate2
3
+ } from "./index-t6hrzpm7.js";
4
+ import"./index-3vkb4j13.js";
5
+ import"./index-9v7334md.js";
6
+ import"./index-md27nny8.js";
7
+ import"./index-z3q16ts7.js";
8
+ import"./index-5j0bfd3e.js";
9
+ import"./index-xxms6rt8.js";
10
+ import"./index-evcsjfyy.js";
11
+ import"./index-2g332j2f.js";
12
+ import"./index-5ygg5mrs.js";
13
+ import"./index-v7yphxb8.js";
14
+ import"./index-ej6eeger.js";
15
+ import"./index-mb62swmp.js";
16
+ import"./index-jk7em40j.js";
17
+ import"./index-xw81b1gn.js";
18
+ import"./index-zhp702kh.js";
19
+ import"./index-8n0z4r6f.js";
20
+ import"./index-5gce5wfd.js";
21
+ import"./index-p64w2wrt.js";
22
+ import"./index-65pyx6c9.js";
23
+ export {
24
+ runSkillsUpdate2 as runSkillsUpdate
25
+ };
26
+
27
+ //# debugId=0CA6ACA5E69454D964756E2164756E21
@@ -0,0 +1,19 @@
1
+ import {
2
+ TOOLS_UPDATE_PHASES2,
3
+ isListedTool2,
4
+ runToolsUpdate2,
5
+ readToolVersionsOnDisk2
6
+ } from "./index-vrfbee4d.js";
7
+ import"./index-dt6mjnkf.js";
8
+ import"./index-ej6eeger.js";
9
+ import"./index-xw81b1gn.js";
10
+ import"./index-zhp702kh.js";
11
+ import"./index-p64w2wrt.js";
12
+ export {
13
+ TOOLS_UPDATE_PHASES2 as TOOLS_UPDATE_PHASES,
14
+ isListedTool2 as isListedTool,
15
+ readToolVersionsOnDisk2 as readToolVersionsOnDisk,
16
+ runToolsUpdate2 as runToolsUpdate
17
+ };
18
+
19
+ //# debugId=9F7CF9AD6FE57DBB64756E2164756E21
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uipath/cli",
3
3
  "author": "UiPath",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
- "version": "1.206.0-preview.303",
5
+ "version": "1.207.0-preview.305",
6
6
  "description": "Cross platform CLI for UiPath",
7
7
  "repository": {
8
8
  "type": "git",
@@ -36,5 +36,5 @@
36
36
  "kerberos": "7.0.0",
37
37
  "node-expose-sspi": "0.1.60"
38
38
  },
39
- "gitHead": "7d17b8a3c1a50892d42c9302087abc8307b04409"
39
+ "gitHead": "1600aa89255c37c1b8bc68d9882c3395c1d5bff4"
40
40
  }
@@ -1,23 +0,0 @@
1
- import"./index-z070caqq.js";
2
- import"./index-fdztq951.js";
3
- import {
4
- runNode
5
- } from "./index-y7j0ant5.js";
6
- import"./index-753mncpq.js";
7
- import"./index-vhn8f5d2.js";
8
- import"./index-99emfvtm.js";
9
- import"./index-2mm750yx.js";
10
- import"./index-8zhmg5tz.js";
11
- import"./index-v3vx48v0.js";
12
- import"./index-3zf0ywpb.js";
13
- import"./index-69mcde3n.js";
14
- import"./index-2n2vr5w5.js";
15
- import"./index-1n5v3afn.js";
16
- import"./index-wg3cne7n.js";
17
- import"./index-ckp8r4dh.js";
18
- import"./index-7q9kcs3w.js";
19
- export {
20
- runNode as run
21
- };
22
-
23
- //# debugId=D5CE6D3967BC57AC64756E2164756E21
@@ -1,45 +0,0 @@
1
- import {
2
- VALID_CHANNELS,
3
- getCachedConfig
4
- } from "./index-753mncpq.js";
5
- import {
6
- package_default
7
- } from "./index-85fa5z1t.js";
8
-
9
- // src/services/channel.ts
10
- function resolveUpdateChannel(cliVersion = package_default.version) {
11
- return configChannel() ?? versionChannel(cliVersion) ?? "stable";
12
- }
13
- function resolveRuntimeChannel(cliVersion = package_default.version) {
14
- return versionChannel(cliVersion) ?? configChannel() ?? "stable";
15
- }
16
- function isPreviewVersion(cliVersion = package_default.version) {
17
- return parsePrereleaseTag(cliVersion) !== undefined;
18
- }
19
- function channelForVersion(version) {
20
- return parsePrereleaseTag(version) === undefined ? "stable" : versionChannel(version);
21
- }
22
- function configChannel() {
23
- const fileChannel = getCachedConfig().core?.updateChannel;
24
- if (fileChannel && VALID_CHANNELS.has(fileChannel)) {
25
- return fileChannel;
26
- }
27
- return;
28
- }
29
- function versionChannel(cliVersion) {
30
- const prerelease = parsePrereleaseTag(cliVersion);
31
- if (prerelease && VALID_CHANNELS.has(prerelease)) {
32
- return prerelease;
33
- }
34
- return;
35
- }
36
- function parsePrereleaseTag(version) {
37
- const dashIdx = version.indexOf("-");
38
- if (dashIdx === -1)
39
- return;
40
- return version.slice(dashIdx + 1).split(".")[0];
41
- }
42
-
43
- export { resolveUpdateChannel, resolveRuntimeChannel, isPreviewVersion, channelForVersion };
44
-
45
- //# debugId=FCA91512C4C316F964756E2164756E21
@@ -1,240 +0,0 @@
1
- import {
2
- getFileSystem2
3
- } from "./index-z070caqq.js";
4
- import {
5
- catchError,
6
- logger
7
- } from "./index-fdztq951.js";
8
- import {
9
- compareSemver,
10
- resolveToolPackageName,
11
- getEffectiveRegistry,
12
- toolService
13
- } from "./index-69mcde3n.js";
14
- import {
15
- pinnedPrefix,
16
- formatVersionPin
17
- } from "./index-753mncpq.js";
18
- import {
19
- getInstalledTools,
20
- describeSearchedRegistry,
21
- describeMissingLine,
22
- describeDowngradeReason,
23
- recordToolUpdateDate
24
- } from "./index-2n2vr5w5.js";
25
-
26
- // src/services/updateService.tools.ts
27
- var TOOLS_UPDATE_PHASES2 = {
28
- Checking: "checking",
29
- Installing: "installing"
30
- };
31
- function formatTargetLine(prefix) {
32
- const trimmed = prefix.endsWith(".") ? prefix.slice(0, -1) : prefix;
33
- return `${trimmed}.x`;
34
- }
35
- function buildToolUpdatePolicy(opts, cliVersionPrefix) {
36
- const pin = opts.pin ?? null;
37
- if (pin) {
38
- const targetLine = formatTargetLine(pinnedPrefix(pin));
39
- const renderedPin = formatVersionPin(pin);
40
- return {
41
- resolvedBy: "core.version",
42
- targetLine,
43
- reason: `Using core.version ${renderedPin}; tools resolve within ${targetLine}.`
44
- };
45
- }
46
- const targetLine = formatTargetLine(cliVersionPrefix);
47
- return {
48
- resolvedBy: "cli-version",
49
- targetLine,
50
- reason: `Using CLI version line ${targetLine}; tools resolve within ${targetLine}.`
51
- };
52
- }
53
- function withPolicy(entry, policy) {
54
- const result = {
55
- ...entry,
56
- resolvedBy: policy.resolvedBy,
57
- reason: policy.reason
58
- };
59
- if (policy.targetLine !== undefined) {
60
- result.targetLine = policy.targetLine;
61
- }
62
- return result;
63
- }
64
- async function runToolsUpdate2(opts, state) {
65
- const installed = getInstalledTools(state);
66
- if (installed.length === 0) {
67
- return {
68
- entries: [],
69
- fatal: {
70
- code: "NO_TOOLS_INSTALLED",
71
- result: "ConfigError",
72
- message: "No tools installed.",
73
- instructions: "Use 'uip tools install <package>' to install a tool."
74
- }
75
- };
76
- }
77
- const [locationError, location] = await catchError(state.resolveInstallPath());
78
- if (locationError) {
79
- return {
80
- entries: [],
81
- fatal: {
82
- code: "LOCATION_ERROR",
83
- result: "ConfigError",
84
- message: locationError.message,
85
- instructions: "Please ensure the CLI is installed correctly."
86
- }
87
- };
88
- }
89
- const resolvedName = opts.name ? resolveToolPackageName(opts.name) : undefined;
90
- const toUpdate = resolvedName ? installed.filter((t) => t.name === resolvedName || `@uipath/${t.name}` === resolvedName) : installed;
91
- if (resolvedName && toUpdate.length === 0) {
92
- return {
93
- entries: [],
94
- fatal: {
95
- code: "NAME_NOT_INSTALLED",
96
- result: "ValidationError",
97
- message: `Tool '${opts.name}' is not installed.`,
98
- instructions: "Use 'uip tools list' to see installed tools."
99
- }
100
- };
101
- }
102
- const entries = [];
103
- const previousVersions = new Map(toUpdate.map((t) => [t.name, t.version]));
104
- const total = toUpdate.length;
105
- const pin = opts.pin ?? null;
106
- const cliVersionPrefix = opts.cliVersionPrefix ?? state.getCliVersionPrefix();
107
- const policy = buildToolUpdatePolicy(opts, cliVersionPrefix);
108
- let index = 0;
109
- for (const tool of toUpdate) {
110
- index++;
111
- const fullName = `@uipath/${tool.name}`;
112
- opts.onProgress?.({
113
- current: index,
114
- total,
115
- tool: tool.name,
116
- phase: TOOLS_UPDATE_PHASES2.Checking
117
- });
118
- const [updateError] = await catchError((async () => {
119
- const prefix = pin ? pinnedPrefix(pin) : cliVersionPrefix;
120
- const targetVersion = await toolService.searchLatestVersion(fullName, prefix, { channel: opts.channel });
121
- if (!targetVersion) {
122
- const searched = await getEffectiveRegistry(fullName);
123
- entries.push(withPolicy({
124
- name: tool.name,
125
- status: "failed",
126
- from: tool.version,
127
- error: pin ? describeMissingLine({
128
- pin,
129
- origin: opts.pinOrigin,
130
- targetLine: formatTargetLine(prefix),
131
- searched
132
- }) : `No compatible ${opts.channel} version found in the CLI's ${formatTargetLine(prefix)} line${describeSearchedRegistry(searched)}`,
133
- errorKind: pin ? "pinned-line-missing" : undefined,
134
- ...searched ? { searchedRegistry: searched } : {}
135
- }, policy));
136
- return;
137
- }
138
- const currentVersion = tool.version;
139
- if (currentVersion === targetVersion) {
140
- entries.push(withPolicy({
141
- name: tool.name,
142
- status: "up-to-date",
143
- from: currentVersion,
144
- to: currentVersion
145
- }, policy));
146
- return;
147
- }
148
- if (pin && compareSemver(targetVersion, currentVersion) < 0) {
149
- logger.info(`Downgrading ${tool.name} ${currentVersion} → ${targetVersion} to match ${describeDowngradeReason(opts.pinOrigin)}.`);
150
- }
151
- if (opts.dryRun) {
152
- entries.push(withPolicy({
153
- name: tool.name,
154
- status: "updated",
155
- from: currentVersion,
156
- to: targetVersion
157
- }, policy));
158
- return;
159
- }
160
- opts.onProgress?.({
161
- current: index,
162
- total,
163
- tool: tool.name,
164
- phase: TOOLS_UPDATE_PHASES2.Installing
165
- });
166
- const packageName = `${fullName}@${targetVersion}`;
167
- await toolService.install(packageName, location.path, {
168
- global: location.global,
169
- prefix: location.prefix
170
- });
171
- })());
172
- if (updateError) {
173
- entries.push(withPolicy({
174
- name: tool.name,
175
- status: "failed",
176
- from: previousVersions.get(tool.name),
177
- error: updateError.message
178
- }, policy));
179
- }
180
- }
181
- if (opts.dryRun) {
182
- return { entries, instructions: policy.reason };
183
- }
184
- const fs = getFileSystem2();
185
- const updatedVersions = new Map;
186
- for (const dir of state.toolsDirs) {
187
- for (const tool of toUpdate) {
188
- const name = tool.name;
189
- if (updatedVersions.has(name))
190
- continue;
191
- const pkgPath = fs.path.join(dir, name, "package.json");
192
- if (!await fs.exists(pkgPath))
193
- continue;
194
- const [readError, raw] = await catchError(fs.readFile(pkgPath, "utf-8"));
195
- if (readError || !raw)
196
- continue;
197
- const [parseError, pkg] = catchError(() => JSON.parse(raw));
198
- if (parseError || !pkg.version)
199
- continue;
200
- updatedVersions.set(name, pkg.version);
201
- }
202
- }
203
- const recordedNames = new Set(entries.map((r) => r.name));
204
- for (const tool of toUpdate) {
205
- const name = tool.name;
206
- if (recordedNames.has(name))
207
- continue;
208
- const from = previousVersions.get(name) ?? "unknown";
209
- const to = updatedVersions.get(name) ?? from;
210
- if (from === to) {
211
- entries.push(withPolicy({
212
- name,
213
- status: "failed",
214
- from,
215
- to,
216
- error: `Version unchanged after install (still ${from})`
217
- }, policy));
218
- } else {
219
- entries.push(withPolicy({ name, status: "updated", from, to }, policy));
220
- }
221
- }
222
- const failed = entries.filter((r) => r.status === "failed");
223
- if (failed.length > 0) {
224
- logger.debug(`Failed to update ${failed.length} tool(s): ${failed.map((f) => `${f.name}: ${f.error}`).join("; ")}`);
225
- }
226
- for (const entry of entries) {
227
- if (entry.status !== "updated" && entry.status !== "up-to-date") {
228
- continue;
229
- }
230
- const [markerErr, persisted] = await catchError(recordToolUpdateDate(entry.name));
231
- if (markerErr || !persisted) {
232
- logger.debug(`Could not persist the daily update marker for '${entry.name}'${markerErr ? `: ${markerErr.message}` : ""}`);
233
- }
234
- }
235
- return { entries, instructions: policy.reason };
236
- }
237
-
238
- export { TOOLS_UPDATE_PHASES2, runToolsUpdate2 };
239
-
240
- //# debugId=6B9F7D1C7C2243DB64756E2164756E21
@@ -1,95 +0,0 @@
1
- import {
2
- logger
3
- } from "./index-fdztq951.js";
4
-
5
- // src/system-ca.ts
6
- function installSystemCaTrust(tlsModule) {
7
- const getCertificates = tlsModule.getCACertificates;
8
- const setDefaultCertificates = tlsModule.setDefaultCACertificates;
9
- if (typeof getCertificates !== "function" || typeof setDefaultCertificates !== "function") {
10
- return "unsupported";
11
- }
12
- try {
13
- const system = getCertificates.call(tlsModule, "system");
14
- if (!Array.isArray(system) || system.length === 0) {
15
- return "empty";
16
- }
17
- const current = getCertificates.call(tlsModule, "default") ?? [];
18
- setDefaultCertificates.call(tlsModule, [...current, ...system]);
19
- return "applied";
20
- } catch {
21
- return "error";
22
- }
23
- }
24
- var loadNodeTls = async () => await import("node:tls");
25
- var cachedResult = "deferred";
26
- var inFlight;
27
- async function ensureSystemCaTrustAsync(loadTls = loadNodeTls) {
28
- if (cachedResult !== "deferred") {
29
- return cachedResult;
30
- }
31
- inFlight ??= (async () => {
32
- cachedResult = installSystemCaTrust(await loadTls());
33
- logger.debug(`OS certificate-store trust: ${cachedResult}`);
34
- return cachedResult;
35
- })();
36
- return inFlight;
37
- }
38
- var NODE_USE_SYSTEM_CA_ENV = "NODE_USE_SYSTEM_CA";
39
- function withSystemCaEnv(env = process.env) {
40
- const alreadySet = Object.keys(env).some((key) => process.platform === "win32" ? key.toUpperCase() === NODE_USE_SYSTEM_CA_ENV : key === NODE_USE_SYSTEM_CA_ENV);
41
- return alreadySet ? env : { ...env, [NODE_USE_SYSTEM_CA_ENV]: "1" };
42
- }
43
-
44
- // src/services/childEnv.ts
45
- function mergeEnvCaseInsensitive(base, overrides) {
46
- const overridden = new Set(Object.keys(overrides).map((key) => key.toLowerCase()));
47
- const merged = {};
48
- for (const [key, value] of Object.entries(base)) {
49
- if (!overridden.has(key.toLowerCase()))
50
- merged[key] = value;
51
- }
52
- return { ...merged, ...overrides };
53
- }
54
-
55
- // src/services/registryTls.ts
56
- var REGISTRY_TLS_INSTRUCTIONS = "The registry's TLS certificate is not trusted. This is usually a " + "corporate proxy that re-signs HTTPS with its own root CA. On Node " + "22.19+ / 24.6+ uip already lets npm trust the OS certificate store, so " + "either that CA is not in the OS store or this Node is older: upgrade " + "Node, or point NODE_EXTRA_CA_CERTS (or `cafile` in .npmrc) at the CA's " + "PEM file. Then re-run.";
57
- var TLS_TRUST_CODES = new Set([
58
- "SELF_SIGNED_CERT_IN_CHAIN",
59
- "DEPTH_ZERO_SELF_SIGNED_CERT",
60
- "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
61
- "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
62
- "UNABLE_TO_GET_ISSUER_CERT",
63
- "CERT_UNTRUSTED"
64
- ]);
65
- var NPM_FETCH_RETRY_ENV = {
66
- npm_config_fetch_retries: "2",
67
- npm_config_fetch_retry_mintimeout: "2000",
68
- npm_config_fetch_retry_maxtimeout: "8000"
69
- };
70
-
71
- class RegistryTlsError extends Error {
72
- code;
73
- instructions = REGISTRY_TLS_INSTRUCTIONS;
74
- constructor(context, code) {
75
- super(`${context}: the registry's TLS certificate is not trusted (${code})`);
76
- this.code = code;
77
- this.name = "RegistryTlsError";
78
- }
79
- }
80
- function isRegistryTlsError(error) {
81
- return error instanceof Error && error.name === "RegistryTlsError" && typeof error.code === "string";
82
- }
83
- function npmTlsErrorCode(stderr, stdout) {
84
- const pattern = /(?:npm (?:error|ERR!) code |"code":\s*")([A-Z0-9_]+)/g;
85
- for (const match of `${stderr}
86
- ${stdout}`.matchAll(pattern)) {
87
- if (TLS_TRUST_CODES.has(match[1]))
88
- return match[1];
89
- }
90
- return;
91
- }
92
-
93
- export { ensureSystemCaTrustAsync, withSystemCaEnv, mergeEnvCaseInsensitive, REGISTRY_TLS_INSTRUCTIONS, NPM_FETCH_RETRY_ENV, RegistryTlsError, isRegistryTlsError, npmTlsErrorCode };
94
-
95
- //# debugId=07F73CD766A13C9164756E2164756E21