Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cicada/mod.ts>Secret

Write CI/CD pipelines using TypeScript
Go to Latest
class Secret
import { Secret } from "https://deno.land/x/cicada@v0.1.49/mod.ts";

A secret is a secure variable, secrets are not cached whereas env variables are.

To use:

  • CLI: create a .env file or use the --secret flag.
  • Dashboard: create your secret key-value in the Cicada dashboard

To access to secret in code doing the following:

Examples

Example 1

var gh_token = new Secret.value("github-secret-key")

github-secret-key is the name of the key for my secret stored in the .env file or in the cicada dashboard

Constructors

new
Secret(name: string)

Creates a new Secret instance

Methods

value(): Promise<string>

Get a secret value from the secrets directory asynchronously.

This is an asynchronous version of valueSync().

valueSync(): string

Get a secret value from the secrets directory synchronously.

This is a synchronous version of value().