Compare commits

...

71 Commits

Author SHA1 Message Date
b4897d238f update description 2024-05-29 14:12:50 +02:00
df69e46697 update tsconfig 2024-04-14 17:32:19 +02:00
1493430d9f update npmextra.json: githost 2024-04-01 21:34:47 +02:00
78afde963b update npmextra.json: githost 2024-04-01 19:58:07 +02:00
a4a633e936 update npmextra.json: githost 2024-03-30 21:47:05 +01:00
27fbe00cb0 5.0.12 2023-11-09 16:37:53 +01:00
f3cc468eda fix(core): update 2023-11-09 16:37:52 +01:00
b303799b8d 5.0.11 2023-11-09 16:20:20 +01:00
590ed5b180 fix(core): update 2023-11-09 16:20:20 +01:00
ddcf52de19 5.0.10 2023-10-03 23:40:15 +02:00
c1b3af09ef fix(core): update 2023-10-03 23:40:15 +02:00
a1e2cda010 5.0.9 2023-10-03 18:55:37 +02:00
d409d3a532 fix(core): update 2023-10-03 18:55:36 +02:00
b4dae84835 5.0.8 2023-10-03 18:55:17 +02:00
20e27c93d9 fix(core): update 2023-10-03 18:55:16 +02:00
117dc6013c 5.0.7 2023-10-03 18:54:52 +02:00
c6bc433a73 fix(core): update 2023-10-03 18:54:51 +02:00
299815838c switch to new org scheme 2023-07-11 00:36:49 +02:00
e8318cbf2f switch to new org scheme 2023-07-10 02:48:52 +02:00
ae60053cff 5.0.6 2023-02-12 19:08:40 +01:00
dca3cf1f08 fix(core): update 2023-02-12 19:08:40 +01:00
eaf379b119 5.0.5 2023-01-03 16:46:41 +01:00
0074938e57 fix(core): update 2023-01-03 16:46:41 +01:00
eed1c75aba 5.0.4 2022-12-28 19:43:49 +01:00
6de2f36964 fix(core): update 2022-12-28 19:43:48 +01:00
76e777a3ac 5.0.3 2022-08-07 01:17:45 +02:00
165cd3737e fix(core): update 2022-08-07 01:17:45 +02:00
2f11d1ba0f 5.0.2 2022-05-28 23:22:31 +02:00
33692ff417 fix(core): update 2022-05-28 23:22:31 +02:00
f408337186 5.0.1 2022-03-25 13:22:43 +01:00
bd6d574226 fix(core): update 2022-03-25 13:22:42 +01:00
d5c2d167ec 5.0.0 2022-03-16 16:10:47 +01:00
2af6d5a974 4.0.18 2022-03-16 16:10:09 +01:00
fdba21d60d 4.0.17 2022-03-16 16:09:25 +01:00
c17ebca309 fix(core): update 2022-03-16 16:09:24 +01:00
a014dcf1ab 4.0.16 2020-10-13 20:09:15 +00:00
44bee7bf6f fix(core): update 2020-10-13 20:09:15 +00:00
7841917058 4.0.15 2020-09-29 19:29:51 +00:00
f5a674f98d fix(core): update 2020-09-29 19:29:50 +00:00
80ece7c093 4.0.14 2020-09-29 19:10:00 +00:00
39250b3d47 fix(core): update 2020-09-29 19:10:00 +00:00
ed78c0becf 4.0.13 2020-09-29 18:38:22 +00:00
63c103fde5 fix(core): update 2020-09-29 18:38:21 +00:00
88003bde0f 4.0.12 2020-09-29 17:49:34 +00:00
276a0641e8 fix(core): update 2020-09-29 17:49:33 +00:00
b166269cb4 4.0.11 2020-09-29 10:23:08 +00:00
3ca1b425bf fix(core): update 2020-09-29 10:23:07 +00:00
ffc07da665 4.0.10 2020-06-25 23:00:33 +00:00
be2adaf259 fix(core): update 2020-06-25 23:00:32 +00:00
7aa9637826 4.0.9 2020-06-25 22:26:05 +00:00
a3c4f87741 fix(core): update 2020-06-25 22:26:04 +00:00
f005f57764 4.0.8 2020-06-25 22:23:10 +00:00
6e418cdbf8 fix(core): update 2020-06-25 22:23:10 +00:00
87155900e1 4.0.8 2019-11-15 20:59:04 +01:00
d24b11f737 fix(core): update 2019-11-15 20:59:02 +01:00
17ebd58951 4.0.7 2019-08-22 00:20:11 +02:00
32bd229f91 fix(core): update 2019-08-22 00:20:10 +02:00
4e5ddf8411 4.0.6 2019-06-17 08:54:47 +02:00
701c7c1b8b fix(core): update 2019-06-17 08:54:46 +02:00
9a272def16 4.0.5 2019-06-17 08:51:04 +02:00
0213950aae fix(core): update 2019-06-17 08:51:03 +02:00
b7342dbf05 4.0.4 2019-06-17 08:46:28 +02:00
677c8d33b9 fix(core): update 2019-06-17 08:46:28 +02:00
ffc781011d 4.0.3 2018-02-14 00:29:00 +01:00
aeec1b36a3 fix CI 2018-02-14 00:28:56 +01:00
4c2e7f9446 4.0.2 2018-02-14 00:15:51 +01:00
dddad457f3 update npmextra 2018-02-14 00:15:47 +01:00
4f110c6e64 4.0.1 2018-02-14 00:13:16 +01:00
12d971c470 update ci 2018-02-14 00:13:12 +01:00
886c245e8d 4.0.0 2018-02-14 00:12:25 +01:00
50d610e5df update smartenv to support os information on nodejs 2018-02-14 00:12:21 +01:00
30 changed files with 6375 additions and 881 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

