Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acryps/environment

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acryps/environment - npm Package Compare versions

Comparing version 0.0.3 to 1.0.0

7

built/index.js

@@ -60,3 +60,3 @@ "use strict";

function convertToEnvironmentVariableName(...path) {
return path.join('_').toUpperCase();
return path.join('_').replace(/[A-Z]/g, match => `_${match}`).toUpperCase();
}

@@ -127,7 +127,6 @@ const environment = {};

}
// todo add multi platform support
const childProgramLocation = (0, child_process_1.spawnSync)('which', [childProgram[0]]).stdout.toString().trim();
const nodeLocation = process.execPath;
// do not inject any variables from our state
// passing our own properties like 'active setting' would allow developers to add checks to them instead of using the configured environment variables, which is not intended
const childProcess = (0, child_process_1.spawn)(childProgramLocation, childProgram.slice(1), {
const childProcess = (0, child_process_1.spawn)(nodeLocation, childProgram.slice(1), {
stdio: 'inherit',

@@ -134,0 +133,0 @@ env: {

@@ -13,3 +13,6 @@ {

}
},
"scripts": {
"start": "environment index.js"
}
}
{
"name": "@acryps/environment",
"version": "0.0.3",
"version": "1.0.0",
"license": "GPL-3.0-only",

@@ -5,0 +5,0 @@ "bin": {

# acryps environment
Environment variable manager for local development
> Currently only supports systems that have the unix 'which' command.
## Getting Started

@@ -11,3 +9,3 @@ `npm install @acryps/environment --save-dev`

`tsc && node index.js` → `tsc && environment node index.js`
`tsc && node index.js` → `tsc && environment index.js`

@@ -39,2 +37,10 @@ Define environment variables in your `package.json`

- `…?default`: Set a default value which will be accepted when the user does not provide a value
- `+…`: Require a numeric value
- `+…`: Require a numeric value
Adding an uppercase letter in the variables name will automatically be expanded with a `_`: `accessKey` → `ACCESS_KEY`
## Node Options
Options for node can still be used, just add them before your modules location
`node --max-old-space-size=16192 index.js` → `environment --max-old-space-size=16192 index.js`
The child program will be executed with the same node as environment (using `process.execPath`)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc