< Summary - Envilder CLI

Information
Class: src/envilder/core/infrastructure/github/GitHubActionsSecretMasker.ts
Assembly: Default
File(s): src/envilder/core/infrastructure/github/GitHubActionsSecretMasker.ts
Tag: 484_34168995013
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 11
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

src/envilder/core/infrastructure/github/GitHubActionsSecretMasker.ts

#LineLine coverage
 1import type { ISecretMasker } from '../../domain/ports/ISecretMasker.js';
 2
 3export class GitHubActionsSecretMasker implements ISecretMasker {
 4  mask(value: string): void {
 25    const escapedValue = value
 6      .replace(/%/g, '%25')
 7      .replace(/\r/g, '%0D')
 8      .replace(/\n/g, '%0A');
 29    process.stdout.write(`::add-mask::${escapedValue}\n`);
 10  }
 11}

Methods/Properties

mask