v9.1.0
envaptClasses

PortableSource

Environment source seeded from an object you provide, for every runtime without a filesystem. Pass the object straight through, such as the config your bundler injects into a browser build (Vite's import.meta.env, a webpack DefinePlugin global), the Cloudflare env binding, a Vercel Edge or Fastly config object, a test fixture, or any plain object. Non-string values are JSON-stringified so the converters still apply. Those values must be JSON-serializable. Without a filesystem the .env cascade and file APIs do not apply.

See

https://envapt.materwelon.dev/docs/sources#the-sources-envapt-ships

Implements

  • BareSource

Constructors

Constructor

new PortableSource(vars): PortableSource;

Parameters

ParameterType
varsobject

Returns

PortableSource

Properties

PropertyModifierTypeDefault valueDescription
supportsFilesreadonlyfalsefalseAlways false.

Methods

readVars()

readVars(): Record<string, string>;

Returns a copy of the provided object with every value as a string.

Returns

Record<string, string>

Implementation of

BareSource.readVars

On this page