@@ -54073,16 +54073,18 @@ var Bytes = class _Bytes {
5407354073 }
5407454074 return dec < binary ? `${dec}${decimalSuffixes[i]}` : `${binary}${binarySuffixes[i]}`;
5407554075 }
54076- toString({ decimals = 0, trimTrailingZeroes = false } = {}) {
54076+ toString({ decimals = 0, trimTrailingZeroes = false, unitBase = "1000" } = {}) {
5407754077 if (decimals < 0) {
5407854078 throw new InvalidArgument3("No negative decimals allowed.");
5407954079 }
54080+ const suffixes = stringSuffixes[unitBase];
5408054081 if (this.bytes === 0) {
54081- return "0 Bytes" ;
54082+ return `0 ${suffixes[0]}` ;
5408254083 }
54083- const exp = Math.floor(Math.log(this.bytes) / Math.log(1024));
54084- const value = (this.bytes / Math.pow(1024, exp)).toFixed(decimals);
54085- return `${trimTrailingZeroes ? parseFloat(value) : value} ${stringSuffixes[exp]}`;
54084+ const base = unitBase === "1024" ? 1024 : 1e3;
54085+ const exp = Math.floor(Math.log(this.bytes) / Math.log(base));
54086+ const value = (this.bytes / Math.pow(base, exp)).toFixed(decimals);
54087+ return `${trimTrailingZeroes ? parseFloat(value) : value} ${suffixes[exp]}`;
5408654088 }
5408754089 add(other) {
5408854090 return bytes(this.bytes + other.bytes);
@@ -54117,7 +54119,10 @@ var Bytes = class _Bytes {
5411754119};
5411854120var binarySuffixes = ["", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei"];
5411954121var decimalSuffixes = ["b", "k", "M", "G", "T", "P", "E"];
54120- var stringSuffixes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB"];
54122+ var stringSuffixes = {
54123+ "1024": ["Bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"],
54124+ "1000": ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB"]
54125+ };
5412154126var k8sUnit2Byte = (unit, suffixes, base) => {
5412254127 const exp = suffixes.findIndex((e) => e === unit);
5412354128 if (exp === -1) {
@@ -55543,7 +55548,6 @@ var LandscapeStatus;
5554355548 LandscapeStatus2["Deploying"] = "Deploying servers";
5554455549 LandscapeStatus2["ServersDeployed"] = "Servers are deployed";
5554555550 LandscapeStatus2["Scaled"] = "Servers are scaled";
55546- LandscapeStatus2["Failed"] = "Landscape deploy failed";
5554755551})(LandscapeStatus || (LandscapeStatus = {}));
5554855552var toLandscapeStatus = toStringEnum("LandscapeStatus", LandscapeStatus);
5554955553
@@ -56473,6 +56477,7 @@ var CodesphereEnv;
5647356477 CodesphereEnv2["Test"] = "test";
5647456478 CodesphereEnv2["LocalTest"] = "local-test";
5647556479 CodesphereEnv2["PrivateCloud"] = "private-cloud";
56480+ CodesphereEnv2["TelioDev"] = "telio-dev";
5647656481})(CodesphereEnv || (CodesphereEnv = {}));
5647756482var codesphereEnvId = serviceId("CodesphereEnv");
5647856483var toCodesphereEnv = toStringEnum("CodesphereEnv", CodesphereEnv);
@@ -56565,11 +56570,20 @@ var isEnabled = (name) => {
5656556570 return enabled.has(name);
5656656571};
5656756572
56573+ // packages/utils/common/lib/features.js
56574+ var AVAILABLE_FEATURES = ["email-signup", "email-signin"];
56575+ var availableFeatures = [...AVAILABLE_FEATURES];
56576+ var toFeatureName = toLiteralUnion("FeatureName", availableFeatures);
56577+
5656856578// packages/ide/common/lib/BrowserConfig.js
5656956579var toExperiments = toObject({
5657056580 available: toReadOnly(toArray(toString)),
5657156581 enabled: toReadOnly(toArray(toExperimentName))
5657256582});
56583+ var toFeatures = toObject({
56584+ available: toReadOnly(toArray(toString)),
56585+ enabled: toReadOnly(toArray(toFeatureName))
56586+ });
5657356587var toBrowserConfig = toObject({
5657456588 version: toString,
5657556589 env: toCodesphereEnv,
0 commit comments