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

Function warnAboutMissingTrackedDefault

scripts/web-env/index.ts:118–129  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

116 const content = readFileSync(path.join(repoRoot, relativeFile), 'utf8');
117 const trackedValue = defaults.get(relativeFile) ?? assignmentValue(content, name);
118 const matchesRemoteValue = Object.values(values).some(value => trackedValue === value);
119 if (matchesRemoteValue) {
120 throw new Error(
121 `${relativeFile} contains or would contain a remote environment value. Use a non-secret local default instead.`
122 );
123 }
124 }
125}
126
127async function runSet(options: SetOptions): Promise<void> {
128 const environments: readonly Environment[] = options.only ? [options.only] : ENVIRONMENTS;
129 const sensitive = await askSensitivity(options.name);
130 const repoRoot = findRepoRoot();
131 const tempDirectory = mkdtempSync(path.join(os.tmpdir(), 'kilo-web-env-'));
132

Callers 1

mainFunction · 0.85

Calls 1

warnMethod · 0.65

Tested by

no test coverage detected