MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / collectValues

Function collectValues

scripts/web-env/index.ts:86–104  ·  view source on GitHub ↗
(options: Options)

Source from the content-addressed store, hash-verified

84function warnAboutMissingTrackedDefault(name: string): void {
85 const border = '='.repeat(78);
86 console.warn(`
87\x1b[1;33m${border}
88NO TRACKED ENV DEFAULT WILL BE ADDED
89
90Make sure the application can start and run without ${name}. If the code requires
91this variable, external contributors without access to shared secrets will run
92into setup, test, or build failures.
93${border}\x1b[0m
94`);
95}
96
97function assignmentValue(content: string, name: string): string | undefined {
98 const assignment = content.split('\n').find(line => line.startsWith(`${name}=`));
99 if (!assignment) return undefined;
100 const value = assignment.slice(name.length + 1);
101 try {
102 const parsed: unknown = JSON.parse(value);
103 return typeof parsed === 'string' ? parsed : value;
104 } catch {
105 return value;
106 }
107}

Callers 1

mainFunction · 0.85

Calls 3

normalizeFileValueFunction · 0.85
readSecretFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected