Merge pull request #25 from hashicorp/chore-core-ui
Initialize core UI - icu-148
This commit is contained in:
47 files changed
+1539
-51
No files matched your search
@@ -14,6 +14,7 @@ node_modules
|
||||
.DS_Store
|
||||
connect.lock
|
||||
coverage
|
||||
coverage_*
|
||||
coverage-*
|
||||
libpeerconnection.log
|
||||
npm-debug.log*
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,3 +1 @@
|
||||
<h2 id="title">Welcome to Ember</h2>
|
||||
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
File renamed without changes.
+5
-3
@@ -8,17 +8,19 @@
|
||||
"ui/*"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "yarn lint:addons:api && yarn lint:addons:auth && yarn lint:addons:rose",
|
||||
"lint": "yarn lint:addons:api && yarn lint:addons:auth && yarn lint:addons:rose && yarn lint:ui:core",
|
||||
"lint:addons:api": "echo \"\n\nlint: addons/api\n\" && cd addons/api && yarn lint",
|
||||
"lint:addons:auth": "echo \"\n\nlint: addons/auth\n\" && cd addons/auth && yarn lint",
|
||||
"lint:addons:rose": "echo \"\n\nlint: addons/rose\n\" && cd addons/rose && yarn lint",
|
||||
"test": "yarn test:addons:api && yarn test:addons:auth && yarn test:addons:rose",
|
||||
"lint:ui:core": "echo \"\n\nlint: ui/core\n\" && cd ui/core && yarn lint",
|
||||
"test": "yarn test:addons:api && yarn test:addons:auth && yarn test:addons:rose && yarn test:ui:core",
|
||||
"test:addons:api": "echo \"\n\ntest: addons/api\n\" && cd addons/api && yarn test",
|
||||
"test:addons:auth": "echo \"\n\ntest: addons/auth\n\" && cd addons/auth && yarn test",
|
||||
"test:addons:rose": "echo \"\n\ntest: addons/rose\n\" && cd addons/rose && yarn test",
|
||||
"test:ui:core": "echo \"\n\ntest: ui/core\n\" && cd ui/core && yarn test",
|
||||
"precommit": "yarn compliance:licenses && yarn audit && yarn lint && yarn test",
|
||||
"commit": "git-cz",
|
||||
"compliance:licenses": "license-checker --onlyAllow 'Apache*;Apache License, Version 2.0;Apache-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages 'watchtower-ui;base64-js@0.0.2'",
|
||||
"compliance:licenses": "license-checker --onlyAllow 'Apache*;Apache License, Version 2.0;Apache-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages 'watchtower-ui;core@0.0.0;base64-js@0.0.2'",
|
||||
"doc:toc": "doctoc README.md"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# EditorConfig helps developers define and maintain consistent
|
||||
# coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.hbs]
|
||||
insert_final_newline = false
|
||||
|
||||
[*.{diff,md}]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
/**
|
||||
Ember CLI sends analytics information by default. The data is completely
|
||||
anonymous, but there are times when you might want to disable this behavior.
|
||||
|
||||
Setting `disableAnalytics` to true will prevent any data from being sent.
|
||||
*/
|
||||
"disableAnalytics": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# unconventional js
|
||||
/blueprints/*/files/
|
||||
/vendor/
|
||||
|
||||
# compiled output
|
||||
/dist/
|
||||
/tmp/
|
||||
|
||||
# dependencies
|
||||
/bower_components/
|
||||
/node_modules/
|
||||
|
||||
# misc
|
||||
/coverage/
|
||||
!.*
|
||||
|
||||
# ember-try
|
||||
/.node_modules.ember-try/
|
||||
/bower.json.ember-try
|
||||
/package.json.ember-try
|
||||
@@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: 'babel-eslint',
|
||||
parserOptions: {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
legacyDecorators: true
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
'ember'
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:ember/recommended'
|
||||
],
|
||||
env: {
|
||||
browser: true
|
||||
},
|
||||
rules: {
|
||||
'ember/no-jquery': 'error'
|
||||
},
|
||||
overrides: [
|
||||
// node files
|
||||
{
|
||||
files: [
|
||||
'.eslintrc.js',
|
||||
'.template-lintrc.js',
|
||||
'ember-cli-build.js',
|
||||
'testem.js',
|
||||
'blueprints/*/index.js',
|
||||
'config/**/*.js',
|
||||
'lib/*/index.js',
|
||||
'server/**/*.js'
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'script'
|
||||
},
|
||||
env: {
|
||||
browser: false,
|
||||
node: true
|
||||
},
|
||||
plugins: ['node'],
|
||||
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
|
||||
// add your custom rules and overrides for node files here
|
||||
|
||||
// this can be removed once the following is fixed
|
||||
// https://github.com/mysticatea/eslint-plugin-node/issues/77
|
||||
'node/no-unpublished-require': 'off'
|
||||
})
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"printWidth": 80
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: 'octane',
|
||||
rules: {
|
||||
'no-bare-strings': true,
|
||||
'no-curly-component-invocation': { allow: ['app-name'] },
|
||||
'no-implicit-this': { allow: ['app-name'] }
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
language: node_js
|
||||
node_js:
|
||||
- "10"
|
||||
|
||||
dist: trusty
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
|
||||
env:
|
||||
global:
|
||||
# See https://git.io/vdao3 for details.
|
||||
- JOBS=1
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
before_install:
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||
- export PATH=$HOME/.yarn/bin:$PATH
|
||||
|
||||
install:
|
||||
- yarn install --non-interactive
|
||||
|
||||
script:
|
||||
- yarn lint:hbs
|
||||
- yarn lint:js
|
||||
- yarn test
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"ignore_dirs": ["tmp", "dist"]
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
# Core UI
|
||||
|
||||
The core UI for Project Watchtower.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Installation](#installation)
|
||||
- [Yarn Commands](#yarn-commands)
|
||||
- [Running / Development](#running--development)
|
||||
- [Building](#building)
|
||||
- [Environment Variables](#environment-variables)
|
||||
- [Running Tests](#running-tests)
|
||||
- [Deploying](#deploying)
|
||||
- [Further Reading / Useful Links](#further-reading--useful-links)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You will need the following things properly installed on your computer.
|
||||
|
||||
* [Git](https://git-scm.com/)
|
||||
* [Node.js](https://nodejs.org/)
|
||||
* [Yarn](https://yarnpkg.com/)
|
||||
* [Ember CLI](https://ember-cli.com/)
|
||||
* [Google Chrome](https://google.com/chrome/)
|
||||
* [Firefox](https://www.mozilla.org/firefox)
|
||||
|
||||
## Installation
|
||||
|
||||
See monorepo README for installation instructions.
|
||||
|
||||
## Yarn Commands
|
||||
|
||||
List of available project commands. `yarn run <command-name>`
|
||||
|
||||
| Command | Description |
|
||||
| ------- | ----------- |
|
||||
| build | Builds the UI in development mode. |
|
||||
| build:production | Builds the UI for production. |
|
||||
| lint | Runs all lint commands. |
|
||||
| lint:hbs | Lints `hbs` template files. |
|
||||
| lint:js | Lints `js` files. |
|
||||
| lint:sass | Lints `scss` files. |
|
||||
| format | Runs all auto-formatters. |
|
||||
| format:js | Auto-formats `js` files using Prettier. |
|
||||
| format:sass | Auto-formats `scss` files using Prettier. |
|
||||
| start | Runs the dummy app local server. |
|
||||
| test | Runs all tests in random order, with coverage reporting. |
|
||||
| doc:toc | Automatically generates a table of contents for this README file. |
|
||||
|
||||
## Running / Development
|
||||
|
||||
* `ember serve`
|
||||
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
||||
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
|
||||
|
||||
### Building
|
||||
|
||||
To build the project, without running it, execute one of the following commands:
|
||||
|
||||
* `yarn run build` (development)
|
||||
* `yarn run build:production` (production)
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
These environment variables may be used to customized the build.
|
||||
|
||||
| Variable | Default Value | Description |
|
||||
| -------- | ------------- | ----------- |
|
||||
| `APP_NAME` | Application Name | The user-facing name of the application, appearing in titles, etc. |
|
||||
|
||||
### Running Tests
|
||||
|
||||
* `npm test` runs full tests in random order with coverage
|
||||
* `ember test --server`
|
||||
|
||||
Keep in mind that tests are executed in random order. This is intentional
|
||||
and helps to prevent hard-to-debug order dependencies among tests.
|
||||
|
||||
Please also note that we report test coverage. We strive for "the right amount
|
||||
of testing". Use test coverage as a guide to help you identify untested
|
||||
high-value code.
|
||||
|
||||
We rely on `ember-a11y-testing` to validate accessibility in acceptance tests.
|
||||
If you write acceptance tests, please ensure at least one validation per
|
||||
route using `await a11yAudit();`.
|
||||
|
||||
### Deploying
|
||||
|
||||
Specify what it takes to deploy your app.
|
||||
|
||||
## Further Reading / Useful Links
|
||||
|
||||
* [ember.js](https://emberjs.com/)
|
||||
* [ember-cli](https://ember-cli.com/)
|
||||
* Development Browser Extensions
|
||||
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
|
||||
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
|
||||
@@ -0,0 +1,12 @@
|
||||
import Application from '@ember/application';
|
||||
import Resolver from 'ember-resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from './config/environment';
|
||||
|
||||
export default class App extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
}
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,31 @@
|
||||
export default {
|
||||
time: {
|
||||
hhmmss: {
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
},
|
||||
},
|
||||
date: {
|
||||
hhmmss: {
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
},
|
||||
},
|
||||
number: {
|
||||
compact: { notation: 'compact' },
|
||||
EUR: {
|
||||
style: 'currency',
|
||||
currency: 'EUR',
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
},
|
||||
USD: {
|
||||
style: 'currency',
|
||||
currency: 'USD',
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
import { helper } from '@ember/component/helper';
|
||||
import config from '../config/environment';
|
||||
|
||||
export default helper(function appName() {
|
||||
return config.appName;
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Core</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
|
||||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/core.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/core.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
Whitespace-only changes.
@@ -0,0 +1,9 @@
|
||||
import EmberRouter from '@ember/routing/router';
|
||||
import config from './config/environment';
|
||||
|
||||
export default class Router extends EmberRouter {
|
||||
location = config.locationType;
|
||||
rootURL = config.rootURL;
|
||||
}
|
||||
|
||||
Router.map(function () {});
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
@import 'rose';
|
||||
@@ -0,0 +1,5 @@
|
||||
<HeadLayout />
|
||||
|
||||
{{title (app-name)}}
|
||||
|
||||
{{outlet}}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{!--
|
||||
Add content you wish automatically added to the documents head
|
||||
here. The 'model' available in this template can be populated by
|
||||
setting values on the 'head-data' service.
|
||||
--}}
|
||||
<title>{{this.model.title}}</title>
|
||||
@@ -0,0 +1 @@
|
||||
<h1>{{app-name}}</h1>
|
||||
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
useBabelInstrumenter: true,
|
||||
parallel: true,
|
||||
reporters: ['lcov', 'html', 'text-summary'],
|
||||
};
|
||||
@@ -0,0 +1,94 @@
|
||||
/*jshint node:true*/
|
||||
|
||||
module.exports = function (/* environment */) {
|
||||
return {
|
||||
/**
|
||||
* Merges the fallback locale's translations into all other locales as a
|
||||
* build-time fallback strategy.
|
||||
*
|
||||
* This will **not** prevent missing translation warnings or errors from occurring.
|
||||
* It's meant as safety net when warning are enabled.
|
||||
* When enabled along with `errorOnMissingTranslations` any fallback attempts will result in an error.
|
||||
*
|
||||
* @property fallbackLocale
|
||||
* @type {String?}
|
||||
* @default "null"
|
||||
*/
|
||||
fallbackLocale: null,
|
||||
|
||||
/**
|
||||
* Path where translations are kept. This is relative to the project root.
|
||||
* For example, if your translations are an npm dependency, set this to:
|
||||
*`'./node_modules/path/to/translations'`
|
||||
*
|
||||
* @property inputPath
|
||||
* @type {String}
|
||||
* @default "'translations'"
|
||||
*/
|
||||
inputPath: 'translations',
|
||||
|
||||
/**
|
||||
* Prevents the translations from being bundled with the application code.
|
||||
* This enables asynchronously loading the translations for the active locale
|
||||
* by fetching them from the asset folder of the build.
|
||||
*
|
||||
* See: https://ember-intl.github.io/ember-intl/docs/guide/asynchronously-loading-translations
|
||||
*
|
||||
* @property publicOnly
|
||||
* @type {Boolean}
|
||||
* @default "false"
|
||||
*/
|
||||
publicOnly: false,
|
||||
|
||||
/**
|
||||
* Add the subdirectories of the translations as a namespace for all keys.
|
||||
*
|
||||
* @property wrapTranslationsWithNamespace
|
||||
* @type {Boolean}
|
||||
* @default "false"
|
||||
*/
|
||||
wrapTranslationsWithNamespace: false,
|
||||
|
||||
/**
|
||||
* Cause a build error if ICU argument mismatches are detected.
|
||||
*
|
||||
* @property errorOnNamedArgumentMismatch
|
||||
* @type {Boolean}
|
||||
* @default "false"
|
||||
*/
|
||||
errorOnNamedArgumentMismatch: false,
|
||||
|
||||
/**
|
||||
* Cause a build error if missing translations are detected.
|
||||
*
|
||||
* See https://ember-intl.github.io/ember-intl/docs/guide/missing-translations#throwing-a-build-error-on-missing-required-translation
|
||||
*
|
||||
* @property errorOnMissingTranslations
|
||||
* @type {Boolean}
|
||||
* @default "false"
|
||||
*/
|
||||
errorOnMissingTranslations: false,
|
||||
|
||||
/**
|
||||
* removes empty translations from the build output.
|
||||
*
|
||||
* @property stripEmptyTranslations
|
||||
* @type {Boolean}
|
||||
* @default "false"
|
||||
*/
|
||||
stripEmptyTranslations: false,
|
||||
|
||||
/**
|
||||
* Filter missing translations to ignore expected missing translations.
|
||||
*
|
||||
* See https://ember-intl.github.io/ember-intl/docs/guide/missing-translations#requiring-translations
|
||||
*
|
||||
* @property requiresTranslation
|
||||
* @type {Function}
|
||||
* @default "function(key,locale) { return true }"
|
||||
*/
|
||||
requiresTranslation(/* key, locale */) {
|
||||
return true;
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,92 @@
|
||||
'use strict';
|
||||
|
||||
const APP_NAME = process.env.APP_NAME || 'Application Name';
|
||||
|
||||
module.exports = function (environment) {
|
||||
let ENV = {
|
||||
modulePrefix: 'core',
|
||||
environment,
|
||||
rootURL: '/',
|
||||
locationType: 'auto',
|
||||
EmberENV: {
|
||||
FEATURES: {
|
||||
// Here you can enable experimental features on an ember canary build
|
||||
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
|
||||
},
|
||||
EXTEND_PROTOTYPES: false,
|
||||
/*{
|
||||
// Prevent Ember Data from overriding Date.parse.
|
||||
Date: false
|
||||
}*/
|
||||
},
|
||||
|
||||
APP: {
|
||||
// Here you can pass flags/options to your application instance
|
||||
// when it is created
|
||||
},
|
||||
|
||||
appName: APP_NAME,
|
||||
|
||||
contentSecurityPolicyHeader: 'Content-Security-Policy',
|
||||
contentSecurityPolicyMeta: true,
|
||||
contentSecurityPolicy: {
|
||||
'default-src': ["'none'"],
|
||||
'script-src': ["'self'"],
|
||||
'frame-src': ["'self'"],
|
||||
'font-src': ["'self'"],
|
||||
'connect-src': ["'self'"],
|
||||
'img-src': ["'self'"],
|
||||
'style-src': ["'self'"],
|
||||
'media-src': ["'self'"],
|
||||
'manifest-src': ["'self'"]
|
||||
}
|
||||
};
|
||||
|
||||
// Unsafe policy is necessary in development and test environments, but should
|
||||
// not be used in production.
|
||||
const enableUnsafeCSP = () => {
|
||||
ENV.contentSecurityPolicy['script-src'].push("'unsafe-eval'");
|
||||
ENV.contentSecurityPolicy['style-src'].push("'unsafe-inline'");
|
||||
};
|
||||
|
||||
if (environment === 'development') {
|
||||
// ENV.APP.LOG_RESOLVER = true;
|
||||
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
||||
// ENV.APP.LOG_TRANSITIONS = true;
|
||||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||
|
||||
ENV['ember-a11y-testing'] = {
|
||||
componentOptions: {
|
||||
axeOptions: {
|
||||
checks: {
|
||||
'color-contrast': { options: { noScroll: true } }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
enableUnsafeCSP();
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
// Testem prefers this...
|
||||
ENV.locationType = 'none';
|
||||
|
||||
// keep test console output quieter
|
||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
|
||||
ENV.APP.rootElement = '#ember-testing';
|
||||
ENV.APP.autoboot = false;
|
||||
|
||||
// CSP breaks test coverage, so it is disabled in this environment
|
||||
ENV.contentSecurityPolicyMeta = false;
|
||||
}
|
||||
|
||||
if (environment === 'production') {
|
||||
// here you can enable a production-specific feature
|
||||
}
|
||||
|
||||
return ENV;
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"application-template-wrapper": false,
|
||||
"default-async-observers": true,
|
||||
"jquery-integration": false,
|
||||
"template-only-glimmer-components": true
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
const browsers = [
|
||||
'last 1 Chrome versions',
|
||||
'last 1 Firefox versions',
|
||||
'last 1 Safari versions',
|
||||
];
|
||||
|
||||
const isCI = !!process.env.CI;
|
||||
const isProduction = process.env.EMBER_ENV === 'production';
|
||||
|
||||
if (isCI || isProduction) {
|
||||
browsers.push('ie 11');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
browsers,
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
'use strict';
|
||||
|
||||
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
|
||||
module.exports = function (defaults) {
|
||||
let app = new EmberApp(defaults, {
|
||||
babel: {
|
||||
sourceMaps: 'inline',
|
||||
},
|
||||
sourcemaps: {
|
||||
enabled: true,
|
||||
extensions: ['js'],
|
||||
},
|
||||
sassOptions: {
|
||||
onlyIncluded: true,
|
||||
extension: 'scss',
|
||||
},
|
||||
});
|
||||
|
||||
// Use `app.import` to add additional libraries to the generated
|
||||
// output files.
|
||||
//
|
||||
// If you need to use different assets in different
|
||||
// environments, specify an object as the first parameter. That
|
||||
// object's keys should be the environment name and the values
|
||||
// should be the asset to use in that environment.
|
||||
//
|
||||
// If the library that you are including contains AMD or ES6
|
||||
// modules that you would like to import into your application
|
||||
// please specify an object with the list of modules as keys
|
||||
// along with the exports of each module as its value.
|
||||
|
||||
return app.toTree();
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"name": "core",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"description": "Core UI for Project Watchtower.",
|
||||
"license": "MPL-2.0",
|
||||
"author": "HashiCorp",
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
"test": "tests"
|
||||
},
|
||||
"scripts": {
|
||||
"doc:toc": "doctoc README.md",
|
||||
"build": "ember build",
|
||||
"build:production": "ember build --environment=production",
|
||||
"lint": "yarn lint:hbs && yarn lint:js && yarn lint:sass",
|
||||
"lint:hbs": "ember-template-lint .",
|
||||
"lint:js": "eslint .",
|
||||
"lint:sass": "sass-lint -v -q",
|
||||
"format": "yarn format:js && npm run format:sass",
|
||||
"format:js": "prettier --write '{app,config,stories,tests}/**/*.js' *.js",
|
||||
"format:sass": "prettier --write app/**/*.scss",
|
||||
"start": "ember serve",
|
||||
"clean:coverage": "rm -rf coverage_*",
|
||||
"pretest": "yarn clean:coverage && yarn lint",
|
||||
"test": "COVERAGE=true ember exam --random",
|
||||
"posttest": "ember coverage-merge && yarn clean:coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.9.6",
|
||||
"@ember/optional-features": "^1.3.0",
|
||||
"@glimmer/component": "^1.0.0",
|
||||
"@glimmer/tracking": "^1.0.0",
|
||||
"api": "*",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-loader": "^8.1.0",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"doctoc": "^1.4.0",
|
||||
"ember-a11y-testing": "^3.0.0",
|
||||
"ember-auto-import": "^1.5.3",
|
||||
"ember-cli": "~3.16.1",
|
||||
"ember-cli-app-version": "^3.2.0",
|
||||
"ember-cli-babel": "^7.17.2",
|
||||
"ember-cli-code-coverage": "^1.0.0-beta.9",
|
||||
"ember-cli-content-security-policy": "^1.1.1",
|
||||
"ember-cli-dependency-checker": "^3.2.0",
|
||||
"ember-cli-eslint": "^5.1.0",
|
||||
"ember-cli-htmlbars": "^4.2.2",
|
||||
"ember-cli-inject-live-reload": "^2.0.2",
|
||||
"ember-cli-sass": "^10.0.1",
|
||||
"ember-cli-sri": "^2.1.1",
|
||||
"ember-cli-template-lint": "^1.0.0-beta.3",
|
||||
"ember-cli-uglify": "^3.0.0",
|
||||
"ember-data": "~3.16.0",
|
||||
"ember-exam": "^5.0.1",
|
||||
"ember-export-application-global": "^2.0.1",
|
||||
"ember-fetch": "^7.0.0",
|
||||
"ember-inline-svg": "^1.0.0",
|
||||
"ember-intl": "^5.1.1",
|
||||
"ember-load-initializers": "^2.1.1",
|
||||
"ember-maybe-import-regenerator": "^0.1.6",
|
||||
"ember-page-title": "^5.2.1",
|
||||
"ember-qunit": "^4.6.0",
|
||||
"ember-resolver": "^7.0.0",
|
||||
"ember-source": "~3.16.0",
|
||||
"ember-welcome-page": "^4.0.0",
|
||||
"emberx-select": "github:adopted-ember-addons/emberx-select#bc5f774",
|
||||
"eslint-plugin-ember": "^7.7.2",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
"loader.js": "^4.7.0",
|
||||
"prettier": "^2.0.5",
|
||||
"qunit-dom": "^1.0.0",
|
||||
"rose": "*",
|
||||
"sass": "^1.26.5",
|
||||
"sass-lint": "^1.13.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "10.* || >= 12"
|
||||
},
|
||||
"ember": {
|
||||
"edition": "octane"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# http://www.robotstxt.org
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -0,0 +1,23 @@
|
||||
module.exports = {
|
||||
test_page: 'tests/index.html?hidepassed',
|
||||
disable_watching: true,
|
||||
launch_in_ci: ['Chrome', 'Firefox'],
|
||||
launch_in_dev: ['Chrome', 'Firefox'],
|
||||
browser_start_timeout: 120,
|
||||
browser_args: {
|
||||
Chrome: {
|
||||
ci: [
|
||||
// --no-sandbox is needed when running Chrome inside a container
|
||||
process.env.CI ? '--no-sandbox' : null,
|
||||
'--headless',
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-gpu',
|
||||
//'--disable-software-rasterizer',
|
||||
'--mute-audio',
|
||||
'--remote-debugging-port=0',
|
||||
'--window-size=1440,900',
|
||||
].filter(Boolean),
|
||||
},
|
||||
Firefox: ['-headless', '--window-size=1440,900'],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { visit, currentURL } from '@ember/test-helpers';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import a11yAudit from 'ember-a11y-testing/test-support/audit';
|
||||
|
||||
module('Acceptance | index', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
|
||||
test('visiting /', async function (assert) {
|
||||
assert.expect(1);
|
||||
await visit('/');
|
||||
await a11yAudit();
|
||||
assert.equal(currentURL(), '/');
|
||||
});
|
||||
});
|
||||
Whitespace-only changes.
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Core Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
{{content-for "test-head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/core.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
{{content-for "test-head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/core.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
Whitespace-only changes.
@@ -0,0 +1,13 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Helper | app-name', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
await render(hbs`{{app-name}}`);
|
||||
assert.equal(this.element.textContent.trim(), 'Application Name');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Application from '../app';
|
||||
import config from '../config/environment';
|
||||
import { setApplication } from '@ember/test-helpers';
|
||||
//import { start } from 'ember-qunit';
|
||||
import start from 'ember-exam/test-support/start';
|
||||
|
||||
setApplication(Application.create(config.APP));
|
||||
|
||||
start();
|
||||
Whitespace-only changes.
@@ -0,0 +1,4 @@
|
||||
app:
|
||||
name: 'Application Name'
|
||||
example:
|
||||
text: 'Example'
|
||||
Vendored
Whitespace-only changes.
Reference in new issue
Block a user