Skip to content

Overlap with sveltekit's explicit variables #349

Description

@sacrosanctic

https://svelte.dev/docs/kit/environment-variables#Explicit-environment-variables

It feels like I have to declare everything twice, which is a chore. Is there some way we can have an integration between the node sdk and sveltekit? The problem is that secretspec and sveltekit asks for different things in different formats. Maybe I can define everything in the env.ts and have secretspec get the config from that instead of a secretspec.toml.

import { SecretSpec, sveltekitVars } from 'secretspec'

const resolved = SecretSpec.builder()
  .withProvider('keyring://')
  .withProfile('production')
  .withReason('boot web app')
  .load();

export const variables = sveltekitVars(resolved, {
  DATABASE_URL = {
    description: "PostgreSQL connection string", // used by both
    required: true,                              // used by secretspec
    static: false,                               // used by sveltekit
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions