@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.
- package/README.md +48 -0
- package/dist/{browser-strategy-p5fhwxqj.js → browser-strategy-5rfwnk5q.js} +1 -1
- package/dist/cli-10857d67.js +28 -0
- package/dist/cliInstaller-3dxg6fbd.js +23 -0
- package/dist/{contentStore-w35jnkxk.js → contentStore-z3t1yt3n.js} +7 -6
- package/dist/{environmentInfo-nz3126q4.js → environmentInfo-dyhpheza.js} +6 -6
- package/dist/{feedbackPrompts-bx209g5v.js → feedbackPrompts-fc66gq0p.js} +3 -3
- package/dist/forcedUpdate-5hd8cp9x.js +21 -0
- package/dist/{handlers-jjwt24f2.js → handlers-rg3d62gb.js} +13 -9
- package/dist/index-2f6vv7yr.js +81 -0
- package/dist/{index-v3vx48v0.js → index-2g332j2f.js} +8 -12
- package/dist/index-319vtrwd.js +264 -0
- package/dist/{index-jqt7p70w.js → index-3vkb4j13.js} +26 -17
- package/dist/index-5j78gm9c.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-cef72dzy.js → index-9v7334md.js} +1 -1
- package/dist/{index-nsrrst23.js → index-ack311y7.js} +12 -2
- package/dist/{index-2n2vr5w5.js → index-dt6mjnkf.js} +39 -57
- package/dist/{index-y7d0cth0.js → index-e82sznr2.js} +7 -7
- package/dist/index-ej6eeger.js +23 -0
- package/dist/index-evcsjfyy.js +248 -0
- package/dist/{index-bxc30q35.js → index-gk5pc8xr.js} +2 -2
- package/dist/{index-7q9kcs3w.js → index-h2ctqv68.js} +14 -5
- package/dist/index-jk7em40j.js +37 -0
- package/dist/{index-vhn8f5d2.js → index-kdr4xvby.js} +5 -5
- package/dist/{index-y7j0ant5.js → index-kmacaa53.js} +2130 -834
- package/dist/{index-ckp8r4dh.js → index-mb62swmp.js} +2 -2
- package/dist/{index-dxfqvgqg.js → index-md27nny8.js} +7 -10
- package/dist/{index-85fa5z1t.js → index-nex3q8cg.js} +2 -2
- package/dist/index-nyx7fh45.js +331 -0
- package/dist/index-nzfpbep9.js +14 -0
- package/dist/{index-z070caqq.js → index-p64w2wrt.js} +30 -8
- package/dist/{index-0pan2k7w.js → index-t6hrzpm7.js} +30 -14
- 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-6wzpac34.js → index-z3q16ts7.js} +81 -58
- 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-tvxwpvxh.js → prompt-66bnttv7.js} +5 -5
- package/dist/{server-pge2gheb.js → server-pxfn9w9m.js} +5 -5
- package/dist/{skillCatalog-b3z68z4n.js → skillCatalog-7gh14b4s.js} +8 -7
- package/dist/skillsService-wz3c21qb.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-ybs9274t.js +377 -0
- package/dist/updateService.cli-xtqp78g7.js +15 -0
- package/dist/updateService.skills-pgst1fyj.js +27 -0
- package/dist/updateService.tools-m58m2fbt.js +19 -0
- package/package.json +2 -2
- package/dist/cli-0p8c9t5r.js +0 -23
- package/dist/index-1n5v3afn.js +0 -45
- package/dist/index-3qp7d08f.js +0 -240
- package/dist/index-3zf0ywpb.js +0 -95
- package/dist/index-753mncpq.js +0 -271
- package/dist/skillsService-qzzqacmg.js +0 -29
- package/dist/tree-4dhk82fh.js +0 -17
- package/dist/updateService-b579ys6m.js +0 -522
- package/dist/updateService.skills-teejc562.js +0 -22
- package/dist/updateService.tools-3zfct9yk.js +0 -16
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError,
|
|
3
|
+
getOutputSink,
|
|
4
|
+
logger,
|
|
5
|
+
OutputFormatter
|
|
6
|
+
} from "./index-zhp702kh.js";
|
|
7
|
+
import {
|
|
8
|
+
matchesPin
|
|
9
|
+
} from "./index-v7yphxb8.js";
|
|
10
|
+
import {
|
|
11
|
+
configPathForMessage,
|
|
12
|
+
ConfigValidationError,
|
|
13
|
+
ignoredValuesWarning,
|
|
14
|
+
ConfigReadError,
|
|
15
|
+
CoreVersionError,
|
|
16
|
+
getCachedConfig,
|
|
17
|
+
resolveConfigFilePathAsync,
|
|
18
|
+
findFrozenConfigNotUsed,
|
|
19
|
+
getIgnoredConfigKeys,
|
|
20
|
+
getMisspelledVersionsKeys,
|
|
21
|
+
getConfigLoadError,
|
|
22
|
+
isHelpOrVersionInvocation,
|
|
23
|
+
isVersionInvocation,
|
|
24
|
+
verbAndSubcommand,
|
|
25
|
+
CONFIG_FROM_PINS_MACHINE,
|
|
26
|
+
reportFreezeFailure
|
|
27
|
+
} from "./index-5ygg5mrs.js";
|
|
28
|
+
import {
|
|
29
|
+
getEnvToolsDirsDeclaration,
|
|
30
|
+
isBundledDistribution,
|
|
31
|
+
resolveToolPackageName,
|
|
32
|
+
CLI_REPO_ROOT_PACKAGE_NAME,
|
|
33
|
+
isDevMode
|
|
34
|
+
} from "./index-xw81b1gn.js";
|
|
35
|
+
import {
|
|
36
|
+
package_default
|
|
37
|
+
} from "./index-nex3q8cg.js";
|
|
38
|
+
|
|
39
|
+
// src/services/versionsConfig.ts
|
|
40
|
+
var EXEMPT_VERBS = new Set(["config", "help"]);
|
|
41
|
+
async function isStudioBundle(resolveInstallPath) {
|
|
42
|
+
const [error, location] = await catchError(resolveInstallPath());
|
|
43
|
+
return !error && !!location && await isBundledDistribution(location.path);
|
|
44
|
+
}
|
|
45
|
+
async function isFrozen(resolveInstallPath) {
|
|
46
|
+
if (getCachedConfig().versions === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
return !await isStudioBundle(resolveInstallPath);
|
|
49
|
+
}
|
|
50
|
+
function pinsFor(versions, studio) {
|
|
51
|
+
const { cli, tools, skills } = versions;
|
|
52
|
+
return studio ? { skills } : { cli, tools, skills };
|
|
53
|
+
}
|
|
54
|
+
async function governingPins(resolveInstallPath) {
|
|
55
|
+
const versions = getCachedConfig().versions;
|
|
56
|
+
if (versions === undefined)
|
|
57
|
+
return {};
|
|
58
|
+
return pinsFor(versions, await isStudioBundle(resolveInstallPath));
|
|
59
|
+
}
|
|
60
|
+
function freezeScopeOf(args) {
|
|
61
|
+
if (isHelpOrVersionInvocation(args))
|
|
62
|
+
return "help";
|
|
63
|
+
const { verb, subcommand } = verbAndSubcommand(args);
|
|
64
|
+
if (verb === undefined)
|
|
65
|
+
return "help";
|
|
66
|
+
if (verb === "tools") {
|
|
67
|
+
if (subcommand === undefined)
|
|
68
|
+
return "help";
|
|
69
|
+
return subcommand === "list" ? "exempt" : "checked";
|
|
70
|
+
}
|
|
71
|
+
if (verb === "update")
|
|
72
|
+
return "update";
|
|
73
|
+
return EXEMPT_VERBS.has(verb) ? "exempt" : "checked";
|
|
74
|
+
}
|
|
75
|
+
function isVersionsConfigExempt(args) {
|
|
76
|
+
return freezeScopeOf(args) !== "checked";
|
|
77
|
+
}
|
|
78
|
+
function problemInUserWords(problem) {
|
|
79
|
+
const split = problem.indexOf(": ");
|
|
80
|
+
const path = problem.slice(0, split);
|
|
81
|
+
const message = problem.slice(split + 2);
|
|
82
|
+
const [section, name, ...tool] = path.split(".");
|
|
83
|
+
if (section === "versions") {
|
|
84
|
+
if (name === "pins" && tool.length === 0)
|
|
85
|
+
return message;
|
|
86
|
+
if (name === "cli")
|
|
87
|
+
return `the CLI pin ${message}`;
|
|
88
|
+
if (name === "skills")
|
|
89
|
+
return `the pin for @uipath/skills ${message}`;
|
|
90
|
+
if (name === "tools" && tool.length > 0) {
|
|
91
|
+
return `the pin for ${tool.join(".")} ${message}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return `'${path}' ${message}`;
|
|
95
|
+
}
|
|
96
|
+
function loadProblem(loadError) {
|
|
97
|
+
if (loadError instanceof ConfigValidationError) {
|
|
98
|
+
const text = loadError.problems.map(problemInUserWords).join("; ");
|
|
99
|
+
const end = text.endsWith(".") ? "" : ".";
|
|
100
|
+
return `${text.charAt(0).toUpperCase()}${text.slice(1)}${end}`;
|
|
101
|
+
}
|
|
102
|
+
if (loadError.cause instanceof SyntaxError) {
|
|
103
|
+
return "It is not valid JSON.";
|
|
104
|
+
}
|
|
105
|
+
return loadError.message;
|
|
106
|
+
}
|
|
107
|
+
async function reportUnloadedConfig(loadError, refused) {
|
|
108
|
+
const { absolutePath } = await resolveConfigFilePathAsync();
|
|
109
|
+
reportFreezeFailure("configNotLoaded", {
|
|
110
|
+
path: absolutePath,
|
|
111
|
+
problem: loadProblem(loadError),
|
|
112
|
+
unreadable: loadError instanceof ConfigReadError,
|
|
113
|
+
folder: loadError instanceof ConfigReadError && loadError.code === "EISDIR",
|
|
114
|
+
coreVersion: loadError instanceof CoreVersionError,
|
|
115
|
+
refused
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function refusesUnloadedConfig(args) {
|
|
119
|
+
if (getConfigLoadError() === undefined)
|
|
120
|
+
return false;
|
|
121
|
+
const scope = freezeScopeOf(args);
|
|
122
|
+
return scope === "update" || scope === "checked";
|
|
123
|
+
}
|
|
124
|
+
function warnConfigNotLoaded(loadError) {
|
|
125
|
+
OutputFormatter.log({
|
|
126
|
+
Warning: `Failed to load config: ${loadError.message}`
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
async function shownConfigPath() {
|
|
130
|
+
const { absolutePath } = await resolveConfigFilePathAsync();
|
|
131
|
+
return absolutePath ? configPathForMessage(absolutePath) : "the config";
|
|
132
|
+
}
|
|
133
|
+
async function warnUnfrozenConfig() {
|
|
134
|
+
const [typo] = getMisspelledVersionsKeys();
|
|
135
|
+
if (typo !== undefined) {
|
|
136
|
+
OutputFormatter.log({
|
|
137
|
+
Warning: `${await shownConfigPath()} has the key '${typo}', not 'versions', so it is not frozen and this command runs unfrozen.`
|
|
138
|
+
});
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const notUsed = await findFrozenConfigNotUsed();
|
|
142
|
+
if (notUsed === undefined)
|
|
143
|
+
return;
|
|
144
|
+
OutputFormatter.log({
|
|
145
|
+
Warning: `${configPathForMessage(notUsed.usedPath)} has no versions block, so this command runs unfrozen. The frozen config ${configPathForMessage(notUsed.frozenPath)} is not used: the CLI reads only the nearest config.`
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
async function warnStudioIgnoresPins() {
|
|
149
|
+
OutputFormatter.log({
|
|
150
|
+
Warning: `This CLI comes with Studio, so the CLI and tool pins in ${await shownConfigPath()} do not apply: Studio sets the CLI and tool versions. Only versions.skills applies.`
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
async function enforceVersionsConfig(args, resolveInstallPath) {
|
|
154
|
+
const loadError = getConfigLoadError();
|
|
155
|
+
const versions = getCachedConfig().versions;
|
|
156
|
+
const pin = versions?.cli;
|
|
157
|
+
if (loadError === undefined && pin === undefined) {
|
|
158
|
+
await warnUnfrozenConfig();
|
|
159
|
+
return "ok";
|
|
160
|
+
}
|
|
161
|
+
const ignored = getIgnoredConfigKeys();
|
|
162
|
+
if (ignored.length > 0) {
|
|
163
|
+
OutputFormatter.log({
|
|
164
|
+
Warning: ignoredValuesWarning(await shownConfigPath(), ignored)
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
if (await isStudioBundle(resolveInstallPath)) {
|
|
168
|
+
if (loadError && freezeScopeOf(args) === "checked") {
|
|
169
|
+
warnConfigNotLoaded(loadError);
|
|
170
|
+
}
|
|
171
|
+
if (versions !== undefined)
|
|
172
|
+
await warnStudioIgnoresPins();
|
|
173
|
+
return "ok";
|
|
174
|
+
}
|
|
175
|
+
if (loadError) {
|
|
176
|
+
if (isVersionsConfigExempt(args))
|
|
177
|
+
return "off-pin";
|
|
178
|
+
await reportUnloadedConfig(loadError, "command");
|
|
179
|
+
return "refused";
|
|
180
|
+
}
|
|
181
|
+
if (pin === undefined)
|
|
182
|
+
return "ok";
|
|
183
|
+
if (isVersionInvocation(args)) {
|
|
184
|
+
getOutputSink().writeErr(`frozen at ${pin}
|
|
185
|
+
`);
|
|
186
|
+
}
|
|
187
|
+
const cliVersion = package_default.version;
|
|
188
|
+
if (matchesPin(pin, cliVersion))
|
|
189
|
+
return "ok";
|
|
190
|
+
const exempt = isVersionsConfigExempt(args);
|
|
191
|
+
if (await isDevMode(CLI_REPO_ROOT_PACKAGE_NAME)) {
|
|
192
|
+
if (!exempt) {
|
|
193
|
+
logger.warn(`This is the CLI's own dev checkout, so versions.cli ${pin} is not enforced here.`);
|
|
194
|
+
}
|
|
195
|
+
return "ok";
|
|
196
|
+
}
|
|
197
|
+
if (exempt)
|
|
198
|
+
return "off-pin";
|
|
199
|
+
reportFreezeFailure("cliOffPin", {
|
|
200
|
+
cliVersion,
|
|
201
|
+
pin,
|
|
202
|
+
hostOwned: await getEnvToolsDirsDeclaration() !== null
|
|
203
|
+
});
|
|
204
|
+
return "refused";
|
|
205
|
+
}
|
|
206
|
+
var PIN_INSTALL_FAILED_INSTRUCTIONS = `Check that the registry is reachable and that each frozen version is published. If a pin is wrong, correct it on the machine that sets the pins: install a published version and run 'uip config freeze --force'. ${CONFIG_FROM_PINS_MACHINE} If another 'uip update' or 'uip tools' command ran on this machine at the same time, it may have moved the tool: hold one freeze at a time on this machine. Then run the command again.`;
|
|
207
|
+
var TOOL_PIN_INSTRUCTIONS = `Each versions.tools key must be a tool package name, @uipath/<name>-tool. On the machine that sets the pins, run 'uip config freeze --force', which leaves out a key that is not a known tool. ${CONFIG_FROM_PINS_MACHINE} Then run the command again.`;
|
|
208
|
+
function nothingListed(pins, name, nameListed) {
|
|
209
|
+
if (name !== undefined && !nameListed) {
|
|
210
|
+
return {
|
|
211
|
+
warning: `The freeze does not list ${resolveToolPackageName(name)}, so it was not updated.`,
|
|
212
|
+
instructions: `Run 'uip tools install ${name} --force' to install it and add it to the freeze.`
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
if (Object.keys(pins).length > 0)
|
|
216
|
+
return;
|
|
217
|
+
return {
|
|
218
|
+
warning: "The freeze lists no tool, so no tool was updated.",
|
|
219
|
+
instructions: "Run 'uip tools install <tool> --force' to install a tool and add it to the freeze."
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
async function readUpdatePins(state) {
|
|
223
|
+
const { cli: _cli, ...pins } = await governingPins(state.resolveInstallPath);
|
|
224
|
+
if (!await isFrozen(state.resolveInstallPath)) {
|
|
225
|
+
return { frozen: false, pins, unlisted: [] };
|
|
226
|
+
}
|
|
227
|
+
const tools = pins.tools ?? {};
|
|
228
|
+
const unlisted = (state.discoveredTools ?? []).filter((t) => !Object.hasOwn(tools, t.packageName));
|
|
229
|
+
return { frozen: true, pins: { ...pins, tools }, unlisted };
|
|
230
|
+
}
|
|
231
|
+
async function readFrozenState({
|
|
232
|
+
frozen,
|
|
233
|
+
unlisted
|
|
234
|
+
}) {
|
|
235
|
+
const versions = getCachedConfig().versions;
|
|
236
|
+
if (!versions || !frozen)
|
|
237
|
+
return null;
|
|
238
|
+
const { absolutePath } = await resolveConfigFilePathAsync();
|
|
239
|
+
return {
|
|
240
|
+
ConfigFile: absolutePath ?? null,
|
|
241
|
+
Versions: versions,
|
|
242
|
+
Unlisted: unlisted.map((t) => `${t.toolName}@${t.version}`)
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { isStudioBundle, isFrozen, governingPins, freezeScopeOf, reportUnloadedConfig, refusesUnloadedConfig, warnConfigNotLoaded, enforceVersionsConfig, PIN_INSTALL_FAILED_INSTRUCTIONS, TOOL_PIN_INSTRUCTIONS, nothingListed, readUpdatePins, readFrozenState };
|
|
247
|
+
|
|
248
|
+
//# debugId=0C9758149DD4232364756E2164756E21
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
Command,
|
|
4
4
|
logger,
|
|
5
5
|
getCompleter
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-zhp702kh.js";
|
|
7
7
|
import {
|
|
8
8
|
importTool
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-kdr4xvby.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/completion/tree.ts
|
|
12
12
|
var isHiddenCommand = (cmd) => cmd._hidden === true;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveAuthProfileFilePath2,
|
|
3
3
|
parseAuthFlow2,
|
|
4
|
+
ENV_AUTH_ENABLE_VAR2,
|
|
4
5
|
isEnvAuthEnabled2,
|
|
5
6
|
readAuthFromEnv2,
|
|
6
7
|
AUTH_FLOW_ENV_VAR2,
|
|
7
8
|
DEFAULT_ENV_FILENAME2,
|
|
8
9
|
resolveEnvFilePathAsync2,
|
|
9
10
|
loadEnvFileAsync2
|
|
10
|
-
} from "./index-
|
|
11
|
+
} from "./index-8n0z4r6f.js";
|
|
11
12
|
import {
|
|
12
13
|
BaseDimensions,
|
|
13
14
|
CommandDimensions,
|
|
14
15
|
AuthDimensions,
|
|
15
16
|
catchError,
|
|
16
17
|
logger,
|
|
18
|
+
setGlobalTelemetryProperties,
|
|
17
19
|
buildEnvironmentProperties,
|
|
18
20
|
setExecutionContextAuthSignal,
|
|
19
|
-
setGlobalTelemetryProperties,
|
|
20
21
|
telemetry
|
|
21
|
-
} from "./index-
|
|
22
|
+
} from "./index-zhp702kh.js";
|
|
22
23
|
|
|
23
24
|
// src/copyright.ts
|
|
24
25
|
var COPYRIGHT_NOTICE = "© 2026 UiPath";
|
|
@@ -146,6 +147,14 @@ var trackAuthLogout = (result) => {
|
|
|
146
147
|
});
|
|
147
148
|
};
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
// src/services/envAuthOverride.ts
|
|
151
|
+
function warnIfEnvAuthOverrides(savedLogin) {
|
|
152
|
+
if (!isEnvAuthEnabled2()) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
logger.warn(`Environment-variable authentication is on (${ENV_AUTH_ENABLE_VAR2}=true), so commands sign in with the UIPATH_CLI_* variables, not ${savedLogin}. Unset ${ENV_AUTH_ENABLE_VAR2} to use it.`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export { COPYRIGHT_NOTICE, populateTelemetryAuthContext, trackAuthLogin, trackTenantSelection, trackTokenRefresh, trackAuthLogout, warnIfEnvAuthOverrides };
|
|
150
159
|
|
|
151
|
-
//# debugId=
|
|
160
|
+
//# debugId=D6A20C87F8C39A6364756E2164756E21
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFileSystem2
|
|
3
|
+
} from "./index-p64w2wrt.js";
|
|
4
|
+
import {
|
|
5
|
+
catchError,
|
|
6
|
+
UIPATH_HOME_DIR
|
|
7
|
+
} from "./index-zhp702kh.js";
|
|
8
|
+
|
|
9
|
+
// src/utils/asRecord.ts
|
|
10
|
+
function asRecord(value) {
|
|
11
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// src/commands/skills/storeMarker.ts
|
|
15
|
+
var SOURCE_MARKER_NAME = ".uipath-skills-source.json";
|
|
16
|
+
var STORE_NAME = `${UIPATH_HOME_DIR}/.skills`;
|
|
17
|
+
async function readStoreSkillsVersion(storePath) {
|
|
18
|
+
const fs = getFileSystem2();
|
|
19
|
+
const [markerErr, markerText] = await catchError(fs.readFile(fs.path.join(storePath, SOURCE_MARKER_NAME), {
|
|
20
|
+
encoding: "utf-8"
|
|
21
|
+
}));
|
|
22
|
+
if (markerErr || !markerText)
|
|
23
|
+
return;
|
|
24
|
+
const [parseErr, marker] = catchError(() => JSON.parse(markerText));
|
|
25
|
+
if (parseErr)
|
|
26
|
+
return;
|
|
27
|
+
const version = asRecord(marker)?.version;
|
|
28
|
+
return typeof version === "string" ? version : undefined;
|
|
29
|
+
}
|
|
30
|
+
async function readInstalledSkillsVersion() {
|
|
31
|
+
const fs = getFileSystem2();
|
|
32
|
+
return await readStoreSkillsVersion(fs.path.join(fs.env.cwd(), STORE_NAME)) ?? readStoreSkillsVersion(fs.path.join(fs.env.homedir(), STORE_NAME));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { asRecord, SOURCE_MARKER_NAME, STORE_NAME, readStoreSkillsVersion, readInstalledSkillsVersion };
|
|
36
|
+
|
|
37
|
+
//# debugId=4D7C898A4FCD5C9D64756E2164756E21
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem2,
|
|
3
3
|
getFileSystemAsync2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-p64w2wrt.js";
|
|
5
5
|
import {
|
|
6
6
|
catchError,
|
|
7
7
|
Command,
|
|
8
8
|
logger,
|
|
9
9
|
REGISTER_EXPORT
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-zhp702kh.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalNpmUipathDir,
|
|
13
13
|
getEnvToolsDirsDeclaration,
|
|
14
14
|
TOOLS_WHITELIST,
|
|
15
15
|
WHITELIST_BY_SHORT_NAME
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-xw81b1gn.js";
|
|
17
17
|
|
|
18
18
|
// src/services/storage.ts
|
|
19
19
|
class GeneralizedStorage {
|
|
@@ -114,7 +114,7 @@ function isRunningFromSource() {
|
|
|
114
114
|
var _isRunningFromSource = isRunningFromSource();
|
|
115
115
|
var _isBrowser = !(typeof process !== "undefined" && process.versions && process.versions.node);
|
|
116
116
|
function joinPath(...parts) {
|
|
117
|
-
return
|
|
117
|
+
return getFileSystem2().path.join(...parts);
|
|
118
118
|
}
|
|
119
119
|
async function discoverToolPaths(toolsDirs) {
|
|
120
120
|
const [initError] = await catchError(storage.init());
|
|
@@ -389,4 +389,4 @@ async function dirsContainAnyPlugin(dirs) {
|
|
|
389
389
|
|
|
390
390
|
export { storage, isInsideNodeModules, isLocalWorkspaceDir, discoverToolPaths, importTool, importPackagerTool, importToolLibraryModule, resolveToolsDirs };
|
|
391
391
|
|
|
392
|
-
//# debugId=
|
|
392
|
+
//# debugId=18DCD4B82887544564756E2164756E21
|