npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dmno/infisical-plugin

v0.0.2

Published

dmno plugin to pull secrets from Infisical

Downloads

66

Readme

Check out the docs for more information on how to use DMNO with Infisical.

*** THIS IS PREVIEW SOFTWARE AND SUBJECT TO RAPID CHANGE ***

If you have any questions, please reach out to us on Discord.


@dmno/infisical-plugin npm

Securely use your secrets and data from Infisical within DMNO Config Engine.

Plugin

Initialization

You must initialize an instance of the plugin, giving it a unique ID and wiring up the access token to its location within your config schema.

Then you can use the plugin instance which now has authentication, to fetch individual items by their name.

For example:

import { DmnoBaseTypes, defineDmnoService, configPath, NodeEnvType, switchBy, configPath } from 'dmno';
import { InfisicalDmnoPlugin, InfisicalTypes } from '@dmno/infisical-plugin';

// automatically injects the required config items by type
const infisicalPlugin = new InfisicalDmnoPlugin('infisical', {
  environment: "dev",
});

// or you can explicitly wire it up by path, this is equivalent to the above
const infisicalPlugin2 = new InfisicalDmnoPlugin('infisical', {
  environment: "dev",
  clientId: configPath('..', 'INFISICAL_CLIENT_ID'),
  clientSecret: configPath('..', 'INFISICAL_CLIENT_SECRET'),
  projectId: configPath('..', 'INFISICAL_PROJECT_ID'),
});

export default defineDmnoService({
  schema: {
    //...
    INFISICAL_CLIENT_ID: {
      extends: InfisicalTypes.clientId,
    },
    INFISICAL_CLIENT_SECRET: {
      extends: InfisicalTypes.clientSecret,
    },
    INFISICAL_PROJECT_ID: {
      extends: InfisicalTypes.projectId,
    },
    // USES IMPLICIT CONFIG ITEM NAME, must match the name in Infisical
    ITEM_FROM_INFISICAL: {
      value: infisicalPlugin.secret()
    },
    // USES EXPLICIT NAME from Infisical
    ITEM_FROM_INFISICAL_BY_NAME: {
      value: infisicalPlugin.secret('MY_SECRET_NAME')
    },
    //...

Since the access token is sensitive, you'll need to populate the value of INFISICAL_CLIENT_SECRET using an override. For local development, you can store the machine access token in your .dmno/.env.local file, and in deployed environments you can set it as an environment variable.

Value Resolvers

Fetch item by Name

infisicalPlugin.secret(nameOverride)

Data Types

  • InfisicalTypes.clientId
  • InfisicalTypes.clientSecret
  • InfisicalTypes.environment
  • InfisicalTypes.projectId