consul/ui-v2/package.json
John Cowen e568cded17
ui: Add node based configuration / environment testing (#7140)
In an ember environment `config/environment.js` exports a JSON object
whereas the file itself exports a function that receives a string of the
environment name that would like returning.

This is so ember can automatically provide you with an already
configured object containing configuration values dependent on which
environment you passed to `ember-cli` using `serve`, `build` or `test`.

In order to bypass this so we can easily test what is returned for
different environments, we've installed a lightweight functional test
harness that is simple to use `substack/tape`, that can be run easily
outside of ember.

We've then written as simple test case using this to enable us to
test/assert that different environments return the correct configuration
values.

Additionally we've added some yarn scripts/make targets (yarn run
test-node / make test-node) to make this easy to run. We're yet to
integrate this into CI.
2020-01-28 17:33:20 +00:00

126 lines
4.4 KiB
JSON

{
"name": "consul-ui",
"version": "2.2.0",
"private": true,
"description": "The web UI for Consul, by HashiCorp.",
"repository": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build --environment production",
"build:staging": "ember build --environment staging",
"build:ci": "ember build --environment test",
"lint:dev:js": "eslint -c .dev.eslintrc.js --fix ./*.js ./.*.js app config lib server tests",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"format:js": "prettier --write \"{app,config,lib,server,tests}/**/*.js\" ./*.js ./.*.js",
"format:css": "prettier --write \"app/styles/**/*.*\"",
"start": "ember serve --port=${EMBER_SERVE_PORT:-4200} --live-reload-port=${EMBER_LIVE_RELOAD_PORT:-7020}",
"start:staging": "ember serve --port=${EMBER_SERVE_PORT:-4200} --live-reload-port=${EMBER_LIVE_RELOAD_PORT:-7020} --environment staging",
"start:consul": "ember serve --proxy=${CONSUL_HTTP_ADDR:-http://localhost:8500} --port=${EMBER_SERVE_PORT:-4200} --live-reload-port=${EMBER_LIVE_RELOAD_PORT:-7020}",
"start:api": "api-double --dir ./node_modules/@hashicorp/consul-api-double",
"test": "ember test --test-port=${EMBER_TEST_PORT:-7357}",
"test:parallel": "EMBER_EXAM_PARALLEL=true ember exam --split=4 --parallel",
"test:view": "ember test --server --test-port=${EMBER_TEST_PORT:-7357}",
"test:node": "tape ./node-tests/**/*.js",
"test:coverage": "COVERAGE=true ember test --test-port=${EMBER_TEST_PORT:-7357}",
"test:view:coverage": "COVERAGE=true ember test --server --test-port=${EMBER_TEST_PORT:-7357}",
"steps:list": "node ./lib/commands/bin/list.js"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"{app,config,lib,server,tests}/**/*.js": [
"prettier --write",
"git add"
],
"app/styles/**/*.*": [
"prettier --write",
"git add"
]
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@ember/jquery": "^0.6.0",
"@ember/optional-features": "^0.7.0",
"@hashicorp/consul-api-double": "^2.6.2",
"@hashicorp/ember-cli-api-double": "^2.0.0",
"base64-js": "^1.3.0",
"broccoli-asset-rev": "^3.0.0",
"chalk": "^2.4.2",
"clipboard": "^2.0.4",
"css.escape": "^1.5.1",
"ember-auto-import": "^1.4.0",
"ember-changeset-validations": "^2.1.0",
"ember-cli": "~3.12.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-autoprefixer": "^0.8.1",
"ember-cli-babel": "^7.7.3",
"ember-cli-code-coverage": "^1.0.0-beta.4",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-flash": "^1.6.3",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-htmlbars-inline-precompile": "^3.0.0",
"ember-cli-inject-live-reload": "^2.0.1",
"ember-cli-page-object": "^1.15.0-beta.2",
"ember-cli-sass": "^10.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-string-helpers": "^4.0.3",
"ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^3.0.0",
"ember-cli-yadda": "^0.5.0",
"ember-collection": "^1.0.0-alpha.9",
"ember-composable-helpers": "^2.1.0",
"ember-computed-style": "^0.3.0",
"ember-data": "~3.12.0",
"ember-exam": "^4.0.0",
"ember-export-application-global": "^2.0.0",
"ember-href-to": "^3.1.0",
"ember-inflector": "^3.0.0",
"ember-load-initializers": "^2.0.0",
"ember-math-helpers": "^2.4.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^5.1.0",
"ember-power-select": "^3.0.3",
"ember-power-select-with-create": "^0.6.0",
"ember-qunit": "^4.4.1",
"ember-resolver": "^5.0.1",
"ember-sinon-qunit": "^3.4.0",
"ember-source": "~3.12.0",
"ember-test-selectors": "^2.1.0",
"ember-truth-helpers": "^2.0.0",
"eslint-plugin-ember": "^7.0.0",
"eslint-plugin-node": "^10.0.0",
"flat": "^4.1.0",
"husky": "^3.0.5",
"ivy-codemirror": "^2.1.0",
"js-yaml": "^3.13.1",
"jsonlint": "^1.6.3",
"lint-staged": "^9.2.5",
"loader.js": "^4.7.0",
"ngraph.graph": "^18.0.3",
"node-sass": "^4.9.3",
"prettier": "^1.10.2",
"qunit-dom": "^0.9.0",
"tape": "^4.13.0",
"text-encoding": "^0.7.0"
},
"engines": {
"node": "8.* || >= 10.*"
},
"ember-addon": {
"paths": [
"lib/block-slots",
"lib/commands",
"lib/startup"
]
}
}