feedback links, fix warnings, fix security audit

This commit is contained in:
hananiel 2019-09-17 13:56:02 -04:00
Родитель f9c5df361f
Коммит 43e6d60dbe
19 изменённых файлов: 266 добавлений и 223 удалений

42
src/ClientApp/package-lock.json сгенерированный
Просмотреть файл

@ -27,7 +27,7 @@
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@ -47,7 +47,7 @@
"requires": {
"@babel/types": "^7.4.4",
"jsesc": "^2.5.1",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
}
@ -108,7 +108,7 @@
"requires": {
"@babel/helper-function-name": "^7.1.0",
"@babel/types": "^7.4.4",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-explode-assignable-expression": {
@ -172,7 +172,7 @@
"@babel/helper-split-export-declaration": "^7.4.4",
"@babel/template": "^7.4.4",
"@babel/types": "^7.4.4",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-optimise-call-expression": {
@ -193,7 +193,7 @@
"resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz",
"integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==",
"requires": {
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-remap-async-to-generator": {
@ -442,7 +442,7 @@
"integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/plugin-transform-classes": {
@ -879,7 +879,7 @@
"@babel/types": "^7.4.4",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/types": {
@ -888,7 +888,7 @@
"integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
},
@ -3985,7 +3985,7 @@
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"eslint-scope": "^4.0.3",
"eslint-utils": "^1.3.1",
"eslint-utils": "^1.4.1",
"eslint-visitor-keys": "^1.0.0",
"espree": "^5.0.1",
"esquery": "^1.0.1",
@ -4001,7 +4001,7 @@
"js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -4158,7 +4158,7 @@
"integrity": "sha512-9kRxF9hfM/O6WGZcZPszOVPd2W0TLHBtceulLTsGfwMPtiCCLnCW0ssRiOOiXyqrCA20pm1iXdXm7gQeN306zQ==",
"dev": true,
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-import": {
@ -4172,7 +4172,7 @@
"eslint-import-resolver-node": "^0.3.2",
"eslint-module-utils": "^2.3.0",
"has": "^1.0.3",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"read-pkg-up": "^2.0.0",
"resolve": "^1.9.0"
@ -5918,7 +5918,7 @@
"requires": {
"html-minifier": "^3.5.20",
"loader-utils": "^1.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"pretty-error": "^2.1.1",
"tapable": "^1.1.0",
"util.promisify": "1.0.0"
@ -5995,7 +5995,7 @@
"requires": {
"http-proxy": "^1.17.0",
"is-glob": "^4.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"micromatch": "^3.1.10"
}
},
@ -6137,7 +6137,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@ -7257,7 +7257,7 @@
"resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz",
"integrity": "sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==",
"requires": {
"lodash": "^4.17.5",
"lodash": "^4.17.13",
"webpack-sources": "^1.1.0"
}
},
@ -8916,7 +8916,7 @@
"resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-3.0.0.tgz",
"integrity": "sha512-WzrqZ5nG9R9fUtrA+we92R4jhVvEB32IIRTzfIG/PLL8UV4CvbF1ugTEHEFX6vWxl41Xt5RTCJPEZkuWzrOM+Q==",
"requires": {
"lodash.template": "^4.2.4",
"lodash.template": "^4.5.0",
"postcss": "^7.0.2"
}
},
@ -9788,7 +9788,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@ -10239,7 +10239,7 @@
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
"integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
"requires": {
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"request-promise-native": {
@ -11304,7 +11304,7 @@
"integrity": "sha512-E6CK1/pZe2N75rGZQotFOdmzWQ1AILtgYbMAbAjvms0S1l5IDB47zG3nCnFGB/w+7nB3vKofbLXCH7HPBo864w==",
"requires": {
"ajv": "^6.9.1",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
},
@ -12284,7 +12284,7 @@
"common-tags": "^1.8.0",
"fs-extra": "^4.0.2",
"glob": "^7.1.3",
"lodash.template": "^4.4.0",
"lodash.template": "^4.5.0",
"pretty-bytes": "^5.1.0",
"stringify-object": "^3.3.0",
"strip-comments": "^1.0.2",

Просмотреть файл

@ -1,11 +1,7 @@
import React, { Component } from 'react';
export class BottomLinks extends Component {
constructor (props) {
super(props);
}
render () {
return (

Просмотреть файл

@ -36,8 +36,8 @@ export class DependenciesSelector extends Component {
handleSelection(currentSelection) {
var nextDeps = this.state.dependencies.map(x => {
if (x.name == currentSelection.name) {
x.selected = currentSelection.selected != true;
if (x.name === currentSelection.name) {
x.selected = currentSelection.selected !== true;
}
return x;
});
@ -66,7 +66,7 @@ export class DependenciesSelector extends Component {
{option.name}
</strong>
<br />
<span className="description" key={index} className="desc">
<span key={index} className="desc">
{option.description}
</span>
<span className="icon"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" className="icon-plus"><path fill="currentColor" d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span>
@ -85,7 +85,7 @@ export class DependenciesSelector extends Component {
<DependencyViewSelector onChange={this.handleViewChange} />
<input name="dependencies" type="hidden" defaultValue={this.state.dependencies.filter(d => d.selected === true).map(d => d.shortName)} />
{this.state.activeView == 'quicksearch' &&
{this.state.activeView === 'quicksearch' &&
<div className="colset">
<div className="col">Search dependencies to add
<div className="control">
@ -111,7 +111,7 @@ export class DependenciesSelector extends Component {
{
this.state.dependencies.filter(d => d.selected === true).map((item) => {
return <a className="dependency-item checked" onClick={() => { this.handleSelection(item) }}>
return <a href="/#" className="dependency-item checked" onClick={() => { this.handleSelection(item) }}>
<div>
<strong> {item.name} </strong>
<br/>
@ -127,13 +127,13 @@ export class DependenciesSelector extends Component {
</div>
</div>
}
{this.state.activeView == 'list' &&
{this.state.activeView === 'list' &&
<div className="groups">
<div className="group">
<div className="group-items">
{
this.state.dependencies.map((option, index) => {
return <a className={option.selected == true ? 'checked' : ''} onClick={() => { this.handleSelection(option) }} >
return <a href="/#" className={option.selected === true ? 'checked' : ''} onClick={() => { this.handleSelection(option) }} >
<div>
<strong>{option.name}</strong><br />
<span>{option.description}</span>

Просмотреть файл

@ -31,11 +31,11 @@ export class DependencyViewSelector extends Component {
return (
<div className="tab">
<div className="tab-container">
<a href="#" className={'quick-search ' + this.state.quickSearch} aria-label="Search" onClick={() => { this.onClick('quicksearch') }} >
<a href="/#" className={'quick-search ' + this.state.quickSearch} aria-label="Search" onClick={() => { this.onClick('quicksearch') }} >
<svg aria-hidden="true" focusable="false" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" className="icon-search">
<path fill="currentColor" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
</a>
<a href="#" onClick={() => { this.onClick('list') }} aria-label="List" className={'list ' + this.state.list} >
<a href="/#" onClick={() => { this.onClick('list') }} aria-label="List" className={'list ' + this.state.list} >
<svg aria-hidden="true" focusable="false" data-icon="list" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" className="icon-list">
<path fill="currentColor" d="M128 116V76c0-8.837 7.163-16 16-16h352c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H144c-8.837 0-16-7.163-16-16zm16 176h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 144h64c8.837 0 16-7.163 16-16V64c0-8.837-7.163-16-16-16H16C7.163 48 0 55.163 0 64v64c0 8.837 7.163 16 16 16zm0 160h64c8.837 0 16-7.163 16-16v-64c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v64c0 8.837 7.163 16 16 16zm0 160h64c8.837 0 16-7.163 16-16v-64c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v64c0 8.837 7.163 16 16 16z">
</path></svg></a>

Просмотреть файл

@ -604,46 +604,6 @@ a.btn-ico {
letter-spacing: 0
}
.quick-links {
position: absolute;
top: 10px;
right: 30px;
color: #e4e4e4;
width: 320px;
text-align: right
}
.quick-links a {
margin: 0 8px;
padding-left: 24px;
text-decoration: none;
position: relative;
color: #000;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-ms-transition: color .15s;
-o-transition: color .15s;
transition: color .15s
}
.quick-links a .icon {
position: absolute;
left: 0;
top: 0;
font-size: 18px
}
.quick-links a .icon-svg {
width: 18px
}
.quick-links a:hover {
color: #2d74d1
}
.quick-links span.dropdown a.dropdown-toggle {
padding-right: 20px
}
span.dropdown {
position: relative

Просмотреть файл

@ -43,8 +43,8 @@ export class Home extends Component {
}
handleInputChange(name, selectedValue) {
if (name == "templateType") {
this.setState({ level2SelectorType: selectedValue == ".NET Templates" ? "net" : "steeltoe"})
if (name === "templateType") {
this.setState({ level2SelectorType: selectedValue === ".NET Templates" ? "net" : "steeltoe"})
}
this.setState({ [name]: selectedValue })

Просмотреть файл

@ -5,7 +5,7 @@ export class InputSelector extends Component {
this.handleChange = this.handleChange.bind(this);
this.state = { selectedValue: this.props.defaultValue };
console.log("in constructor ", this.props.name)
// console.log("in constructor ", this.props.name)
}
handleChange(e) {
console.log('setting state from ' + this.state.selectedValue);

Просмотреть файл

@ -25,6 +25,56 @@ body {
background-image: url(data:image/gif;base64,R0lGODlheAICAIAAAH2vUPf39yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowRjJERDYwM0ZBMkIxMUU4QkFDMEIyRkQzQjlGREMwMiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowRjJERDYwNEZBMkIxMUU4QkFDMEIyRkQzQjlGREMwMiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjBGMkRENjAxRkEyQjExRThCQUMwQjJGRDNCOUZEQzAyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjBGMkRENjAyRkEyQjExRThCQUMwQjJGRDNCOUZEQzAyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAHgCAgAAAiaEb6HL7Q+jnLTai7PevPsPhuJIluaJpmqJIOsLx/JM1/aN5/puFwA7);
min-width: 800px;
}
.quick-links {
position: absolute;
top: 10px;
right: 30px;
color: #e4e4e4;
width: 320px;
text-align: right
}
.quick-links a {
margin: 0 8px;
padding-left: 24px;
text-decoration: none;
position: relative;
color: #000;
-webkit-transition: color .15s;
-moz-transition: color .15s;
-ms-transition: color .15s;
-o-transition: color .15s;
transition: color .15s
}
.quick-links li {
position: relative;
display: inline-block;
}
.quick-links li a {
padding: 8px 4px 8px 28px;
position: relative;
color: #222;
margin: 0 12px;
text-decoration: none;
cursor: pointer;
outline: none;
-webkit-transition: color .15s;
transition: color .15s;
}
.quick-links li a svg {
position: absolute;
left: 4px;
top: 8px;
height: 18px;
}
.quick-links a:hover {
color: #2d74d1
}
.quick-links span.dropdown a.dropdown-toggle {
padding-right: 20px
}
@media (min-width: 768px) {

Просмотреть файл

@ -43,12 +43,29 @@ export class NavMenu extends Component {
return (
<header style={styles}>
<h1 style={logoStyles}>
<img src="logo-inline.svg" width="180px" height="50px" alt="" style={imageStyles} />
<img src="beta.png" height="80px" style={betaStyles} />
<br/>
Kick start your .NET app
</h1>
<h1 style={logoStyles}>
<img src="logo-inline.svg" width="180px" height="50px" alt="" style={imageStyles} />
<img src="beta.png" alt="beta" height="80px" style={betaStyles} />
<br/>
Kick start your .NET app
</h1>
<ul className="quick-links">
<li><a href="https://github.com/steeltoeOSS/initializr" rel="noreferrer noopener" target="_blank" tabIndex="-1">
<svg xmlns="http://www.w3.org/2000/svg" aria-label="GitHub" role="img"
viewBox="0 0 512 512"><rect
width="512" height="512"
rx="100%"
fill="#1B1817" /><path fill="#fff" d="M335 499c14 0 12 17 12 17H165s-2-17 12-17c13 0 16-6 16-12l-1-50c-71 16-86-28-86-28-12-30-28-37-28-37-24-16 1-16 1-16 26 2 40 26 40 26 22 39 59 28 74 22 2-17 9-28 16-35-57-6-116-28-116-126 0-28 10-51 26-69-3-6-11-32 3-67 0 0 21-7 70 26 42-12 86-12 128 0 49-33 70-26 70-26 14 35 6 61 3 67 16 18 26 41 26 69 0 98-60 120-117 126 10 8 18 24 18 48l-1 70c0 6 3 12 16 12z" />
</svg>
Github</a></li>
<li><a href="https://github.com/SteeltoeOSS/initializr/issues/new?assignees=&labels=feedback%2C+question&template=feedback-or-question.md&title=%5BFeedback%5D" rel="noreferrer noopener" target="_blank" tabIndex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
<g><path d="M826.7,826.7H663.3c-24.5,0-40.8-16.3-40.8-40.8c0-24.5,16.3-40.8,40.8-40.8h163.3c44.9,0,81.7-36.8,81.7-81.7v-490c0-44.9-36.8-81.7-81.7-81.7H173.3c-44.9,0-81.7,36.8-81.7,81.7v490c0,44.9,36.7,81.7,81.7,81.7h163.3c24.5,0,40.8,16.3,40.8,40.8c0,24.5-16.3,40.8-40.8,40.8H173.3C83.5,826.7,10,753.2,10,663.3v-490C10,83.5,83.5,10,173.3,10h653.3C916.5,10,990,83.5,990,173.3v490C990,753.2,916.5,826.7,826.7,826.7L826.7,826.7z" /><path d="M500,990c-12.3,0-20.4-4.1-28.6-12.3L308.1,814.4c-16.3-16.3-16.3-40.8,0-57.2c16.3-16.3,40.8-16.3,57.2,0L500,892l134.8-134.8c16.3-16.3,40.8-16.3,57.2,0c16.3,16.3,16.3,40.8,0,57.2L528.6,977.8C520.4,985.9,512.3,990,500,990L500,990z" /><path d="M745,295.8H255c-24.5,0-40.8-16.3-40.8-40.8s16.3-40.8,40.8-40.8h490c24.5,0,40.8,16.3,40.8,40.8S769.5,295.8,745,295.8L745,295.8z" /><path d="M540.8,459.2H255c-24.5,0-40.8-16.3-40.8-40.8c0-24.5,16.3-40.8,40.8-40.8h285.8c24.5,0,40.8,16.3,40.8,40.8C581.7,442.8,565.3,459.2,540.8,459.2L540.8,459.2z" /><path d="M663.3,622.5H255c-24.5,0-40.8-16.3-40.8-40.8c0-24.5,16.3-40.8,40.8-40.8h408.3c24.5,0,40.8,16.3,40.8,40.8C704.2,606.2,687.8,622.5,663.3,622.5L663.3,622.5z" /></g>
</svg>
Feedback</a></li>
</ul>
</header>
);
}

Просмотреть файл

@ -0,0 +1,61 @@
// Copyright 2017 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.IO;
namespace Steeltoe.Initializr.Services.Mustache
{
public class InclusionExpression
{
private readonly string _expression;
private readonly bool _matchesView;
public InclusionExpression(string expression, bool matchesView)
{
_expression = expression;
_matchesView = matchesView;
}
public bool IsInclusion
{
get { return _matchesView; }
}
public bool IsMatch(string fileName)
{
if (_expression.EndsWith("**"))
{
if (fileName.StartsWith(_expression.Replace("/**", string.Empty)))
{
return true;
}
}
else
{
var escapedExpression = _expression.Replace('/', Path.DirectorySeparatorChar);
var exactMatches = escapedExpression.Split(';');
foreach (var match in exactMatches)
{
if (string.Equals(fileName, match, StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
}
return false;
}
}
}

Просмотреть файл

@ -188,47 +188,4 @@ namespace Steeltoe.Initializr.Services.Mustache
matchesView: dataView.ContainsKey(x.Name) && (dataView[x.Name] is string stringValue && stringValue == "True")))
.ToList();
}
public class InclusionExpression
{
private readonly string _expression;
private readonly bool _matchesView;
public InclusionExpression(string expression, bool matchesView)
{
_expression = expression;
_matchesView = matchesView;
}
public bool IsInclusion
{
get { return _matchesView; }
}
public bool IsMatch(string fileName)
{
if (_expression.EndsWith("**"))
{
if (fileName.StartsWith(_expression.Replace("/**", string.Empty))) //unless it is has an explicit inclusion
{
return true;
}
}
else
{
var escapedExpression = _expression.Replace('/', Path.DirectorySeparatorChar);
var exactMatches = escapedExpression.Split(';');
foreach (var match in exactMatches)
{
if (string.Equals(fileName, match, StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
}
return false;
}
}
}

Просмотреть файл

@ -29,7 +29,7 @@ namespace Steeltoe.Initializr
{
public class Startup
{
private ILogger<Startup> _logger;
private readonly ILogger<Startup> _logger;
public Startup(IConfiguration configuration, ILogger<Startup> logger)
{
@ -44,12 +44,11 @@ namespace Steeltoe.Initializr
{
services.AddMemoryCache();
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddHttpsRedirection(options =>
{
options.RedirectStatusCode = StatusCodes.Status307TemporaryRedirect;
options.HttpsPort = 443;
});
// In production, the React files will be served from this directory

Просмотреть файл

@ -27,7 +27,7 @@
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@ -47,7 +47,7 @@
"requires": {
"@babel/types": "^7.4.4",
"jsesc": "^2.5.1",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
}
@ -108,7 +108,7 @@
"requires": {
"@babel/helper-function-name": "^7.1.0",
"@babel/types": "^7.4.4",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-explode-assignable-expression": {
@ -172,7 +172,7 @@
"@babel/helper-split-export-declaration": "^7.4.4",
"@babel/template": "^7.4.4",
"@babel/types": "^7.4.4",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-optimise-call-expression": {
@ -193,7 +193,7 @@
"resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz",
"integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==",
"requires": {
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-remap-async-to-generator": {
@ -442,7 +442,7 @@
"integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/plugin-transform-classes": {
@ -879,7 +879,7 @@
"@babel/types": "^7.4.4",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/types": {
@ -888,7 +888,7 @@
"integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
},
@ -1276,7 +1276,7 @@
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@ -4487,7 +4487,7 @@
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"eslint-scope": "^4.0.3",
"eslint-utils": "^1.3.1",
"eslint-utils": "^1.4.1",
"eslint-visitor-keys": "^1.0.0",
"espree": "^5.0.1",
"esquery": "^1.0.1",
@ -4503,7 +4503,7 @@
"js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -4657,7 +4657,7 @@
"integrity": "sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ==",
"dev": true,
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-import": {
@ -4671,7 +4671,7 @@
"eslint-import-resolver-node": "^0.3.2",
"eslint-module-utils": "^2.3.0",
"has": "^1.0.3",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"read-pkg-up": "^2.0.0",
"resolve": "^1.9.0"
@ -5937,7 +5937,7 @@
"requires": {
"html-minifier": "^3.5.20",
"loader-utils": "^1.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"pretty-error": "^2.1.1",
"tapable": "^1.1.0",
"util.promisify": "1.0.0"
@ -6014,7 +6014,7 @@
"requires": {
"http-proxy": "^1.17.0",
"is-glob": "^4.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"micromatch": "^3.1.10"
}
},
@ -6156,7 +6156,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@ -7756,7 +7756,7 @@
"resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz",
"integrity": "sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==",
"requires": {
"lodash": "^4.17.5",
"lodash": "^4.17.13",
"webpack-sources": "^1.1.0"
}
},
@ -7884,7 +7884,7 @@
}
},
"lodash": {
"version": "4.17.11",
"version": "4.17.13",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
@ -10202,7 +10202,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@ -10364,7 +10364,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.1.tgz",
"integrity": "sha512-9kRxF9hfM/O6WGZcZPszOVPd2W0TLHBtceulLTsGfwMPtiCCLnCW0ssRiOOiXyqrCA20pm1iXdXm7gQeN306zQ==",
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-jsx-a11y": {
@ -10684,7 +10684,7 @@
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
"integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
"requires": {
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"request-promise-native": {
@ -11731,7 +11731,7 @@
"integrity": "sha512-E6CK1/pZe2N75rGZQotFOdmzWQ1AILtgYbMAbAjvms0S1l5IDB47zG3nCnFGB/w+7nB3vKofbLXCH7HPBo864w==",
"requires": {
"ajv": "^6.9.1",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
},

Просмотреть файл

@ -27,7 +27,7 @@
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@ -47,7 +47,7 @@
"requires": {
"@babel/types": "^7.4.4",
"jsesc": "^2.5.1",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
}
@ -108,7 +108,7 @@
"requires": {
"@babel/helper-function-name": "^7.1.0",
"@babel/types": "^7.4.4",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-explode-assignable-expression": {
@ -172,7 +172,7 @@
"@babel/helper-split-export-declaration": "^7.4.4",
"@babel/template": "^7.4.4",
"@babel/types": "^7.4.4",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-optimise-call-expression": {
@ -193,7 +193,7 @@
"resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz",
"integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==",
"requires": {
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/helper-remap-async-to-generator": {
@ -442,7 +442,7 @@
"integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/plugin-transform-classes": {
@ -879,7 +879,7 @@
"@babel/types": "^7.4.4",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"@babel/types": {
@ -888,7 +888,7 @@
"integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
},
@ -1276,7 +1276,7 @@
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@ -4503,7 +4503,7 @@
"js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -4657,7 +4657,7 @@
"integrity": "sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ==",
"dev": true,
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-import": {
@ -4671,7 +4671,7 @@
"eslint-import-resolver-node": "^0.3.2",
"eslint-module-utils": "^2.3.0",
"has": "^1.0.3",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"read-pkg-up": "^2.0.0",
"resolve": "^1.9.0"
@ -5937,7 +5937,7 @@
"requires": {
"html-minifier": "^3.5.20",
"loader-utils": "^1.1.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"pretty-error": "^2.1.1",
"tapable": "^1.1.0",
"util.promisify": "1.0.0"
@ -6014,7 +6014,7 @@
"requires": {
"http-proxy": "^1.17.0",
"is-glob": "^4.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"micromatch": "^3.1.10"
}
},
@ -6156,7 +6156,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@ -7756,7 +7756,7 @@
"resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz",
"integrity": "sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==",
"requires": {
"lodash": "^4.17.5",
"lodash": "^4.17.13",
"webpack-sources": "^1.1.0"
}
},
@ -7884,7 +7884,7 @@
}
},
"lodash": {
"version": "4.17.11",
"version": "4.17.13",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
@ -9389,7 +9389,7 @@
"resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-3.0.0.tgz",
"integrity": "sha512-WzrqZ5nG9R9fUtrA+we92R4jhVvEB32IIRTzfIG/PLL8UV4CvbF1ugTEHEFX6vWxl41Xt5RTCJPEZkuWzrOM+Q==",
"requires": {
"lodash.template": "^4.2.4",
"lodash.template": "^4.5.0",
"postcss": "^7.0.2"
}
},
@ -10202,7 +10202,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@ -10364,7 +10364,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.1.tgz",
"integrity": "sha512-9kRxF9hfM/O6WGZcZPszOVPd2W0TLHBtceulLTsGfwMPtiCCLnCW0ssRiOOiXyqrCA20pm1iXdXm7gQeN306zQ==",
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-jsx-a11y": {
@ -10684,7 +10684,7 @@
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
"integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
"requires": {
"lodash": "^4.17.11"
"lodash": "^4.17.13"
}
},
"request-promise-native": {
@ -11731,7 +11731,7 @@
"integrity": "sha512-E6CK1/pZe2N75rGZQotFOdmzWQ1AILtgYbMAbAjvms0S1l5IDB47zG3nCnFGB/w+7nB3vKofbLXCH7HPBo864w==",
"requires": {
"ajv": "^6.9.1",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
},
@ -12701,7 +12701,7 @@
"common-tags": "^1.8.0",
"fs-extra": "^4.0.2",
"glob": "^7.1.3",
"lodash.template": "^4.4.0",
"lodash.template": "^4.5.0",
"pretty-bytes": "^5.1.0",
"stringify-object": "^3.3.0",
"strip-comments": "^1.0.2",

Просмотреть файл

@ -316,7 +316,7 @@
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"async-each": {
@ -393,7 +393,7 @@
"convert-source-map": "^1.5.0",
"debug": "^2.6.8",
"json5": "^0.5.1",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"path-is-absolute": "^1.0.1",
"private": "^0.1.7",
@ -429,7 +429,7 @@
"babel-types": "^6.26.0",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"source-map": "^0.5.7",
"trim-right": "^1.0.1"
},
@ -480,7 +480,7 @@
"babel-helper-function-name": "^6.24.1",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-helper-explode-assignable-expression": {
@ -539,7 +539,7 @@
"requires": {
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-helper-remap-async-to-generator": {
@ -724,7 +724,7 @@
"babel-template": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-plugin-transform-es2015-classes": {
@ -1103,7 +1103,7 @@
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"home-or-tmp": "^2.0.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"mkdirp": "^0.5.1",
"source-map-support": "^0.4.15"
},
@ -1140,7 +1140,7 @@
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-traverse": {
@ -1156,7 +1156,7 @@
"debug": "^2.6.8",
"globals": "^9.18.0",
"invariant": "^2.2.2",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-types": {
@ -1166,7 +1166,7 @@
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"to-fast-properties": "^1.0.3"
}
},
@ -3266,7 +3266,7 @@
"js-yaml": "^3.9.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -3440,7 +3440,7 @@
"integrity": "sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ==",
"dev": true,
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-import": {
@ -3455,7 +3455,7 @@
"eslint-import-resolver-node": "^0.3.1",
"eslint-module-utils": "^2.2.0",
"has": "^1.0.1",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.3",
"read-pkg-up": "^2.0.0",
"resolve": "^1.6.0"
@ -8796,7 +8796,7 @@
"js-yaml": "^3.9.1",
"json-stable-stringify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -8829,7 +8829,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.39.1.tgz",
"integrity": "sha512-RiQv+7Z9QDJuzt+NO8sYgkLGT+h+WeCrxP7y8lI7wpU41x3x/2o3PGtHk9ck8QnA9/mlbNcy/hG0eKvmd7npaA==",
"requires": {
"lodash": "^4.15.0"
"lodash": "^4.15.13"
}
},
"eslint-plugin-import": {
@ -10377,7 +10377,7 @@
"es6-promise": "^4.0.5",
"glob": "^7.1.1",
"lodash.defaults": "^4.2.0",
"lodash.template": "^4.4.0",
"lodash.template": "^4.5.0",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
"pretty-bytes": "^4.0.2",
@ -10417,7 +10417,7 @@
"ajv": "^5.2.3",
"ajv-keywords": "^2.1.0",
"chalk": "^2.1.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"slice-ansi": "1.0.0",
"string-width": "^2.1.1"
},

Просмотреть файл

@ -316,7 +316,7 @@
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"async-each": {
@ -393,7 +393,7 @@
"convert-source-map": "^1.5.0",
"debug": "^2.6.8",
"json5": "^0.5.1",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.4",
"path-is-absolute": "^1.0.1",
"private": "^0.1.7",
@ -429,7 +429,7 @@
"babel-types": "^6.26.0",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"source-map": "^0.5.7",
"trim-right": "^1.0.1"
},
@ -480,7 +480,7 @@
"babel-helper-function-name": "^6.24.1",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-helper-explode-assignable-expression": {
@ -539,7 +539,7 @@
"requires": {
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-helper-remap-async-to-generator": {
@ -724,7 +724,7 @@
"babel-template": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-plugin-transform-es2015-classes": {
@ -1103,7 +1103,7 @@
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"home-or-tmp": "^2.0.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"mkdirp": "^0.5.1",
"source-map-support": "^0.4.15"
},
@ -1140,7 +1140,7 @@
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-traverse": {
@ -1156,7 +1156,7 @@
"debug": "^2.6.8",
"globals": "^9.18.0",
"invariant": "^2.2.2",
"lodash": "^4.17.4"
"lodash": "^4.17.13"
}
},
"babel-types": {
@ -1166,7 +1166,7 @@
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"to-fast-properties": "^1.0.3"
}
},
@ -3266,7 +3266,7 @@
"js-yaml": "^3.9.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -3440,7 +3440,7 @@
"integrity": "sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ==",
"dev": true,
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.13"
}
},
"eslint-plugin-import": {
@ -3455,7 +3455,7 @@
"eslint-import-resolver-node": "^0.3.1",
"eslint-module-utils": "^2.2.0",
"has": "^1.0.1",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.3",
"read-pkg-up": "^2.0.0",
"resolve": "^1.6.0"
@ -5162,7 +5162,7 @@
"cli-width": "^2.0.0",
"external-editor": "^2.0.4",
"figures": "^2.0.0",
"lodash": "^4.3.0",
"lodash": "^4.17.13",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rx-lite": "^4.0.8",
@ -8796,7 +8796,7 @@
"js-yaml": "^3.9.1",
"json-stable-stringify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@ -8829,7 +8829,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.39.1.tgz",
"integrity": "sha512-RiQv+7Z9QDJuzt+NO8sYgkLGT+h+WeCrxP7y8lI7wpU41x3x/2o3PGtHk9ck8QnA9/mlbNcy/hG0eKvmd7npaA==",
"requires": {
"lodash": "^4.15.0"
"lodash": "^4.17.13"
}
},
"eslint-plugin-import": {
@ -10377,7 +10377,7 @@
"es6-promise": "^4.0.5",
"glob": "^7.1.1",
"lodash.defaults": "^4.2.0",
"lodash.template": "^4.4.0",
"lodash.template": "^4.5.0",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
"pretty-bytes": "^4.0.2",
@ -10417,7 +10417,7 @@
"ajv": "^5.2.3",
"ajv-keywords": "^2.1.0",
"chalk": "^2.1.0",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"slice-ansi": "1.0.0",
"string-width": "^2.1.1"
},

Просмотреть файл

@ -50,7 +50,7 @@ namespace Steeltoe.Initializr.Tests
select new object[] { implementation, templateName, templateVersion };
_data = data.ToList();
}
public IEnumerator<object[]> GetEnumerator() => _data.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

Просмотреть файл

@ -25,13 +25,11 @@ namespace Steeltoe.Initializr.Tests
{
public class TemplateServiceTests : XunitLoggingBase
{
private readonly ITestOutputHelper _testOutputHelper;
private readonly LoggerFactory _loggerFactory;
public TemplateServiceTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
_testOutputHelper = testOutputHelper;
_loggerFactory = new LoggerFactory();
_loggerFactory.AddProvider(new XunitLoggerProvider(testOutputHelper));
}
@ -194,7 +192,6 @@ namespace Steeltoe.Initializr.Tests
Assert.Contains("services.AddPostgresConnection(Configuration);", startUpContents);
}
[Fact]
public async Task CreateTemplate_ConfigServer()
{
@ -212,10 +209,6 @@ namespace Steeltoe.Initializr.Tests
Assert.DoesNotContain(files, file => file.Key.EndsWith("SampleData.cs"));
Assert.Contains(files, file => file.Key.EndsWith("ConfigDataController.cs"));
Assert.Contains(files, file => file.Key.EndsWith("ConfigServerData.cs"));
//string startUpContents = files.Find(x => x.Key == "Startup.cs").Value;
//Assert.Contains("using Steeltoe.CloudFoundry.Connector.PostgreSql;", startUpContents);
//Assert.Contains("services.AddPostgresConnection(Configuration);", startUpContents);
}
[Theory]
@ -457,7 +450,6 @@ namespace Steeltoe.Initializr.Tests
var projectFile = files.Find(x => x.Key == "Foo.Bar.csproj").Value;
var targetFramework = version == TemplateVersion.V3 ? "netcoreapp3.0" : "netcoreapp2.2";
Assert.Contains($"<TargetFramework>{targetFramework}</TargetFramework>", projectFile);
}
[Theory]

Просмотреть файл

@ -1,8 +1,19 @@
using Microsoft.Extensions.Configuration;
using System;
// Copyright 2017 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using Microsoft.Extensions.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Steeltoe.Initializr.Tests
{