26
.gitignore vendored
View File

@ -1,14 +1,20 @@
node_modules/
.settings/
.idea/
.nogit/
# artifacts
coverage/
docs/
public/
pages/
#npm devug
npm-debug.log
# installs
node_modules/
ts/*.js
ts/*.js.map
ts/typings/
# caches
.yarn/
.cache/
.rpt2_cache
test/browser/browserified/
# builds
dist/
dist_*/
# custom

View File

@ -1,71 +0,0 @@
# gitzone standard
image: hosttoday/ht-docker-node:npmci
cache:
paths:
- .yarn/
key: "$CI_BUILD_STAGE"
stages:
- test
- release
- trigger
- pages
testLEGACY:
stage: test
script:
- npmci test legacy
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
allow_failure: true
testLTS:
stage: test
script:
- npmci test lts
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testSTABLE:
stage: test
script:
- npmci test stable
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
release:
stage: release
script:
- npmci publish
only:
- tags
tags:
- docker
trigger:
stage: trigger
script:
- npmci trigger
only:
- tags
tags:
- docker
pages:
image: hosttoday/ht-docker-node:npmci
stage: pages
script:
- npmci command yarn global add npmpage
- npmci command npmpage --publish gitlab
tags:
- docker
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public

11
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -1,29 +0,0 @@
# smartenv
store things about your environment and let them travel across modules
## Availabililty
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartenv)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartenv)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartenv)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartenv/)
## Status for master
[![build status](https://GitLab.com/pushrocks/smartenv/badges/master/build.svg)](https://GitLab.com/pushrocks/smartenv/commits/master)
[![coverage report](https://GitLab.com/pushrocks/smartenv/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartenv/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/smartenv.svg)](https://www.npmjs.com/package/smartenv)
[![Dependency Status](https://david-dm.org/pushrocks/smartenv.svg)](https://david-dm.org/pushrocks/smartenv)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/smartenv/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/smartenv/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/smartenv/badges/code.svg)](https://www.bithound.io/github/pushrocks/smartenv)
[![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
Use TypeScript for best in class instellisense.
For further information read the linked docs at the top of this README.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)

1
dist/index.d.ts vendored
View File

@ -1 +0,0 @@
export * from './smartenv.classes.smartenv';

7
dist/index.js vendored
View File

@ -1,7 +0,0 @@
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./smartenv.classes.smartenv"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGlEQUEyQyJ9

View File

@ -1,21 +0,0 @@
export interface IEnvObject {
name: string;
value: string;
}
export declare class Smartenv {
runtimeEnv: string;
isBrowser: boolean;
userAgent: string;
isNode: boolean;
nodeVersion: string;
isCI: boolean;
constructor();
/**
* get environment variables that fit the description
*/
getEnvVars(regexArg: RegExp): Promise<void>;
/**
* prints the environment to console
*/
printEnv(): Promise<void>;
}

View File

@ -1,49 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const helpers = require("./smartenv.envhelpers");
class Smartenv {
constructor() {
this.runtimeEnv = helpers.getEnvString();
this.isBrowser = helpers.isBrowser();
this.userAgent = helpers.getUserAgentString();
this.isNode = helpers.isNode();
this.nodeVersion = helpers.getNodeVersion();
this.isCI = helpers.isCI();
}
;
/**
* get environment variables that fit the description
*/
getEnvVars(regexArg) {
return __awaiter(this, void 0, void 0, function* () {
let EnvironmentArray = [];
// TODO: plugins.smartparam.forEachMinimatch()
});
}
/**
* prints the environment to console
*/
printEnv() {
return __awaiter(this, void 0, void 0, function* () {
if (this.isNode) {
console.log('running on NODE');
let smartenvVersion = require('../package.json').version;
console.log('node version is ' + this.nodeVersion + ' and smartenv version is ' + smartenvVersion);
}
else {
console.log('running on BROWSER');
console.log('browser is ' + this.userAgent);
}
});
}
}
exports.Smartenv = Smartenv;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuY2xhc3Nlcy5zbWFydGVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LmNsYXNzZXMuc21hcnRlbnYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUNBLGlEQUFpRDtBQVFqRDtJQU9FO1FBQ0UsSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsWUFBWSxFQUFFLENBQUE7UUFDeEMsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUMsU0FBUyxFQUFFLENBQUE7UUFDcEMsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUMsa0JBQWtCLEVBQUUsQ0FBQTtRQUM3QyxJQUFJLENBQUMsTUFBTSxHQUFHLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQTtRQUM5QixJQUFJLENBQUMsV0FBVyxHQUFHLE9BQU8sQ0FBQyxjQUFjLEVBQUUsQ0FBQTtRQUMzQyxJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQTtJQUM1QixDQUFDO0lBQUEsQ0FBQztJQUVGOztPQUVHO0lBQ0csVUFBVSxDQUFFLFFBQWdCOztZQUNoQyxJQUFJLGdCQUFnQixHQUFHLEVBQUUsQ0FBQTtZQUN6Qiw4Q0FBOEM7UUFDaEQsQ0FBQztLQUFBO0lBRUQ7O09BRUc7SUFDRyxRQUFROztZQUNaLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO2dCQUNoQixPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixDQUFDLENBQUE7Z0JBQzlCLElBQUksZUFBZSxHQUFHLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDLE9BQU8sQ0FBQTtnQkFDeEQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxrQkFBa0IsR0FBRyxJQUFJLENBQUMsV0FBVyxHQUFHLDJCQUEyQixHQUFHLGVBQWUsQ0FBQyxDQUFBO1lBQ3BHLENBQUM7WUFBQyxJQUFJLENBQUMsQ0FBQztnQkFDTixPQUFPLENBQUMsR0FBRyxDQUFDLG9CQUFvQixDQUFDLENBQUE7Z0JBQ2pDLE9BQU8sQ0FBQyxHQUFHLENBQUMsYUFBYSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQTtZQUM3QyxDQUFDO1FBQ0gsQ0FBQztLQUFBO0NBQ0Y7QUFyQ0QsNEJBcUNDIn0=

View File

@ -1,9 +0,0 @@
export declare let getEnvString: () => string;
/**
* gets the user agent string in a browser
*/
export declare let getUserAgentString: () => string;
export declare let isNode: () => boolean;
export declare let getNodeVersion: () => string;
export declare let isBrowser: () => boolean;
export declare let isCI: () => boolean;

View File

@ -1,40 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnvString = function () {
if (typeof window !== 'undefined') {
return 'browser';
}
else if (typeof process !== 'undefined') {
return 'node';
}
};
/**
* gets the user agent string in a browser
*/
exports.getUserAgentString = function () {
if (exports.isBrowser()) {
return navigator.userAgent;
}
else {
return 'undefined';
}
};
exports.isNode = function () {
return exports.getEnvString() === 'node';
};
exports.getNodeVersion = function () {
return process.version;
};
exports.isBrowser = function () {
return !exports.isNode();
};
exports.isCI = function () {
if (process.env.CI) {
return true;
}
else {
return false;
}
;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuZW52aGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LmVudmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDVyxRQUFBLFlBQVksR0FBRztJQUN4QixFQUFFLENBQUMsQ0FBQyxPQUFPLE1BQU0sS0FBSyxXQUFXLENBQUMsQ0FBQyxDQUFDO1FBQ2xDLE1BQU0sQ0FBQyxTQUFTLENBQUE7SUFDbEIsQ0FBQztJQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxPQUFPLE9BQU8sS0FBSyxXQUFXLENBQUMsQ0FBQyxDQUFDO1FBQzFDLE1BQU0sQ0FBQyxNQUFNLENBQUE7SUFDZixDQUFDO0FBQ0gsQ0FBQyxDQUFBO0FBRUQ7O0dBRUc7QUFDUSxRQUFBLGtCQUFrQixHQUFHO0lBQzlCLEVBQUUsQ0FBQyxDQUFDLGlCQUFTLEVBQUUsQ0FBQyxDQUFDLENBQUM7UUFDaEIsTUFBTSxDQUFDLFNBQVMsQ0FBQyxTQUFTLENBQUE7SUFDNUIsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ04sTUFBTSxDQUFDLFdBQVcsQ0FBQTtJQUNwQixDQUFDO0FBQ0gsQ0FBQyxDQUFBO0FBRVUsUUFBQSxNQUFNLEdBQUc7SUFDbEIsTUFBTSxDQUFDLG9CQUFZLEVBQUUsS0FBSyxNQUFNLENBQUE7QUFDbEMsQ0FBQyxDQUFBO0FBRVUsUUFBQSxjQUFjLEdBQUc7SUFDMUIsTUFBTSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUE7QUFDeEIsQ0FBQyxDQUFBO0FBRVUsUUFBQSxTQUFTLEdBQUc7SUFDckIsTUFBTSxDQUFDLENBQUMsY0FBTSxFQUFFLENBQUE7QUFDbEIsQ0FBQyxDQUFBO0FBRVUsUUFBQSxJQUFJLEdBQUc7SUFDaEIsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO1FBQ25CLE1BQU0sQ0FBQyxJQUFJLENBQUE7SUFDYixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTixNQUFNLENBQUMsS0FBSyxDQUFBO0lBQ2QsQ0FBQztJQUFBLENBQUM7QUFDSixDQUFDLENBQUEifQ==

View File

@ -1,5 +0,0 @@
import 'typings-global';
import * as smartparam from 'smartparam';
import * as smartq from 'smartq';
import * as lodash from 'lodash';
export { lodash, smartparam, smartq };

View File

@ -1,10 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global");
const smartparam = require("smartparam");
exports.smartparam = smartparam;
const smartq = require("smartq");
exports.smartq = smartq;
const lodash = require("lodash");
exports.lodash = lodash;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFDdkIseUNBQXdDO0FBTXBDLGdDQUFVO0FBTGQsaUNBQWdDO0FBTTVCLHdCQUFNO0FBTFYsaUNBQWdDO0FBRzVCLHdCQUFNIn0=

View File

@ -1,7 +1,32 @@
{
"npmci": {
"globalNpmTools": [
"npmts"
]
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartenv",
"description": "A module for storing and accessing environment details across different platforms.",
"npmPackagename": "@push.rocks/smartenv",
"license": "MIT",
"keywords": [
"environment detection",
"cross-platform",
"node.js",
"browser",
"module loading",
"CI detection",
"OS detection",
"runtime environment",
"typescript",
"async"
]
}
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

View File

@ -1,33 +1,64 @@
{
"name": "smartenv",
"version": "3.0.0",
"description": "store things about your environment and let them travel across modules",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"name": "@push.rocks/smartenv",
"version": "5.0.12",
"description": "A module for storing and accessing environment details across different platforms.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": {
"test": "(npmts)",
"testbrowser": "(npm test) && (node testbrowser.js)"
"test": "(tstest test/ --web)",
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)",
"testbrowser": "(npm test) && (node testbrowser.js)",
"buildDocs": "tsdoc"
},
"repository": {
"type": "git",
"url": "https://gitlab.com/pushrocks/smartenv.git"
"url": "https://code.foss.global/push.rocks/smartenv.git"
},
"keywords": [
"environment"
"environment detection",
"cross-platform",
"node.js",
"browser",
"module loading",
"CI detection",
"OS detection",
"runtime environment",
"typescript",
"async"
],
"author": "Lossless GmbH <hello@lossless.support> (https://lossless.com)",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/pushrocks/smartenv/issues"
},
"homepage": "https://gitlab.com/pushrocks/smartenv",
"homepage": "https://code.foss.global/push.rocks/smartenv",
"dependencies": {
"lodash": "^4.17.4",
"smartparam": "^0.1.1",
"smartq": "^1.1.1",
"typings-global": "^1.0.16"
"@push.rocks/smartpromise": "^4.0.2"
},
"devDependencies": {
"tapbundle": "^1.0.5"
}
}
"@git.zone/tsbuild": "^2.1.72",
"@git.zone/tsbundle": "^2.0.15",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.86",
"@push.rocks/tapbundle": "^5.0.8",
"@types/node": "^20.11.24",
"@types/npm": "^7.19.3"
},
"private": false,
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}

5729
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

123
readme.md Normal file
View File

@ -0,0 +1,123 @@
# @push.rocks/smartenv
store things about your environment and let them travel across modules
## Install
To install `@push.rocks/smartenv`, you need Node.js and npm installed. Then, run the following command:
```bash
npm install @push.rocks/smartenv --save
```
## Usage
`@push.rocks/smartenv` is a valuable utility for managing and accessing environment-specific information within your application, enabling your code to adapt to different environments, such as development, testing, and production seamlessly. Here we delve into how to utilize `@push.rocks/smartenv` effectively within a TypeScript project. We'll cover initializing the package, checking the execution environment, loading modules conditionally based on the environment, and accessing environment variables securely.
### Getting Started
First, ensure to import `Smartenv` from the package:
```typescript
import { Smartenv } from '@push.rocks/smartenv';
```
### Initializing Smartenv
You can begin by creating an instance of `Smartenv`. This instance will be your gateway to accessing and managing the environment properties throughout your application.
```typescript
const smartEnv = new Smartenv();
```
### Checking Execution Environment
`Smartenv` offers straightforward methods to determine whether your code is running in a Node.js or browser environment. This can be particularly useful for isomorphic code.
```typescript
// Check if running in a Node.js environment
console.log(`Is Node: ${smartEnv.isNode}`);
// Check if running in a browser environment
console.log(`Is Browser: ${smartEnv.isBrowser}`);
```
### Loading Modules Conditionally
One of the core functionalities of `@push.rocks/smartenv` is to load modules based on the execution environment. This feature is immensely useful for isomorphic applications that need to run both in the browser and Node.js environments.
```typescript
// Node.js module and equivalent browser module URLs
const nodeModuleName = 'example-node-module';
const browserModuleUrl = 'https://example.com/example-browser-module.js';
// Function to access the module in the browser
const getBrowserModule = () => window.exampleBrowserModule;
const module = await smartEnv.getEnvAwareModule({
nodeModuleName: nodeModuleName,
webUrlArg: browserModuleUrl,
getFunction: getBrowserModule
});
console.log(module);
```
### Accessing Environment Variables Securely
For Node.js environments, accessing environment variables is a common task. `Smartenv` does not directly manipulate environment variables but encourages best practices for accessing them, ensuring your application remains secure and performs optimally.
```typescript
if(smartEnv.isNode) {
console.log(`Your environment variable value: ${process.env.YOUR_ENV_VAR}`);
}
```
### Detecting CI Environments
Detect if your application is running in a Continuous Integration (CI) environment. This can be useful for modifying behavior during testing or deployment.
```typescript
console.log(`Is CI: ${smartEnv.isCI}`);
```
### Platform-Specific Checks
`Smartenv` enables you to perform checks for specific operating systems when running in a Node.js environment, which can be particularly useful for tasks that depend on OS-specific features or paths.
```typescript
const isMac = await smartEnv.isMacAsync();
const isWindows = await smartEnv.isWindowsAsync();
const isLinux = await smartEnv.isLinuxAsync();
console.log(`Is Mac: ${isMac}, Is Windows: ${isWindows}, Is Linux: ${isLinux}`);
```
### Printing Environment for Debugging
To assist with debugging, `Smartenv` offers a method to print the current environment and some relevant information to the console. This feature is particularly useful during development or when troubleshooting environment-specific issues.
```typescript
smartEnv.printEnv();
```
### Usage within Browser
While `Smartenv` primarily facilitates handling different environments in server-side applications, it also provides functionalities to manage and load scripts dynamically in the browser. This allows for more flexible and environment-aware code sharing between server and client-side.
For instance, using `getSafeWebModule` to dynamically load a script only if it hasn't been already and then utilizing a globally available function or object that the script provides.
### Conclusion
`@push.rocks/smartenv` is a comprehensive solution for managing environment-specific logic and configurations in your JavaScript and TypeScript projects. By leveraging its functionalities, developers can create more robust, flexible, and maintainable applications that seamlessly adapt to different execution contexts, whether in Node.js, the browser, or CI environments.
Always refer to the official documentation and source code for the most up-to-date usage examples and features.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

View File

@ -1,14 +1,37 @@
import { tap, expect } from 'tapbundle'
import * as smartenv from '../dist/index'
import { tap, expect } from '@push.rocks/tapbundle';
import * as smartenv from '../ts/index.js';
let testEnv: smartenv.Smartenv
let testEnv: smartenv.Smartenv;
tap.test('should print env', async () => {
testEnv = new smartenv.Smartenv()
})
testEnv = new smartenv.Smartenv();
});
tap.test('should print a overview to console', async () => {
testEnv.printEnv()
})
testEnv.printEnv();
});
tap.start()
tap.test('should get os', async () => {
const resultMac = await testEnv.isMacAsync();
const resultLinux = await testEnv.isLinuxAsync();
const resultWindows = await testEnv.isWindowsAsync();
const osModule = await import('os');
if (resultMac) {
expect(osModule.platform()).toEqual('darwin');
console.log('platform is Mac!');
} else if (resultLinux) {
expect(osModule.platform()).toEqual('linux');
console.log('platform is Linux!');
} else {
expect(osModule.platform()).toEqual('win32');
console.log('platform is Windows!');
}
});
tap.test('should state wether we are in CI', async () => {
if (process.env.CI) {
expect(testEnv.isCI).toBeTrue();
}
});
tap.start();

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/smartenv',
version: '5.0.12',
description: 'store things about your environment and let them travel across modules'
}

