storyblok 4.0.2 → 4.0.4
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/dist/index.mjs +16 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -792,12 +792,23 @@ program$e.command(commands.LOGIN).description("Login to the Storyblok CLI").opti
|
|
|
792
792
|
return value.length > 0;
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
|
+
let userRegion = region;
|
|
796
|
+
if (!userRegion) {
|
|
797
|
+
userRegion = await select({
|
|
798
|
+
message: "Please select the region you would like to work in:",
|
|
799
|
+
choices: Object.values(regions).map((region2) => ({
|
|
800
|
+
name: regionNames[region2],
|
|
801
|
+
value: region2
|
|
802
|
+
})),
|
|
803
|
+
default: regions.EU
|
|
804
|
+
});
|
|
805
|
+
}
|
|
795
806
|
spinner.start(`Logging in with token`);
|
|
796
|
-
const { user } = await loginWithToken(userToken,
|
|
807
|
+
const { user } = await loginWithToken(userToken, userRegion);
|
|
797
808
|
spinner.succeed();
|
|
798
|
-
updateSession(user.email, userToken,
|
|
799
|
-
await persistCredentials(
|
|
800
|
-
konsola.ok(`Successfully logged in to region ${chalk.hex(colorPalette.PRIMARY)(`${regionNames[
|
|
809
|
+
updateSession(user.email, userToken, userRegion);
|
|
810
|
+
await persistCredentials(userRegion);
|
|
811
|
+
konsola.ok(`Successfully logged in to region ${chalk.hex(colorPalette.PRIMARY)(`${regionNames[userRegion]} (${userRegion})`)}. Welcome ${chalk.hex(colorPalette.PRIMARY)(user.friendly_name)}.`, true);
|
|
801
812
|
} else {
|
|
802
813
|
const userEmail = await input({
|
|
803
814
|
message: "Please enter your email address:",
|
|
@@ -4035,7 +4046,7 @@ typesCommand.command("generate").description("Generate types d.ts for your compo
|
|
|
4035
4046
|
}
|
|
4036
4047
|
});
|
|
4037
4048
|
|
|
4038
|
-
const version = "4.0.
|
|
4049
|
+
const version = "4.0.4";
|
|
4039
4050
|
const pkg = {
|
|
4040
4051
|
version: version};
|
|
4041
4052
|
|