New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blackboard-env

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blackboard-env - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

67

dist/cli.js
'use strict';
require("./cli-index");
const spawn = require("cross-spawn");
const fs = require("fs");
const argv = require("minimist")(process.argv.slice(2));
const NODE_ENV = process.env.NODE_ENV || "development";
function getEnvironment() {
return Object.keys(process.env)
.filter(key => /^/i.test(key))
.reduce(
(env, key) => {
env[key] = process.env[key];
return env;
},
{ NODE_ENV: NODE_ENV }
);
}
function resolveFile(file) {
const path = fs.realpathSync(process.cwd());
return `${path}/${file}`;
}
function getEnvFiles() {
let appendFiles = [];
if (argv.env) {
if (typeof argv.env === "string") {
appendFiles = [argv.env];
} else {
appendFiles = argv.env;
}
}
return [
...appendFiles,
resolveFile(`.env.${NODE_ENV}.local`),
resolveFile(`.env.${NODE_ENV}`),
NODE_ENV !== "test" && resolveFile(".env.local"),
resolveFile(".env")
].filter(Boolean);
}
const dotenvFiles = getEnvFiles();
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require("dotenv-expand")(
require("dotenv").config({
path: dotenvFile
})
);
}
});
if (argv._[0]) {
spawn(argv._[0], argv._.slice(1), { stdio: "inherit" }).on("exit", function(
exitCode
) {
process.exit(exitCode);
});
}
const window= {};
window._env = getEnvironment();
module.exports = window;

2

dist/index.js

@@ -7,3 +7,3 @@ 'use strict';

const window = require('./cli-index');
const window = require('./cli');

@@ -10,0 +10,0 @@ // if (!window) {

{
"name": "blackboard-env",
"version": "1.2.1",
"version": "1.2.2",
"description": "",
"main": "dist/index.js",
"types": "dist/types.d.ts",
"bin": {
"blackboard-env": "dist/cli.js"
},
"scripts": {

@@ -11,0 +8,0 @@ "test": "jest",

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