@vm0/cli 9.83.1 → 9.83.3
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/{chunk-5BLBSO2W.js → chunk-IFUYTPFH.js} +48 -66
- package/chunk-IFUYTPFH.js.map +1 -0
- package/index.js +12 -13
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +15 -34
- package/zero.js.map +1 -1
- package/chunk-5BLBSO2W.js.map +0 -1
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
createZeroAgent,
|
|
10
10
|
createZeroComputerConnector,
|
|
11
11
|
createZeroConnectorSession,
|
|
12
|
-
decodeCliTokenPayload,
|
|
13
12
|
decodeZeroTokenPayload,
|
|
14
13
|
deleteZeroAgent,
|
|
15
14
|
deleteZeroComputerConnector,
|
|
@@ -82,7 +81,7 @@ import {
|
|
|
82
81
|
updateZeroUserPreferences,
|
|
83
82
|
upsertZeroOrgModelProvider,
|
|
84
83
|
withErrorHandler
|
|
85
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-IFUYTPFH.js";
|
|
86
85
|
|
|
87
86
|
// src/zero.ts
|
|
88
87
|
import { Command as Command55 } from "commander";
|
|
@@ -129,16 +128,10 @@ var setCommand = new Command2().name("set").description("Rename your organizatio
|
|
|
129
128
|
);
|
|
130
129
|
}
|
|
131
130
|
const org = await updateZeroOrg({ slug, force: true });
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
token: result.access_token,
|
|
137
|
-
activeOrg: result.org_slug
|
|
138
|
-
});
|
|
139
|
-
} else {
|
|
140
|
-
await saveConfig({ activeOrg: org.slug });
|
|
141
|
-
}
|
|
131
|
+
const result = await switchZeroOrg(org.slug);
|
|
132
|
+
await saveConfig({
|
|
133
|
+
token: result.access_token
|
|
134
|
+
});
|
|
142
135
|
console.log(chalk2.green(`\u2713 Organization updated to ${org.slug}`));
|
|
143
136
|
console.log();
|
|
144
137
|
console.log("Your agents will now be namespaced as:");
|
|
@@ -182,16 +175,10 @@ var useCommand = new Command4().name("use").description("Switch to a different o
|
|
|
182
175
|
if (!target) {
|
|
183
176
|
throw new Error(`Organization '${slug}' not found or not accessible.`);
|
|
184
177
|
}
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
token: result.access_token,
|
|
190
|
-
activeOrg: result.org_slug
|
|
191
|
-
});
|
|
192
|
-
} else {
|
|
193
|
-
await saveConfig({ activeOrg: slug });
|
|
194
|
-
}
|
|
178
|
+
const result = await switchZeroOrg(slug);
|
|
179
|
+
await saveConfig({
|
|
180
|
+
token: result.access_token
|
|
181
|
+
});
|
|
195
182
|
console.log(chalk4.green(`\u2713 Switched to organization: ${slug}`));
|
|
196
183
|
})
|
|
197
184
|
);
|
|
@@ -244,7 +231,7 @@ var leaveCommand = new Command8().name("leave").description("Leave the current o
|
|
|
244
231
|
await leaveZeroOrg();
|
|
245
232
|
const { orgs } = await listZeroOrgs();
|
|
246
233
|
if (orgs.length === 0) {
|
|
247
|
-
await saveConfig({
|
|
234
|
+
await saveConfig({ token: void 0 });
|
|
248
235
|
console.log(chalk8.green("\u2713 Left organization."));
|
|
249
236
|
console.log(
|
|
250
237
|
chalk8.yellow("No remaining organizations. Run: vm0 auth login")
|
|
@@ -252,16 +239,10 @@ var leaveCommand = new Command8().name("leave").description("Leave the current o
|
|
|
252
239
|
return;
|
|
253
240
|
}
|
|
254
241
|
const nextOrg = orgs[0].slug;
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
token: result.access_token,
|
|
260
|
-
activeOrg: result.org_slug
|
|
261
|
-
});
|
|
262
|
-
} else {
|
|
263
|
-
await saveConfig({ activeOrg: nextOrg });
|
|
264
|
-
}
|
|
242
|
+
const result = await switchZeroOrg(nextOrg);
|
|
243
|
+
await saveConfig({
|
|
244
|
+
token: result.access_token
|
|
245
|
+
});
|
|
265
246
|
console.log(chalk8.green(`\u2713 Left organization. Switched to: ${nextOrg}`));
|
|
266
247
|
})
|
|
267
248
|
);
|
|
@@ -2997,7 +2978,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
2997
2978
|
}
|
|
2998
2979
|
}
|
|
2999
2980
|
var program = new Command55();
|
|
3000
|
-
program.name("zero").description("Zero CLI - Manage your zero platform").version("9.83.
|
|
2981
|
+
program.name("zero").description("Zero CLI - Manage your zero platform").version("9.83.3");
|
|
3001
2982
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|
|
3002
2983
|
configureGlobalProxyFromEnv();
|
|
3003
2984
|
registerZeroCommands(program);
|