View File

@ -1 +1 @@
export * from './smartenv.classes.smartenv'
export * from './smartenv.classes.smartenv.js';

9
ts/interfaces/index.ts Normal file
View File

@ -0,0 +1,9 @@
export let defaultme = null;
declare global {
namespace NodeJS {
interface Global {
window: any;
navigator: any;
}
}
}

View File

@ -1,47 +1,155 @@
import * as plugins from './smartenv.plugins'
import helpers = require('./smartenv.envhelpers')
import * as plugins from './smartenv.plugins.js';
import * as interfaces from './interfaces/index.js';
// interfaces
export interface IEnvObject {
name: string
value: string
name: string;
value: string;
}
/**
* Smartenv class that makes it easy
*/
export class Smartenv {
runtimeEnv: string
isBrowser: boolean
userAgent: string
isNode: boolean
nodeVersion: string
isCI: boolean
constructor() {
this.runtimeEnv = helpers.getEnvString()
this.isBrowser = helpers.isBrowser()
this.userAgent = helpers.getUserAgentString()
this.isNode = helpers.isNode()
this.nodeVersion = helpers.getNodeVersion()
this.isCI = helpers.isCI()
};
public async getEnvAwareModule(optionsArg: {
nodeModuleName: string;
webUrlArg: string;
getFunction: () => any;
}) {
if (this.isNode) {
const moduleResult = await this.getSafeNodeModule(optionsArg.nodeModuleName);
return moduleResult;
} else if (this.isBrowser) {
const moduleResult = await this.getSafeWebModule(
optionsArg.webUrlArg,
optionsArg.getFunction
);
return moduleResult;
} else {
console.error('platform for loading not supported by smartenv');
}
}
/**
* get environment variables that fit the description
*/
async getEnvVars (regexArg: RegExp) {
let EnvironmentArray = []
// TODO: plugins.smartparam.forEachMinimatch()
public async getSafeNodeModule<T = any>(moduleNameArg: string, runAfterFunc?: (moduleArg: T) => Promise<any>): Promise<T> {
if (!this.isNode) {
console.error(`You tried to load a node module in a wrong context: ${moduleNameArg}`);
return;
}
// tslint:disable-next-line: function-constructor
const returnValue: T = await (new Function(`return import('${moduleNameArg}')`)() as Promise<T>);
if (runAfterFunc) {
await runAfterFunc(returnValue);
}
return returnValue;
}
public loadedScripts: string[] = [];
public async getSafeWebModule(urlArg: string, getFunctionArg: () => any) {
if (!this.isBrowser) {
console.error('You tried to load a web module in a wrong context');
return;
}
if (this.loadedScripts.includes(urlArg)) {
return getFunctionArg();
} else {
this.loadedScripts.push(urlArg);
}
const done = plugins.smartpromise.defer();
if (globalThis.importScripts) {
globalThis.importScripts(urlArg);
done.resolve();
} else {
const script = document.createElement('script');
script.onload = () => {
done.resolve();
};
script.src = urlArg;
document.head.appendChild(script);
}
await done.promise;
return getFunctionArg();
}
public get runtimeEnv() {
if (typeof process !== 'undefined') {
return 'node';
} else {
return 'browser';
}
}
public get isBrowser(): boolean {
return !this.isNode;
}
public get userAgent(): string {
if (this.isBrowser) {
// make sure we are in Browser
return navigator.userAgent;
} else {
return 'undefined';
}
}
public get isNode(): boolean {
return this.runtimeEnv === 'node';
}
public get nodeVersion(): string {
return process.version;
}
public get isCI(): boolean {
if (this.isNode) {
if (process.env.CI) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public async isMacAsync(): Promise<boolean> {
if (this.isNode) {
const os = await this.getSafeNodeModule('os');
return os.platform() === 'darwin';
} else {
return false;
}
}
public async isWindowsAsync(): Promise<boolean> {
if (this.isNode) {
const os = await this.getSafeNodeModule('os');
return os.platform() === 'win32';
} else {
return false;
}
}
public async isLinuxAsync(): Promise<boolean> {
if (this.isNode) {
const os = await this.getSafeNodeModule('os');
return os.platform() === 'linux';
} else {
return false;
}
}
/**
* prints the environment to console
*/
async printEnv () {
public async printEnv() {
if (this.isNode) {
console.log('running on NODE')
let smartenvVersion = require('../package.json').version
console.log('node version is ' + this.nodeVersion + ' and smartenv version is ' + smartenvVersion)
console.log('running on NODE');
console.log('node version is ' + this.nodeVersion);
} else {
console.log('running on BROWSER')
console.log('browser is ' + this.userAgent)
console.log('running on BROWSER');
console.log('browser is ' + this.userAgent);
}
}
}

View File

@ -1,39 +0,0 @@
import * as plugins from './smartenv.plugins'
export let getEnvString = function (): string {
if (typeof window !== 'undefined') {
return 'browser'
} else if (typeof process !== 'undefined') {
return 'node'
}
}
/**
* gets the user agent string in a browser
*/
export let getUserAgentString = function (): string {
if (isBrowser()) { // make sure we are in Browser
return navigator.userAgent
} else {
return 'undefined'
}
}
export let isNode = function (): boolean {
return getEnvString() === 'node'
}
export let getNodeVersion = function (): string {
return process.version
}
export let isBrowser = function (): boolean {
return !isNode()
}
export let isCI = function () {
if (process.env.CI) {
return true
} else {
return false
};
}

View File

@ -1,10 +1,3 @@
import 'typings-global'
import * as smartparam from 'smartparam'
import * as smartq from 'smartq'
import * as lodash from 'lodash'
import * as smartpromise from '@push.rocks/smartpromise';
export {
lodash,
smartparam,
smartq
}
export { smartpromise };

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

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

519
yarn.lock
View File

@ -1,519 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/chai-as-promised@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
dependencies:
"@types/chai" "*"
"@types/promises-a-plus" "*"
"@types/chai-string@^1.1.30":
version "1.1.30"
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
dependencies:
"@types/chai" "*"
"@types/chai@*", "@types/chai@^3.4.35":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
"@types/promises-a-plus@*":
version "0.0.27"
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
ansi-256-colors@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
ansi-regex@^2.0.0, ansi-regex@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
assertion-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
beautycolor@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
dependencies:
ansi-256-colors "^1.1.0"
typings-global "^1.0.14"
beautylog@5.0.12:
version "5.0.12"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-5.0.12.tgz#234d3caaf9d836d57e5a841fcbb531e347c6d366"
dependencies:
cli-color "^1.1.0"
cli-table2 "^0.2.0"
colors "1.1.2"
figlet "^1.1.2"
lodash "^4.13.1"
ora "^0.2.3"
q "^1.4.1"
smartenv "^1.2.5"
typings-global "^1.0.3"
beautylog@^4.1.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-4.2.2.tgz#6cebdff8665099693d488151deee02890b92ce69"
dependencies:
cli-color "^1.1.0"
cli-table2 "^0.2.0"
colors "1.1.2"
figlet "^1.1.2"
lodash "^4.11.1"
ora "^0.2.1"
q "^1.4.1"
smartenv "^1.2.2"
bindings@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
brace-expansion@^1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
dependencies:
balanced-match "^0.4.1"
concat-map "0.0.1"
chai-as-promised@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
dependencies:
check-error "^1.0.2"
chai-string@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
chai@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
dependencies:
assertion-error "^1.0.1"
deep-eql "^0.1.3"
type-detect "^1.0.0"
chalk@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
cli-color@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.2.0.tgz#3a5ae74fd76b6267af666e69e2afbbd01def34d1"
dependencies:
ansi-regex "^2.1.1"
d "1"
es5-ext "^0.10.12"
es6-iterator "2"
memoizee "^0.4.3"
timers-ext "0.1"
cli-cursor@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
dependencies:
restore-cursor "^1.0.1"
cli-spinners@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
cli-table2@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97"
dependencies:
lodash "^3.10.1"
string-width "^1.0.1"
optionalDependencies:
colors "^1.1.2"
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
colors@1.1.2, colors@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
d@1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
dependencies:
es5-ext "^0.10.9"
deep-eql@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
dependencies:
type-detect "0.1.1"
early@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
dependencies:
beautycolor "^1.0.7"
smartq "^1.1.1"
typings-global "^1.0.16"
es5-ext@^0.10.12, es5-ext@^0.10.13, es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14, es5-ext@~0.10.2:
version "0.10.18"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.18.tgz#dc239d3dce4c22b9c939aa180878837a3c0b5c92"
dependencies:
es6-iterator "2"
es6-symbol "~3.1"
es6-iterator@2, es6-iterator@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512"
dependencies:
d "1"
es5-ext "^0.10.14"
es6-symbol "^3.1"
es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
dependencies:
d "1"
es5-ext "~0.10.14"
es6-weak-map@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f"
dependencies:
d "1"
es5-ext "^0.10.14"
es6-iterator "^2.0.1"
es6-symbol "^3.1.1"
escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
event-emitter@^0.3.4:
version "0.3.5"
resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
dependencies:
d "1"
es5-ext "~0.10.14"
exit-hook@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
figlet@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.2.0.tgz#6c46537378fab649146b5a6143dda019b430b410"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
glob@^7.0.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.2"
once "^1.3.0"
path-is-absolute "^1.0.0"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
interpret@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
is-fullwidth-code-point@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
dependencies:
number-is-nan "^1.0.0"
is-promise@^2.1, is-promise@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
leakage@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.2.0.tgz#9e7a8cc1d241d8c8427e348769e192e172fd8733"
dependencies:
left-pad "^1.1.3"
memwatch-next "^0.3.0"
minimist "^1.2.0"
pretty-bytes "^4.0.2"
left-pad@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
lodash@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
lodash@^4.11.1, lodash@^4.13.1, lodash@^4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
lru-queue@0.1:
version "0.1.0"
resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3"
dependencies:
es5-ext "~0.10.2"
memoizee@^0.4.3:
version "0.4.5"
resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.5.tgz#1bc3ea1e4be056dd475d521979d7be3d5e5b21c8"
dependencies:
d "1"
es5-ext "^0.10.13"
es6-weak-map "^2.0.1"
event-emitter "^0.3.4"
is-promise "^2.1"
lru-queue "0.1"
next-tick "1"
timers-ext "0.1"
memwatch-next@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
dependencies:
bindings "^1.2.1"
nan "^2.3.2"
minimatch@^3.0.2:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
nan@^2.3.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
next-tick@1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
object-assign@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
onetime@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
ora@^0.2.1, ora@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4"
dependencies:
chalk "^1.1.1"
cli-cursor "^1.0.2"
cli-spinners "^0.1.2"
object-assign "^4.0.1"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
q@^1.4.1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
dependencies:
resolve "^1.1.6"
resolve@^1.1.6:
version "1.3.3"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
dependencies:
path-parse "^1.0.5"
restore-cursor@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
dependencies:
exit-hook "^1.0.0"
onetime "^1.0.0"
semver@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
shelljs@^0.7.7:
version "0.7.7"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
smartchai@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
dependencies:
"@types/chai" "^3.4.35"
"@types/chai-as-promised" "0.0.29"
"@types/chai-string" "^1.1.30"
chai "^3.5.0"
chai-as-promised "^6.0.0"
chai-string "^1.3.0"
smartdelay@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.1.tgz#687f8bcc09d7c62c9c5a8a1771c1aba3aff54156"
dependencies:
typings-global "^1.0.14"
smartenv@^1.2.2, smartenv@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/smartenv/-/smartenv-1.2.5.tgz#5e50343ec4653953ef24929fc548cd74ea53205c"
dependencies:
beautylog "^4.1.2"
lodash "^4.11.1"
q "^1.4.1"
smartparam@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/smartparam/-/smartparam-0.1.1.tgz#51c526bf38b0965007b21edd3e96c7e179c93591"
dependencies:
beautylog "5.0.12"
is-promise "^2.1.0"
minimatch "^3.0.2"
q "^1.4.1"
typings-global "^1.0.3"
smartq@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
dependencies:
typed-promisify "^0.3.0"
typings-global "^1.0.14"
string-width@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
dependencies:
code-point-at "^1.0.0"
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
tapbundle@^1.0.5:
version "1.0.12"
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.12.tgz#71d29273aad280f5c4e15b2700430b2456a5d364"
dependencies:
early "^2.1.1"
leakage "^0.2.0"
smartchai "^1.0.3"
smartdelay "^1.0.1"
smartq "^1.1.1"
typings-global "^1.0.16"
timers-ext@0.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.2.tgz#61cc47a76c1abd3195f14527f978d58ae94c5204"
dependencies:
es5-ext "~0.10.14"
next-tick "1"
type-detect@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
type-detect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
typed-promisify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.3:
version "1.0.16"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.16.tgz#489b71781af24268750c2899316400a5e482961f"
dependencies:
semver "^5.3.0"
shelljs "^0.7.7"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"