Compare commits

...

7 Commits

Author SHA1 Message Date
73c223af6c 1.1.2 2017-01-21 11:51:35 +01:00
ead69f3bb9 remove beautylog dependency 2017-01-21 11:51:30 +01:00
7de17bbefa add better README 2016-12-31 19:26:32 +01:00
4e39970dd7 1.1.1 2016-08-04 16:44:48 +02:00
2a7c239176 fix interface naming 2016-08-04 16:44:42 +02:00
35e71ccf00 1.1.0 2016-08-04 16:09:44 +02:00
11a2cf83ee add keyValueObjectArray 2016-08-04 16:09:39 +02:00
14 changed files with 222 additions and 150 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules/ node_modules/
coverage/ coverage/
docs/ pages/
public/

View File

@ -3,13 +3,16 @@ image: hosttoday/ht-docker-node:npmts
stages: stages:
- test - test
- release - release
- trigger
- pages
testLEGACY: testLEGACY:
stage: test stage: test
script: script:
- npmci test lts - npmci test legacy
tags: tags:
- docker - docker
allow_failure: true
testLTS: testLTS:
stage: test stage: test
@ -33,3 +36,24 @@ release:
- tags - tags
tags: tags:
- docker - docker
trigger:
stage: trigger
script:
- npmci trigger
only:
- tags
tags:
- docker
pages:
image: hosttoday/ht-docker-node:npmpage
stage: pages
script:
- npmci command npmpage --publish gitlab
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public

View File

