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

app-center-environment-variable-updater

v1.0.0

Published

Bulk update the environment variables for an MS App Center branch build configuration.

Downloads

101

Readme

Branch Environment Variables Updater for Microsoft App Center

What?

This tool will allow you to bulk update the Environment Variables for MS App Center branch build configurations. Just paste it into the command line, or set it as a string in an Environment Variable in your own environment where you run the commmand.

Why?

Because I have 50+ environment variables to set on multiple branch build configurations, Microsoft only allow you to set these via a GUI where you have to paste each key and value individually. That is 100s of copy/paste cycles. No thank you.

How?

This uses the official App Center API Service.

Usage

This is just a Node script, so you'll need node installed.

1 - Clone

git clone [email protected]/xxx.git

2 - Install Dependencies

yarn install
OR
npm install

3 - Run the script

node ./index.js

Unattended / CI Mode

You can fully automate this script by setting the relevant variables in your environment, or adding a .env file in the root. See the .env.example file, rename to .env to try it out.

MS_AS_ENV

The enviroment variables to set, represented as a string. Example:

MS_AS_ENV="X=1\nR=2"

MS_AS_API_KEY

Your API key. Must have full write access. To get your API key, in App Center, go to Account Settings -> API Tokens and create one.

MS_AS_OWNER_NAME

The owner organisation name, as shown in the URL when viewing the app in App Center.

/apps/{owner name}/{app name}/branches/{branch name}/config

MS_AS_APP_NAME

The app name, as shown in the URL when viewing the app in App Center.

/apps/{owner name}/{app name}/branches/{branch name}/config

MS_AS_APP_BRANCH

The name of the branch to update the configuration for. The branch must be appearing in App Center for it to work.

MS_AS_REPLACE_ENV

Whether or not to entirely replace the existing list of variables. If true, all existing ones are deleted first. If false, the variables you provide will be merged.