MCPcopy Create free account
hub / github.com/bytebase/bytebase / convertEnvironmentList

Function convertEnvironmentList

frontend/src/react/stores/app/workspace.ts:113–126  ·  view source on GitHub ↗
(
  environments: EnvironmentSetting_Environment[]
)

Source from the content-addressed store, hash-verified

111}
112
113function convertEnvironmentList(
114 environments: EnvironmentSetting_Environment[]
115): Environment[] {
116 return environments.map<Environment>((env, i) => ({
117 ...createProto(EnvironmentSetting_EnvironmentSchema, {
118 name: environmentNameFromId(env.id),
119 id: env.id,
120 title: env.title,
121 tags: env.tags,
122 }),
123 color: env.color ? colorToHex(env.color) : "",
124 order: i,
125 }));
126}
127
128function isSelfHostLicense() {
129 return import.meta.env.MODE.toLowerCase() !== "release-aws";

Callers 2

writeEnvironmentSettingFunction · 0.85
createWorkspaceSliceFunction · 0.85

Calls 2

colorToHexFunction · 0.90
environmentNameFromIdFunction · 0.85

Tested by

no test coverage detected