@ -1,7 +1,26 @@
# qenv # qenv
provides an easy way for promised environments easy promised environments
## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/qenv)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/qenv)
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/qenv)
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/qenv/)
## Status for master
[![build status](https://GitLab.com/pushrocks/qenv/badges/master/build.svg)](https://GitLab.com/pushrocks/qenv/commits/master)
[![coverage report](https://GitLab.com/pushrocks/qenv/badges/master/coverage.svg)](https://GitLab.com/pushrocks/qenv/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/qenv.svg)](https://www.npmjs.com/package/qenv)
[![Dependency Status](https://david-dm.org/pushrocks/qenv.svg)](https://david-dm.org/pushrocks/qenv)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/qenv/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/qenv/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/qenv/badges/code.svg)](https://www.bithound.io/github/pushrocks/qenv)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Usage ## Usage
Use TypeScript for best in class instellisense.
qenv works with two files: qenv works with two files:
* **qenv.yml** - specifies which ENV vars are required. * **qenv.yml** - specifies which ENV vars are required.
@ -11,9 +30,11 @@ Now obviously you can set build specific env vars in many CI environments.
So there we do not need an **env.yml** since all ENV vars are in place So there we do not need an **env.yml** since all ENV vars are in place
However when on another machine you can have a env.yml that will be added to the environment by qenv. However when on another machine you can have a env.yml that will be added to the environment by qenv.
```typescript ```javascript
import {Qenv} from "qenv"; import {Qenv} from "qenv";
myQenv = new Qenv("path/to/dir/where/qenv.yml/is/","path/to/dir/where/env.yml/is("); myQenv = new Qenv("path/to/dir/where/qenv.yml/is/","path/to/dir/where/env.yml/is(");
``` ```
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)

5
dist/index.d.ts vendored
View File

@ -1,6 +1,11 @@
export interface IKeyValueObject {
key: string;
value: string;
}
export declare class Qenv { export declare class Qenv {
requiredEnvVars: string[]; requiredEnvVars: string[];
availableEnvVars: string[]; availableEnvVars: string[];
missingEnvVars: string[]; missingEnvVars: string[];
keyValueObjectArray: IKeyValueObject[];
constructor(basePathArg: string, envYmlPathArg: any, failOnMissing?: boolean); constructor(basePathArg: string, envYmlPathArg: any, failOnMissing?: boolean);
} }

73
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,4 @@
import "typings-global"; import 'typings-global';
export import beautylog = require("beautylog");
export declare let lodash: any; export declare let lodash: any;
export import path = require("path"); export import path = require('path');
export import smartfile = require("smartfile"); export import smartfile = require('smartfile');

View File

@ -1,8 +1,6 @@
"use strict"; "use strict";
require("typings-global"); require("typings-global");
exports.beautylog = require("beautylog"); exports.lodash = require('lodash');
exports.lodash = require("lodash");
exports.path = require("path"); exports.path = require("path");
exports.smartfile = require("smartfile"); exports.smartfile = require("smartfile");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicWVudi5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvcWVudi5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBd0I7QUFDYixRQUFBLE1BQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDdEMsK0JBQXFDO0FBQ3JDLHlDQUE4QyJ9
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInFlbnYucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ1YsaUJBQVMsV0FBVyxXQUFXLENBQUMsQ0FBQztBQUNwQyxjQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQ3hCLFlBQUksV0FBVyxNQUFNLENBQUMsQ0FBQztBQUN2QixpQkFBUyxXQUFXLFdBQVcsQ0FBQyxDQUFDIiwiZmlsZSI6InFlbnYucGx1Z2lucy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCI7XG5leHBvcnQgaW1wb3J0IGJlYXV0eWxvZyA9IHJlcXVpcmUoXCJiZWF1dHlsb2dcIik7XG5leHBvcnQgbGV0IGxvZGFzaCA9IHJlcXVpcmUoXCJsb2Rhc2hcIik7XG5leHBvcnQgaW1wb3J0IHBhdGggPSByZXF1aXJlKFwicGF0aFwiKTtcbmV4cG9ydCBpbXBvcnQgc21hcnRmaWxlID0gcmVxdWlyZShcInNtYXJ0ZmlsZVwiKTtcbiJdfQ==

View File

@ -1,7 +1,7 @@
{ {
"name": "qenv", "name": "qenv",
"version": "1.0.8", "version": "1.1.2",
"description": "promised environments", "description": "easy promised environments",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"scripts": { "scripts": {
@ -23,15 +23,14 @@
}, },
"homepage": "https://gitlab.com/pushrocks/qenv#README", "homepage": "https://gitlab.com/pushrocks/qenv#README",
"devDependencies": { "devDependencies": {
"npmts-g": "^5.2.6", "npmts-g": "^6.0.0",
"should": "^9.0.2", "smartchai": "^1.0.1",
"typings-test": "^1.0.1" "typings-test": "^1.0.3"
}, },
"dependencies": { "dependencies": {
"beautylog": "^5.0.12", "lodash": "^4.17.4",
"lodash": "^4.13.1",
"q": "^1.4.1", "q": "^1.4.1",
"smartfile": "^3.0.10", "smartfile": "^4.1.3",
"typings-global": "^1.0.3" "typings-global": "^1.0.14"
} }
} }

3
test/test.d.ts vendored
View File

@ -1,2 +1 @@
import "typings-test"; import 'typings-test';
import "should";

View File

@ -1,23 +1,26 @@
"use strict"; "use strict";
require("typings-test"); require("typings-test");
var path = require("path"); const path = require("path");
require("should"); const smartchai_1 = require("smartchai");
var index_1 = require("../dist/index"); const index_1 = require("../dist/index");
process.cwd = function () { process.cwd = () => {
return path.join(__dirname, "./assets/"); return path.join(__dirname, './assets/');
}; };
process.env["key1"] = "original"; process.env['key1'] = 'original';
var qenvTestObject; let qenvTestObject;
describe("Qenv class", function () { describe('Qenv class', function () {
it("should create a new class", function () { it('should create a new class', function () {
qenvTestObject = new index_1.Qenv(process.cwd(), process.cwd(), false); qenvTestObject = new index_1.Qenv(process.cwd(), process.cwd(), false);
}); });
it("key1 should be not be overwritten since it is already present", function () { it('key1 should be not be overwritten since it is already present', function () {
process.env.key1.should.equal("original"); smartchai_1.expect(process.env.key1).to.equal('original');
}); });
it("key2 should be read from Yml", function () { it('key2 should be read from Yml', function () {
process.env.key2.should.equal("fromYml"); smartchai_1.expect(process.env.key2).to.equal('fromYml');
});
it('keyValueObjectArray should hold all retrieved values', function () {
smartchai_1.expect(qenvTestObject.keyValueObjectArray[0].value).to.equal('original');
smartchai_1.expect(qenvTestObject.keyValueObjectArray[1].value).to.equal('fromYml');
}); });
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUNyQiw2QkFBNEI7QUFDNUIseUNBQWtDO0FBQ2xDLHlDQUFrQztBQUVsQyxPQUFPLENBQUMsR0FBRyxHQUFHO0lBQ1YsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFDLFdBQVcsQ0FBQyxDQUFBO0FBQzNDLENBQUMsQ0FBQTtBQUVELE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLEdBQUcsVUFBVSxDQUFBO0FBRWhDLElBQUksY0FBbUIsQ0FBQTtBQUN2QixRQUFRLENBQUMsWUFBWSxFQUFDO0lBQ2xCLEVBQUUsQ0FBQywyQkFBMkIsRUFBQztRQUMzQixjQUFjLEdBQUcsSUFBSSxZQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxFQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsRUFBQyxLQUFLLENBQUMsQ0FBQTtJQUNoRSxDQUFDLENBQUMsQ0F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xufVxuXG5wcm9jZXNzLmVudltcImtleTFcIl0gPSBcIm9yaWdpbmFsXCJcblxubGV0IHFlbnZUZXN0T2JqZWN0OlFlbnY7XG5kZXNjcmliZShcIlFlbnYgY2xhc3NcIixmdW5jdGlvbigpe1xuICAgIGl0KFwic2hvdWxkIGNyZWF0ZSBhIG5ldyBjbGFzc1wiLGZ1bmN0aW9uKCl7XG4gICAgICAgIHFlbnZUZXN0T2JqZWN0ID0gbmV3IFFlbnYocHJvY2Vzcy5jd2QoKSxwcm9jZXNzLmN3ZCgpLGZhbHNlKTtcbiAgICB9KTtcbiAgICBpdChcImtleTEgc2hvdWxkIGJlIG5vdCBiZSBvdmVyd3JpdHRlbiBzaW5jZSBpdCBpcyBhbHJlYWR5IHByZXNlbnRcIixmdW5jdGlvbigpe1xuICAgICAgICBwcm9jZXNzLmVudi5rZXkxLnNob3VsZC5lcXVhbChcIm9yaWdpbmFsXCIpO1xuICAgIH0pO1xuICAgIGl0KFwia2V5MiBzaG91bGQgYmUgcmVhZCBmcm9tIFltbFwiLGZ1bmN0aW9uKCl7XG4gICAgICAgIHByb2Nlc3MuZW52LmtleTIuc2hvdWxkLmVxdWFsKFwiZnJvbVltbFwiKTtcbiAgICB9KVxuXG59KTsiXX0=

View File

@ -1,24 +1,28 @@
import "typings-test"; import 'typings-test'
import * as path from "path"; import * as path from 'path'
import "should"; import { expect } from 'smartchai'
import {Qenv} from "../dist/index"; import {Qenv} from '../dist/index'
process.cwd = () => { process.cwd = () => {
return path.join(__dirname,"./assets/"); return path.join(__dirname,'./assets/')
} }
process.env["key1"] = "original" process.env['key1'] = 'original'
let qenvTestObject:Qenv; let qenvTestObject:Qenv
describe("Qenv class",function(){ describe('Qenv class',function(){
it("should create a new class",function(){ it('should create a new class',function(){
qenvTestObject = new Qenv(process.cwd(),process.cwd(),false); qenvTestObject = new Qenv(process.cwd(),process.cwd(),false)
}); })
it("key1 should be not be overwritten since it is already present",function(){ it('key1 should be not be overwritten since it is already present',function(){
process.env.key1.should.equal("original"); expect(process.env.key1).to.equal('original')
}); })
it("key2 should be read from Yml",function(){ it('key2 should be read from Yml',function(){
process.env.key2.should.equal("fromYml"); expect(process.env.key2).to.equal('fromYml')
})
it('keyValueObjectArray should hold all retrieved values',function(){
expect(qenvTestObject.keyValueObjectArray[0].value).to.equal('original')
expect(qenvTestObject.keyValueObjectArray[1].value).to.equal('fromYml')
}) })
}); })

View File

@ -1,61 +1,71 @@
import * as plugins from "./qenv.plugins"; import * as plugins from "./qenv.plugins"
export interface IKeyValueObject {
key: string,
value: string
};
export class Qenv { export class Qenv {
requiredEnvVars:string[]; requiredEnvVars: string[] = []
availableEnvVars:string[]; availableEnvVars:string[] = []
missingEnvVars:string[]; missingEnvVars:string[] = []
keyValueObjectArray:IKeyValueObject[] = []
constructor(basePathArg = process.cwd(),envYmlPathArg,failOnMissing = true){ constructor(basePathArg = process.cwd(),envYmlPathArg,failOnMissing = true){
this.requiredEnvVars = getRequiredEnvVars(basePathArg); getRequiredEnvVars(basePathArg,this.requiredEnvVars)
this.availableEnvVars = getAvailableEnvVars(this.requiredEnvVars,envYmlPathArg); getAvailableEnvVars(this.requiredEnvVars,envYmlPathArg,this.availableEnvVars,this.keyValueObjectArray)
this.missingEnvVars = getMissingEnvVars(this.requiredEnvVars,this.availableEnvVars); this.missingEnvVars = getMissingEnvVars(this.requiredEnvVars,this.availableEnvVars)
// handle missing variables // handle missing variables
if (this.missingEnvVars.length > 0){ if (this.missingEnvVars.length > 0){
plugins.beautylog.info("Required Env Vars are:") console.info('Required Env Vars are:')
console.log(this.requiredEnvVars); console.log(this.requiredEnvVars)
plugins.beautylog.error("However some Env variables could not be resolved:"); console.error('However some Env variables could not be resolved:')
console.log(this.missingEnvVars); console.log(this.missingEnvVars)
if (failOnMissing) { if (failOnMissing) {
plugins.beautylog.error("Exiting!") console.error('Exiting!')
process.exit(1); process.exit(1)
}
} }
} }
}; };
};
let getRequiredEnvVars = (pathArg:string):string[] => { let getRequiredEnvVars = (pathArg: string, requiredEnvVarsArray: string[]) => {
let result:string[] = []; let qenvFilePath = plugins.path.join(pathArg,'qenv.yml')
let qenvFilePath = plugins.path.join(pathArg,"qenv.yml"); let qenvFile = plugins.smartfile.fs.toObjectSync(qenvFilePath)
let qenvFile = plugins.smartfile.local.toObjectSync(qenvFilePath);
for (let keyArg in qenvFile.vars) { for (let keyArg in qenvFile.vars) {
result.push(qenvFile.vars[keyArg]); requiredEnvVarsArray.push(qenvFile.vars[keyArg])
} };
return result;
} }
let getAvailableEnvVars = (requiredEnvVarsArg:string[],envYmlPathArg:string):string[] => {
let result = [];
envYmlPathArg = plugins.path.join(envYmlPathArg,"env.yml") let getAvailableEnvVars = (requiredEnvVarsArg: string[],envYmlPathArg: string,availableEnvVarsArray: string[],keyValueObjectArrayArg: IKeyValueObject[]) => {
let envYml; envYmlPathArg = plugins.path.join(envYmlPathArg,'env.yml')
let envYml
try { try {
envYml = plugins.smartfile.local.toObjectSync(envYmlPathArg); envYml = plugins.smartfile.fs.toObjectSync(envYmlPathArg)
} catch (err) {
console.log("env file couldn't be found at " + envYmlPathArg)
envYml = {}
} }
catch(err){ for (let requiredEnvVar of requiredEnvVarsArg){
plugins.beautylog.log("env file couldn't be found at " + envYmlPathArg)
envYml = {};
}
for(let keyArg in requiredEnvVarsArg){
let requiredEnvVar:string = requiredEnvVarsArg[keyArg];
if (process.env[requiredEnvVar]){ if (process.env[requiredEnvVar]){
result.push(requiredEnvVar); availableEnvVarsArray.push(requiredEnvVar)
keyValueObjectArrayArg.push({
key: requiredEnvVar,
value: process.env[requiredEnvVar]
})
} else if (envYml.hasOwnProperty(requiredEnvVar)){ } else if (envYml.hasOwnProperty(requiredEnvVar)){
process.env[requiredEnvVar] = envYml[requiredEnvVar]; process.env[requiredEnvVar] = envYml[requiredEnvVar]
result.push(requiredEnvVar); availableEnvVarsArray.push(requiredEnvVar)
keyValueObjectArrayArg.push({
key: requiredEnvVar,
value: process.env[requiredEnvVar]
})
} }
} };
return result;
} }
let getMissingEnvVars = (requiredEnvVarsArray: string[],availableEnvVarsArray: string[]) => { let getMissingEnvVars = (requiredEnvVarsArray: string[],availableEnvVarsArray: string[]) => {
return plugins.lodash.difference(requiredEnvVarsArray,availableEnvVarsArray); return plugins.lodash.difference(requiredEnvVarsArray,availableEnvVarsArray)
} }

View File

@ -1,5 +1,4 @@
import "typings-global"; import 'typings-global';
export import beautylog = require("beautylog"); export let lodash = require('lodash');
export let lodash = require("lodash"); export import path = require('path');
export import path = require("path"); export import smartfile = require('smartfile')
export import smartfile = require("smartfile");

3
tslint.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "tslint-config-standard"
}