انتقل إلى المحتوى الرئيسي

Function: secretValuePointers()

secretValuePointers(schema, value): string[]

Defined in: packages/contracts/src/setup-answers.ts:661

Finds every place a value sits where the schema asks for a secret reference.

The schema alone already refuses such a request: this exists so the refusal can say what happened (secret_value_refused) instead of "must match pattern", which an operator who pasted a password would not read as "you pasted a password". It returns JSON pointers and never the offending value, which by definition may be a secret.

Parameters​

schema​

TSchema

A schema built from the sections in this module.

value​

unknown

The untrusted value the schema is about to be applied to.

Returns​

string[]

One JSON pointer per field that holds something other than a secret:// reference; empty when every secret field present holds a reference.