< Summary - Envilder Node.js SDK

Information
Class: src/sdks/nodejs/src/infrastructure/azure/azure-secret-name.ts
Assembly: Default
File(s): src/sdks/nodejs/src/infrastructure/azure/azure-secret-name.ts
Tag: 558_41035824231
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
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/sdks/nodejs/src/infrastructure/azure/azure-secret-name.ts

#LineLine coverage
 1/**
 2 * The only translation between a map-file reference and a Key Vault secret
 3 * name, shared with the envilder CLI: `/` becomes `-`, ignoring leading
 4 * slashes, so a path-style reference such as `/myapp/db/password` reads
 5 * `myapp-db-password`. Anything else reaches Key Vault as written, and a
 6 * name it does not accept fails with Key Vault's own error.
 7 * @see https://learn.microsoft.com/azure/key-vault/general/about-keys-secrets-certificates#objects-identifiers-and-vers
 8 */
 9export function toAzureSecretName(name: string): string {
 2110  return name.replace(/^\/+/, '').replace(/\//g, '-');
 11}

Methods/Properties

toAzureSecretName