cwm-assistant 0.3.0 → 0.3.2
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.
|
@@ -2619,7 +2619,7 @@ var Type = type_exports2;
|
|
|
2619
2619
|
|
|
2620
2620
|
// ../../packages/contracts/src/assistant.ts
|
|
2621
2621
|
var ASSISTANT_PROTOCOL = 1;
|
|
2622
|
-
var ASSISTANT_VERSION = "0.3.
|
|
2622
|
+
var ASSISTANT_VERSION = "0.3.2";
|
|
2623
2623
|
var ASSISTANT_PORT = 46322;
|
|
2624
2624
|
|
|
2625
2625
|
// ../../packages/contracts/src/index.ts
|
|
@@ -4031,7 +4031,10 @@ function registerLocalRoutes(app, store, options = {}) {
|
|
|
4031
4031
|
fs11.mkdirSync(preferred, { recursive: true });
|
|
4032
4032
|
return { path: fs11.realpathSync(preferred) };
|
|
4033
4033
|
});
|
|
4034
|
-
app.post("/v1/tools/detect", async () => ({
|
|
4034
|
+
app.post("/v1/tools/detect", async () => ({
|
|
4035
|
+
tools: detectToolCommands(),
|
|
4036
|
+
platform: process.platform
|
|
4037
|
+
}));
|
|
4035
4038
|
app.get("/v1/workspaces", async (request) => {
|
|
4036
4039
|
const grant = requestGrant(request);
|
|
4037
4040
|
return Object.values(store.state.mounts).filter((mount) => mount.workbenchId === grant.workbenchId && mount.userId === grant.userId).map((mount) => ({ ...mount, exists: fs11.existsSync(mount.directory) }));
|
|
@@ -6018,10 +6021,10 @@ function isNewer(candidate, current) {
|
|
|
6018
6021
|
}
|
|
6019
6022
|
async function latestPublished() {
|
|
6020
6023
|
const response = await fetch("https://registry.npmjs.org/cwm-assistant/latest", {
|
|
6021
|
-
signal: AbortSignal.timeout(
|
|
6022
|
-
headers: { Accept: "application/
|
|
6024
|
+
signal: AbortSignal.timeout(8e3),
|
|
6025
|
+
headers: { Accept: "application/json" }
|
|
6023
6026
|
});
|
|
6024
|
-
if (!response.ok) throw new Error(
|
|
6027
|
+
if (!response.ok) throw new Error(`\u65E0\u6CD5\u67E5\u8BE2 npm \u4E0A\u7684\u6700\u65B0\u7248\u672C\uFF08HTTP ${response.status}\uFF09`);
|
|
6025
6028
|
const data = await response.json();
|
|
6026
6029
|
if (!data.version) throw new Error("npm \u8FD4\u56DE\u7684\u7248\u672C\u4FE1\u606F\u65E0\u6548");
|
|
6027
6030
|
return data.version;
|
|
@@ -6588,4 +6591,4 @@ async function cli(args, entry) {
|
|
|
6588
6591
|
export {
|
|
6589
6592
|
cli
|
|
6590
6593
|
};
|
|
6591
|
-
//# sourceMappingURL=cli-
|
|
6594
|
+
//# sourceMappingURL=cli-D7E7V2UP.js.map
|