| 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 | |
| 127 | async 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 | |