@uipath/cli 1.206.0-preview.306 → 1.207.0-preview.307
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/{browser-strategy-p5fhwxqj.js → browser-strategy-5rfwnk5q.js} +1 -1
- package/dist/cli-1jpx8z2w.js +28 -0
- package/dist/cliInstaller-3dxg6fbd.js +23 -0
- package/dist/{contentStore-34hat2cd.js → contentStore-5p86z7qq.js} +7 -6
- package/dist/{environmentInfo-tr3pt6x1.js → environmentInfo-wp5jthdh.js} +6 -6
- package/dist/{feedbackPrompts-bx209g5v.js → feedbackPrompts-fc66gq0p.js} +3 -3
- package/dist/forcedUpdate-fm57455c.js +21 -0
- package/dist/{handlers-jjwt24f2.js → handlers-rg3d62gb.js} +13 -9
- package/dist/index-2f6vv7yr.js +81 -0
- package/dist/index-319vtrwd.js +264 -0
- package/dist/index-33wtbzyw.js +248 -0
- package/dist/index-5dbc9t09.js +41 -0
- package/dist/index-5ygg5mrs.js +1272 -0
- package/dist/{index-99emfvtm.js → index-65pyx6c9.js} +4 -2
- package/dist/{index-rr5hdtcy.js → index-81197qe5.js} +15 -17
- package/dist/{index-2mm750yx.js → index-8n0z4r6f.js} +69 -13
- package/dist/{index-8zhmg5tz.js → index-8pk6n4t9.js} +2 -2
- package/dist/{index-nsrrst23.js → index-ack311y7.js} +12 -2
- package/dist/index-afhekp0a.js +331 -0
- package/dist/{index-szbq3m4j.js → index-bf2mdvne.js} +8 -12
- package/dist/{index-2n2vr5w5.js → index-dt6mjnkf.js} +39 -57
- package/dist/{index-85fgzk87.js → index-dtgfa304.js} +1 -1
- package/dist/{index-y7d0cth0.js → index-e82sznr2.js} +7 -7
- package/dist/index-ej6eeger.js +23 -0
- package/dist/{index-bxc30q35.js → index-gk5pc8xr.js} +2 -2
- package/dist/{index-7q9kcs3w.js → index-h2ctqv68.js} +14 -5
- package/dist/{index-m780gg7f.js → index-hfvbp7ay.js} +30 -14
- package/dist/index-jk7em40j.js +37 -0
- package/dist/{index-691s5342.js → index-jn06044v.js} +2130 -834
- package/dist/{index-vhn8f5d2.js → index-kdr4xvby.js} +5 -5
- package/dist/{index-ckp8r4dh.js → index-mb62swmp.js} +2 -2
- package/dist/index-nzfpbep9.js +14 -0
- package/dist/{index-z070caqq.js → index-p64w2wrt.js} +30 -8
- package/dist/{index-8x2rp038.js → index-petywj9n.js} +81 -58
- package/dist/{index-nn8qzaxe.js → index-phkawd97.js} +2 -2
- package/dist/{index-ede5v6yy.js → index-q3f93ttm.js} +26 -17
- package/dist/{index-3s642t05.js → index-spnvnhbf.js} +7 -10
- package/dist/index-v7yphxb8.js +118 -0
- package/dist/index-vrfbee4d.js +340 -0
- package/dist/{index-69mcde3n.js → index-xw81b1gn.js} +196 -81
- package/dist/{index-wg3cne7n.js → index-xxms6rt8.js} +24 -5
- package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
- package/dist/{index-fdztq951.js → index-zhp702kh.js} +393 -82
- package/dist/index.js +23 -18
- package/dist/{install-kgcwdbqs.js → install-h76qyy1e.js} +6 -7
- package/dist/{node-strategy-p1n8wr5s.js → node-strategy-9t0ttffv.js} +2 -2
- package/dist/{project-context-caht70an.js → project-context-rc4ghykm.js} +13 -5
- package/dist/{prompt-9ze9zy34.js → prompt-5vbvcsds.js} +5 -5
- package/dist/{server-qg4rm5e3.js → server-8c4jwqjh.js} +5 -5
- package/dist/{skillCatalog-fvrcgryd.js → skillCatalog-bqya1aer.js} +8 -7
- package/dist/skillsService-8yjvmz8c.js +35 -0
- package/dist/{telemetry-drain-rt346cfz.js → telemetry-drain-8qr5tzmf.js} +2 -2
- package/dist/tree-fk9gwh4v.js +16 -0
- package/dist/updateService-9qew50s3.js +377 -0
- package/dist/updateService.cli-xtqp78g7.js +15 -0
- package/dist/updateService.skills-e2pbe2w6.js +27 -0
- package/dist/updateService.tools-m58m2fbt.js +19 -0
- package/package.json +2 -2
- package/dist/cli-7rv7qys0.js +0 -23
- package/dist/index-3qp7d08f.js +0 -240
- package/dist/index-3zf0ywpb.js +0 -95
- package/dist/index-753mncpq.js +0 -271
- package/dist/index-w3my9pw8.js +0 -45
- package/dist/skillsService-0387c5f0.js +0 -29
- package/dist/tree-4dhk82fh.js +0 -17
- package/dist/updateService-a3ypvwz8.js +0 -522
- package/dist/updateService.skills-nkdzyrwv.js +0 -22
- package/dist/updateService.tools-3zfct9yk.js +0 -16
|
@@ -1,20 +1,52 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-p64w2wrt.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError,
|
|
6
|
+
classifyThrownError,
|
|
7
|
+
extractErrorDetails,
|
|
6
8
|
extractErrorMessageSync,
|
|
7
9
|
logger
|
|
8
|
-
} from "./index-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
} from "./index-zhp702kh.js";
|
|
11
|
+
|
|
12
|
+
// src/system-ca.ts
|
|
13
|
+
function installSystemCaTrust(tlsModule) {
|
|
14
|
+
const getCertificates = tlsModule.getCACertificates;
|
|
15
|
+
const setDefaultCertificates = tlsModule.setDefaultCACertificates;
|
|
16
|
+
if (typeof getCertificates !== "function" || typeof setDefaultCertificates !== "function") {
|
|
17
|
+
return "unsupported";
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const system = getCertificates.call(tlsModule, "system");
|
|
21
|
+
if (!Array.isArray(system) || system.length === 0) {
|
|
22
|
+
return "empty";
|
|
23
|
+
}
|
|
24
|
+
const current = getCertificates.call(tlsModule, "default") ?? [];
|
|
25
|
+
setDefaultCertificates.call(tlsModule, [...current, ...system]);
|
|
26
|
+
return "applied";
|
|
27
|
+
} catch {
|
|
28
|
+
return "error";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
var loadNodeTls = async () => await import("node:tls");
|
|
32
|
+
var cachedResult = "deferred";
|
|
33
|
+
var inFlight;
|
|
34
|
+
async function ensureSystemCaTrustAsync(loadTls = loadNodeTls) {
|
|
35
|
+
if (cachedResult !== "deferred") {
|
|
36
|
+
return cachedResult;
|
|
37
|
+
}
|
|
38
|
+
inFlight ??= (async () => {
|
|
39
|
+
cachedResult = installSystemCaTrust(await loadTls());
|
|
40
|
+
logger.debug(`OS certificate-store trust: ${cachedResult}`);
|
|
41
|
+
return cachedResult;
|
|
42
|
+
})();
|
|
43
|
+
return inFlight;
|
|
44
|
+
}
|
|
45
|
+
var NODE_USE_SYSTEM_CA_ENV = "NODE_USE_SYSTEM_CA";
|
|
46
|
+
function withSystemCaEnv(env = process.env) {
|
|
47
|
+
const alreadySet = Object.keys(env).some((key) => process.platform === "win32" ? key.toUpperCase() === NODE_USE_SYSTEM_CA_ENV : key === NODE_USE_SYSTEM_CA_ENV);
|
|
48
|
+
return alreadySet ? env : { ...env, [NODE_USE_SYSTEM_CA_ENV]: "1" };
|
|
49
|
+
}
|
|
18
50
|
|
|
19
51
|
// src/utils/globalNpmRoot.ts
|
|
20
52
|
var NPM_ROOT_TIMEOUT_MS = 5000;
|
|
@@ -81,6 +113,121 @@ async function runNpmRootGlobal() {
|
|
|
81
113
|
});
|
|
82
114
|
}
|
|
83
115
|
|
|
116
|
+
// src/services/childEnv.ts
|
|
117
|
+
function mergeEnvCaseInsensitive(base, overrides) {
|
|
118
|
+
const overridden = new Set(Object.keys(overrides).map((key) => key.toLowerCase()));
|
|
119
|
+
const merged = {};
|
|
120
|
+
for (const [key, value] of Object.entries(base)) {
|
|
121
|
+
if (!overridden.has(key.toLowerCase()))
|
|
122
|
+
merged[key] = value;
|
|
123
|
+
}
|
|
124
|
+
return { ...merged, ...overrides };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// src/services/registryTls.ts
|
|
128
|
+
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.";
|
|
129
|
+
var TLS_TRUST_CODES = new Set([
|
|
130
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
131
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
132
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
133
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
134
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
135
|
+
"CERT_UNTRUSTED"
|
|
136
|
+
]);
|
|
137
|
+
var NPM_FETCH_RETRY_ENV = {
|
|
138
|
+
npm_config_fetch_retries: "2",
|
|
139
|
+
npm_config_fetch_retry_mintimeout: "2000",
|
|
140
|
+
npm_config_fetch_retry_maxtimeout: "8000"
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
class RegistryTlsError extends Error {
|
|
144
|
+
code;
|
|
145
|
+
instructions = REGISTRY_TLS_INSTRUCTIONS;
|
|
146
|
+
constructor(context, code) {
|
|
147
|
+
super(`${context}: the registry's TLS certificate is not trusted (${code})`);
|
|
148
|
+
this.code = code;
|
|
149
|
+
this.name = "RegistryTlsError";
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function isRegistryTlsError(error) {
|
|
153
|
+
return error instanceof Error && error.name === "RegistryTlsError" && typeof error.code === "string";
|
|
154
|
+
}
|
|
155
|
+
function npmTlsErrorCode(stderr, stdout) {
|
|
156
|
+
const pattern = /(?:npm (?:error|ERR!) code |"code":\s*")([A-Z0-9_]+)/g;
|
|
157
|
+
for (const match of `${stderr}
|
|
158
|
+
${stdout}`.matchAll(pattern)) {
|
|
159
|
+
if (TLS_TRUST_CODES.has(match[1]))
|
|
160
|
+
return match[1];
|
|
161
|
+
}
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// src/services/tools-whitelist.ts
|
|
166
|
+
var TOOLS_WHITELIST = new Map([
|
|
167
|
+
["@uipath/solution-tool", "solution"],
|
|
168
|
+
["@uipath/agent-tool", "agent"],
|
|
169
|
+
["@uipath/agenthub-tool", "agenthub"],
|
|
170
|
+
["@uipath/conversational-tool", "conversational"],
|
|
171
|
+
["@uipath/codedagent-tool", "codedagent"],
|
|
172
|
+
["@uipath/context-grounding-tool", "context-grounding"],
|
|
173
|
+
["@uipath/function-tool", "function"],
|
|
174
|
+
["@uipath/codedapp-tool", "codedapp"],
|
|
175
|
+
["@uipath/integrationservice-tool", "is"],
|
|
176
|
+
["@uipath/eval-tool", "eval"],
|
|
177
|
+
["@uipath/orchestrator-tool", "or"],
|
|
178
|
+
["@uipath/rpa-tool", "rpa"],
|
|
179
|
+
["@uipath/test-manager-tool", "tm"],
|
|
180
|
+
["@uipath/api-workflow-tool", "api-workflow"],
|
|
181
|
+
["@uipath/maestro-tool", "maestro"],
|
|
182
|
+
["@uipath/rules-tool", "rules"],
|
|
183
|
+
["@uipath/docsai-tool", "docsai"],
|
|
184
|
+
["@uipath/vertical-solutions-tool", "vss"],
|
|
185
|
+
["@uipath/rpa-legacy-tool", "rpa-legacy"],
|
|
186
|
+
["@uipath/traces-tool", "traces"],
|
|
187
|
+
["@uipath/explorer-engine-tool", "explorer-engine"],
|
|
188
|
+
["@uipath/gov-tool", "gov"],
|
|
189
|
+
["@uipath/admin-tool", "admin"],
|
|
190
|
+
["@uipath/data-fabric-tool", "df"],
|
|
191
|
+
["@uipath/insights-tool", "insights"],
|
|
192
|
+
["@uipath/tasks-tool", "tasks"],
|
|
193
|
+
["@uipath/aops-tool", "aops"],
|
|
194
|
+
["@uipath/llmgw-tool", "llm-configuration"],
|
|
195
|
+
["@uipath/llm-gateway-tool", "llm-gateway"],
|
|
196
|
+
["@uipath/guardrails-tool", "guardrails"],
|
|
197
|
+
["@uipath/model-hub-tool", "model-hub"],
|
|
198
|
+
["@uipath/platform-tool", "platform"],
|
|
199
|
+
["@uipath/ixp-tool", "ixp"],
|
|
200
|
+
["@uipath/pm-tool", "pm"],
|
|
201
|
+
["@uipath/coder-tool", "coder"],
|
|
202
|
+
["@uipath/automation-hub-tool", "ah"]
|
|
203
|
+
]);
|
|
204
|
+
var COMMAND_ALIASES = new Map([
|
|
205
|
+
["orchestrator", "or"],
|
|
206
|
+
["functions", "function"]
|
|
207
|
+
]);
|
|
208
|
+
var ALIASES_BY_COMMAND = (() => {
|
|
209
|
+
const map = new Map;
|
|
210
|
+
for (const [alias, canonical] of COMMAND_ALIASES) {
|
|
211
|
+
const list = map.get(canonical) ?? [];
|
|
212
|
+
list.push(alias);
|
|
213
|
+
map.set(canonical, list);
|
|
214
|
+
}
|
|
215
|
+
return map;
|
|
216
|
+
})();
|
|
217
|
+
var WHITELIST_BY_COMMAND = (() => {
|
|
218
|
+
const map = new Map([...TOOLS_WHITELIST.entries()].map(([pkg, cmd]) => [cmd, pkg]));
|
|
219
|
+
for (const [alias, canonical] of COMMAND_ALIASES) {
|
|
220
|
+
const pkg = [...TOOLS_WHITELIST.entries()].find(([, cmd]) => cmd === canonical)?.[0];
|
|
221
|
+
if (pkg)
|
|
222
|
+
map.set(alias, pkg);
|
|
223
|
+
}
|
|
224
|
+
return map;
|
|
225
|
+
})();
|
|
226
|
+
var WHITELIST_BY_SHORT_NAME = new Map([...TOOLS_WHITELIST.keys()].map((pkg) => [
|
|
227
|
+
pkg.replace(/^@uipath\//, ""),
|
|
228
|
+
pkg
|
|
229
|
+
]));
|
|
230
|
+
|
|
84
231
|
// src/utils/toolsDirsEnv.ts
|
|
85
232
|
var TOOLS_DIRS_ENV_VAR = "UIPATH_CLI_TOOLS_DIRS";
|
|
86
233
|
var UNSAFE_PATH_CHARS = /["%\p{Cc}]/u;
|
|
@@ -254,71 +401,6 @@ async function warnIfTranslatedNodeAsync(host, readCpuModel) {
|
|
|
254
401
|
logger.warn(describeTranslatedNode(detected));
|
|
255
402
|
}
|
|
256
403
|
|
|
257
|
-
// src/services/tools-whitelist.ts
|
|
258
|
-
var TOOLS_WHITELIST = new Map([
|
|
259
|
-
["@uipath/solution-tool", "solution"],
|
|
260
|
-
["@uipath/agent-tool", "agent"],
|
|
261
|
-
["@uipath/agenthub-tool", "agenthub"],
|
|
262
|
-
["@uipath/conversational-tool", "conversational"],
|
|
263
|
-
["@uipath/codedagent-tool", "codedagent"],
|
|
264
|
-
["@uipath/context-grounding-tool", "context-grounding"],
|
|
265
|
-
["@uipath/function-tool", "function"],
|
|
266
|
-
["@uipath/codedapp-tool", "codedapp"],
|
|
267
|
-
["@uipath/integrationservice-tool", "is"],
|
|
268
|
-
["@uipath/eval-tool", "eval"],
|
|
269
|
-
["@uipath/orchestrator-tool", "or"],
|
|
270
|
-
["@uipath/rpa-tool", "rpa"],
|
|
271
|
-
["@uipath/test-manager-tool", "tm"],
|
|
272
|
-
["@uipath/api-workflow-tool", "api-workflow"],
|
|
273
|
-
["@uipath/maestro-tool", "maestro"],
|
|
274
|
-
["@uipath/rules-tool", "rules"],
|
|
275
|
-
["@uipath/docsai-tool", "docsai"],
|
|
276
|
-
["@uipath/vertical-solutions-tool", "vss"],
|
|
277
|
-
["@uipath/rpa-legacy-tool", "rpa-legacy"],
|
|
278
|
-
["@uipath/traces-tool", "traces"],
|
|
279
|
-
["@uipath/gov-tool", "gov"],
|
|
280
|
-
["@uipath/admin-tool", "admin"],
|
|
281
|
-
["@uipath/data-fabric-tool", "df"],
|
|
282
|
-
["@uipath/insights-tool", "insights"],
|
|
283
|
-
["@uipath/tasks-tool", "tasks"],
|
|
284
|
-
["@uipath/aops-tool", "aops"],
|
|
285
|
-
["@uipath/llmgw-tool", "llm-configuration"],
|
|
286
|
-
["@uipath/llm-gateway-tool", "llm-gateway"],
|
|
287
|
-
["@uipath/guardrails-tool", "guardrails"],
|
|
288
|
-
["@uipath/model-hub-tool", "model-hub"],
|
|
289
|
-
["@uipath/platform-tool", "platform"],
|
|
290
|
-
["@uipath/ixp-tool", "ixp"],
|
|
291
|
-
["@uipath/pm-tool", "pm"],
|
|
292
|
-
["@uipath/coder-tool", "coder"],
|
|
293
|
-
["@uipath/automation-hub-tool", "ah"]
|
|
294
|
-
]);
|
|
295
|
-
var COMMAND_ALIASES = new Map([
|
|
296
|
-
["orchestrator", "or"],
|
|
297
|
-
["functions", "function"]
|
|
298
|
-
]);
|
|
299
|
-
var ALIASES_BY_COMMAND = (() => {
|
|
300
|
-
const map = new Map;
|
|
301
|
-
for (const [alias, canonical] of COMMAND_ALIASES) {
|
|
302
|
-
const list = map.get(canonical) ?? [];
|
|
303
|
-
list.push(alias);
|
|
304
|
-
map.set(canonical, list);
|
|
305
|
-
}
|
|
306
|
-
return map;
|
|
307
|
-
})();
|
|
308
|
-
var WHITELIST_BY_COMMAND = (() => {
|
|
309
|
-
const map = new Map([...TOOLS_WHITELIST.entries()].map(([pkg, cmd]) => [cmd, pkg]));
|
|
310
|
-
for (const [alias, canonical] of COMMAND_ALIASES) {
|
|
311
|
-
const pkg = [...TOOLS_WHITELIST.entries()].find(([, cmd]) => cmd === canonical)?.[0];
|
|
312
|
-
if (pkg)
|
|
313
|
-
map.set(alias, pkg);
|
|
314
|
-
}
|
|
315
|
-
return map;
|
|
316
|
-
})();
|
|
317
|
-
var WHITELIST_BY_SHORT_NAME = new Map([...TOOLS_WHITELIST.keys()].map((pkg) => [
|
|
318
|
-
pkg.replace(/^@uipath\//, ""),
|
|
319
|
-
pkg
|
|
320
|
-
]));
|
|
321
|
-
|
|
322
404
|
// src/services/toolService.ts
|
|
323
405
|
var SEMVER_RE = /^\d+\.\d+\.\d+(-[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*)?(\+[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*)?$/;
|
|
324
406
|
function isValidSemver(v) {
|
|
@@ -419,6 +501,12 @@ function isNpmViewMetadataError(error) {
|
|
|
419
501
|
function resolveToolPackageName(arg) {
|
|
420
502
|
return WHITELIST_BY_COMMAND.get(arg) ?? WHITELIST_BY_SHORT_NAME.get(arg) ?? arg;
|
|
421
503
|
}
|
|
504
|
+
function toolPackageName(name) {
|
|
505
|
+
return name.startsWith("@") ? name : `@uipath/${name}`;
|
|
506
|
+
}
|
|
507
|
+
function toolShortName(packageName) {
|
|
508
|
+
return packageName.replace(/^@uipath\//, "");
|
|
509
|
+
}
|
|
422
510
|
function asNpmViewMetadata(value) {
|
|
423
511
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
424
512
|
return;
|
|
@@ -535,6 +623,32 @@ function describeCandidateFailure(packageName, versionPrefix, failure, registry)
|
|
|
535
623
|
retry: "RetryWillNotFix"
|
|
536
624
|
};
|
|
537
625
|
}
|
|
626
|
+
function npmErrorCode(output) {
|
|
627
|
+
return /npm (?:error|ERR!) code ([A-Z0-9_]+)/.exec(output)?.[1];
|
|
628
|
+
}
|
|
629
|
+
function classifyNpmOutput(output) {
|
|
630
|
+
const npmCode = npmErrorCode(output);
|
|
631
|
+
if (npmCode === undefined)
|
|
632
|
+
return;
|
|
633
|
+
if (npmCode === "ETARGET") {
|
|
634
|
+
return { errorCode: "not_found", retry: "RetryWillNotFix" };
|
|
635
|
+
}
|
|
636
|
+
return classifyThrownError({ code: npmCode });
|
|
637
|
+
}
|
|
638
|
+
async function classifyInstallError(error) {
|
|
639
|
+
const details = await extractErrorDetails(error);
|
|
640
|
+
const { errorCode, retry } = details.errorCode === "unknown_error" && classifyNpmOutput(error.message) || details;
|
|
641
|
+
return { message: details.message, errorCode, retry };
|
|
642
|
+
}
|
|
643
|
+
function pickNpmFailureLine(output) {
|
|
644
|
+
const lines = output.split(`
|
|
645
|
+
`).map((line) => line.trim()).filter(Boolean);
|
|
646
|
+
if (lines.length === 0)
|
|
647
|
+
return "npm install failed";
|
|
648
|
+
if (!lines[0].startsWith("npm "))
|
|
649
|
+
return lines[0];
|
|
650
|
+
return lines.find((line) => /^npm (?:error|ERR!) code /.test(line)) ?? lines.find((line) => /^npm (?:error|ERR!)/.test(line)) ?? lines.find((line) => !/^npm warn/i.test(line)) ?? lines[0];
|
|
651
|
+
}
|
|
538
652
|
var effectiveNpmConfigPromise = null;
|
|
539
653
|
function readEffectiveNpmConfig() {
|
|
540
654
|
effectiveNpmConfigPromise ??= (async () => {
|
|
@@ -607,7 +721,8 @@ function pickForChannel(versions, channel) {
|
|
|
607
721
|
const tag = `-${channel}.`;
|
|
608
722
|
return versions.find((v) => v.includes(tag)) ?? null;
|
|
609
723
|
}
|
|
610
|
-
|
|
724
|
+
var CLI_REPO_ROOT_PACKAGE_NAME = "cli";
|
|
725
|
+
async function isDevMode(repoName) {
|
|
611
726
|
const [error, result] = await catchError((async () => {
|
|
612
727
|
const fs = getFileSystem2();
|
|
613
728
|
let dir = fs.env.cwd();
|
|
@@ -617,7 +732,7 @@ async function isDevMode() {
|
|
|
617
732
|
const raw = await fs.readFile(pkgPath, "utf-8");
|
|
618
733
|
if (raw) {
|
|
619
734
|
const pkg = JSON.parse(raw);
|
|
620
|
-
if (pkg.workspaces && pkg.private) {
|
|
735
|
+
if ((repoName === undefined || pkg.name === repoName) && pkg.workspaces && pkg.private) {
|
|
621
736
|
const bunLockPath = fs.path.join(dir, "bun.lock");
|
|
622
737
|
if (await fs.exists(bunLockPath)) {
|
|
623
738
|
logger.debug(`Dev mode detected — found monorepo root at ${dir}`);
|
|
@@ -859,7 +974,7 @@ class NodeToolService {
|
|
|
859
974
|
if (/E401|E403|ENEEDAUTH|need(s)? auth|authentication/i.test(stderr)) {
|
|
860
975
|
return new Error(`Authentication required for ${packageName} (configure a token in .npmrc)`);
|
|
861
976
|
}
|
|
862
|
-
const detail = stderr.trim()
|
|
977
|
+
const detail = stderr.trim() ? pickNpmFailureLine(stderr) : codeOrError instanceof Error ? codeOrError.message : `exit ${codeOrError}`;
|
|
863
978
|
return new Error(`npm view ${packageName} failed: ${detail}`);
|
|
864
979
|
}
|
|
865
980
|
async search(query) {
|
|
@@ -1046,6 +1161,6 @@ function truncateVersionsForDisplay(versions) {
|
|
|
1046
1161
|
}
|
|
1047
1162
|
var toolService = new NodeToolService;
|
|
1048
1163
|
|
|
1049
|
-
export { getGlobalNpmUipathDir, refreshGlobalNpmUipathDir, TOOLS_DIRS_ENV_VAR, getEnvToolsDirsDeclaration, resolveNpmPrefixForToolsDir, InstallRefusedError, isBundledDistribution, TOOLS_WHITELIST, COMMAND_ALIASES, ALIASES_BY_COMMAND, WHITELIST_BY_COMMAND, WHITELIST_BY_SHORT_NAME, isValidSemver, compareSemver, validatePackageSpec, isNpmViewMetadataError, resolveToolPackageName, parsePackageSpec, describeCandidateFailure, getEffectiveRegistry, isDevMode, isPermissionError, HostOwnedToolError, truncateVersionsForDisplay, toolService };
|
|
1164
|
+
export { ensureSystemCaTrustAsync, withSystemCaEnv, getGlobalNpmUipathDir, refreshGlobalNpmUipathDir, TOOLS_DIRS_ENV_VAR, getEnvToolsDirsDeclaration, resolveNpmPrefixForToolsDir, InstallRefusedError, isBundledDistribution, mergeEnvCaseInsensitive, NPM_FETCH_RETRY_ENV, RegistryTlsError, isRegistryTlsError, npmTlsErrorCode, TOOLS_WHITELIST, COMMAND_ALIASES, ALIASES_BY_COMMAND, WHITELIST_BY_COMMAND, WHITELIST_BY_SHORT_NAME, isValidSemver, compareSemver, validatePackageSpec, isNpmViewMetadataError, resolveToolPackageName, toolPackageName, toolShortName, parsePackageSpec, describeCandidateFailure, npmErrorCode, classifyNpmOutput, classifyInstallError, pickNpmFailureLine, getEffectiveRegistry, CLI_REPO_ROOT_PACKAGE_NAME, isDevMode, isPermissionError, HostOwnedToolError, truncateVersionsForDisplay, toolService };
|
|
1050
1165
|
|
|
1051
|
-
//# debugId=
|
|
1166
|
+
//# debugId=CB3F9AF7CC4649B364756E2164756E21
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./index-
|
|
2
|
+
classifyThrownError
|
|
3
|
+
} from "./index-zhp702kh.js";
|
|
4
4
|
import {
|
|
5
|
+
CONFIG_FROM_PINS_MACHINE
|
|
6
|
+
} from "./index-5ygg5mrs.js";
|
|
7
|
+
import {
|
|
8
|
+
isRegistryTlsError,
|
|
5
9
|
isPermissionError
|
|
6
|
-
} from "./index-
|
|
10
|
+
} from "./index-xw81b1gn.js";
|
|
7
11
|
import {
|
|
8
12
|
isSkillsRegistryAuthError,
|
|
9
13
|
isSkillsPackageMetadataError,
|
|
14
|
+
isSkillsPinNotPublishedError,
|
|
10
15
|
isSkillsPackOutputError
|
|
11
|
-
} from "./index-
|
|
16
|
+
} from "./index-ack311y7.js";
|
|
12
17
|
|
|
13
18
|
// src/commands/skills/errorMessages.ts
|
|
14
19
|
function getSkillsSourceFailureDetails(error) {
|
|
@@ -40,6 +45,13 @@ function getSkillsSourceFailureDetails(error) {
|
|
|
40
45
|
errorCode: "configuration_error"
|
|
41
46
|
};
|
|
42
47
|
}
|
|
48
|
+
if (isSkillsPinNotPublishedError(error)) {
|
|
49
|
+
return {
|
|
50
|
+
instructions: `Correct the pin on the machine that sets the pins: run 'uip config freeze --force' there. It pins the installed skills version, or drops a skills pin that the registry does not publish. ${CONFIG_FROM_PINS_MACHINE} Then run the command again.`,
|
|
51
|
+
retry: "RetryWillNotFix",
|
|
52
|
+
errorCode: "configuration_error"
|
|
53
|
+
};
|
|
54
|
+
}
|
|
43
55
|
if (isSkillsPackOutputError(error)) {
|
|
44
56
|
return {
|
|
45
57
|
instructions: "Your npm version prints a `pack --json` shape this CLI cannot read. Update the CLI (`uip update`), or set UIP_SKILLS_PM=pnpm (or bun/yarn) to fetch skills with another package manager, which skips npm pack entirely.",
|
|
@@ -47,6 +59,13 @@ function getSkillsSourceFailureDetails(error) {
|
|
|
47
59
|
errorCode: "configuration_error"
|
|
48
60
|
};
|
|
49
61
|
}
|
|
62
|
+
if (classifyThrownError(error).errorCode === "network_error") {
|
|
63
|
+
return {
|
|
64
|
+
instructions: "Check network access and any proxy or registry configuration in .npmrc, then run the command again.",
|
|
65
|
+
retry: "RetryLater",
|
|
66
|
+
errorCode: "network_error"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
50
69
|
return {
|
|
51
70
|
instructions: "Check network connectivity and try again. Ensure the @uipath/skills package is available from the configured npm registry.",
|
|
52
71
|
retry: "RetryLater",
|
|
@@ -56,4 +75,4 @@ function getSkillsSourceFailureDetails(error) {
|
|
|
56
75
|
|
|
57
76
|
export { getSkillsSourceFailureDetails };
|
|
58
77
|
|
|
59
|
-
//# debugId=
|
|
78
|
+
//# debugId=E2E90478B98A603464756E2164756E21
|