mirror of
https://github.com/nasa/openmct.git
synced 2025-06-04 00:20:50 +00:00
Merge branch 'master' into mct-7442-7959
This commit is contained in:
commit
da1b7b521a
2
.github/workflows/e2e-couchdb.yml
vendored
2
.github/workflows/e2e-couchdb.yml
vendored
@ -56,7 +56,7 @@ jobs:
|
|||||||
run: npm run cov:e2e:report
|
run: npm run cov:e2e:report
|
||||||
|
|
||||||
- name: Publish Results to Codecov.io
|
- name: Publish Results to Codecov.io
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
files: ./coverage/e2e/lcov.info
|
files: ./coverage/e2e/lcov.info
|
||||||
|
@ -54,8 +54,7 @@ const examplePlanSmall1 = JSON.parse(
|
|||||||
const TIME_TO_FROM_COLUMN = 2;
|
const TIME_TO_FROM_COLUMN = 2;
|
||||||
const HEADER_ROW = 0;
|
const HEADER_ROW = 0;
|
||||||
const NUM_COLUMNS = 5;
|
const NUM_COLUMNS = 5;
|
||||||
const FULL_CIRCLE_PATH =
|
const FULL_CIRCLE_PATH = 'M0,-50A50,50,0,1,1,0,50A50,50,0,1,1,0,-50Z';
|
||||||
'M3.061616997868383e-15,-50A50,50,0,1,1,-3.061616997868383e-15,50A50,50,0,1,1,3.061616997868383e-15,-50Z';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The regular expression used to parse the countdown string.
|
* The regular expression used to parse the countdown string.
|
||||||
|
1260
package-lock.json
generated
1260
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -16,25 +16,25 @@
|
|||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "7.23.3",
|
"@babel/eslint-parser": "7.23.3",
|
||||||
"@braintree/sanitize-url": "6.0.4",
|
"@braintree/sanitize-url": "7.1.1",
|
||||||
"@types/d3-axis": "3.0.6",
|
"@types/d3-axis": "3.0.6",
|
||||||
"@types/d3-scale": "4.0.8",
|
"@types/d3-scale": "4.0.8",
|
||||||
"@types/d3-selection": "3.0.10",
|
"@types/d3-selection": "3.0.10",
|
||||||
"@types/d3-shape": "3.0.0",
|
"@types/d3-shape": "3.1.7",
|
||||||
"@types/eventemitter3": "1.2.0",
|
"@types/eventemitter3": "1.2.0",
|
||||||
"@types/jasmine": "5.1.2",
|
"@types/jasmine": "5.1.2",
|
||||||
"@types/lodash": "4.17.0",
|
"@types/lodash": "4.17.0",
|
||||||
"@vue/compiler-sfc": "3.4.3",
|
"@vue/compiler-sfc": "3.4.3",
|
||||||
"babel-loader": "9.1.0",
|
"babel-loader": "9.1.0",
|
||||||
"babel-plugin-istanbul": "6.1.1",
|
"babel-plugin-istanbul": "7.0.0",
|
||||||
"comma-separated-values": "3.6.4",
|
"comma-separated-values": "3.6.4",
|
||||||
"copy-webpack-plugin": "12.0.2",
|
"copy-webpack-plugin": "13.0.0",
|
||||||
"cspell": "7.3.8",
|
"cspell": "7.3.8",
|
||||||
"css-loader": "6.10.0",
|
"css-loader": "6.10.0",
|
||||||
"d3-axis": "3.0.0",
|
"d3-axis": "3.0.0",
|
||||||
"d3-scale": "4.0.2",
|
"d3-scale": "4.0.2",
|
||||||
"d3-selection": "3.0.0",
|
"d3-selection": "3.0.0",
|
||||||
"d3-shape": "3.0.0",
|
"d3-shape": "3.2.0",
|
||||||
"eslint": "8.56.0",
|
"eslint": "8.56.0",
|
||||||
"eslint-config-prettier": "9.1.0",
|
"eslint-config-prettier": "9.1.0",
|
||||||
"eslint-plugin-compat": "4.2.0",
|
"eslint-plugin-compat": "4.2.0",
|
||||||
@ -51,7 +51,7 @@
|
|||||||
"git-rev-sync": "3.0.2",
|
"git-rev-sync": "3.0.2",
|
||||||
"html2canvas": "1.4.1",
|
"html2canvas": "1.4.1",
|
||||||
"imports-loader": "5.0.0",
|
"imports-loader": "5.0.0",
|
||||||
"jasmine-core": "5.1.1",
|
"jasmine-core": "5.6.0",
|
||||||
"karma": "6.4.2",
|
"karma": "6.4.2",
|
||||||
"karma-chrome-launcher": "3.2.0",
|
"karma-chrome-launcher": "3.2.0",
|
||||||
"karma-cli": "2.0.0",
|
"karma-cli": "2.0.0",
|
||||||
@ -64,14 +64,14 @@
|
|||||||
"karma-webpack": "5.0.1",
|
"karma-webpack": "5.0.1",
|
||||||
"location-bar": "3.0.1",
|
"location-bar": "3.0.1",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"marked": "12.0.0",
|
"marked": "15.0.7",
|
||||||
"mini-css-extract-plugin": "2.7.6",
|
"mini-css-extract-plugin": "2.9.2",
|
||||||
"moment": "2.30.1",
|
"moment": "2.30.1",
|
||||||
"moment-duration-format": "2.3.2",
|
"moment-duration-format": "2.3.2",
|
||||||
"moment-timezone": "0.5.41",
|
"moment-timezone": "0.5.41",
|
||||||
"nano": "10.1.4",
|
"nano": "10.1.4",
|
||||||
"npm-run-all2": "6.1.2",
|
"npm-run-all2": "7.0.2",
|
||||||
"nyc": "15.1.0",
|
"nyc": "17.1.0",
|
||||||
"painterro": "1.2.87",
|
"painterro": "1.2.87",
|
||||||
"plotly.js-basic-dist-min": "2.29.1",
|
"plotly.js-basic-dist-min": "2.29.1",
|
||||||
"plotly.js-gl2d-dist-min": "2.20.0",
|
"plotly.js-gl2d-dist-min": "2.20.0",
|
||||||
@ -79,21 +79,21 @@
|
|||||||
"prettier-eslint": "16.3.0",
|
"prettier-eslint": "16.3.0",
|
||||||
"printj": "1.3.1",
|
"printj": "1.3.1",
|
||||||
"resolve-url-loader": "5.0.0",
|
"resolve-url-loader": "5.0.0",
|
||||||
"sanitize-html": "2.12.1",
|
"sanitize-html": "2.15.0",
|
||||||
"sass": "1.71.1",
|
"sass": "1.71.1",
|
||||||
"sass-loader": "14.1.1",
|
"sass-loader": "14.1.1",
|
||||||
"style-loader": "3.3.3",
|
"style-loader": "4.0.0",
|
||||||
"terser-webpack-plugin": "5.3.9",
|
"terser-webpack-plugin": "5.3.9",
|
||||||
"tiny-emitter": "2.1.0",
|
"tiny-emitter": "2.1.0",
|
||||||
"typescript": "5.3.3",
|
"typescript": "5.3.3",
|
||||||
"uuid": "9.0.1",
|
"uuid": "11.1.0",
|
||||||
"vue": "3.4.24",
|
"vue": "3.4.24",
|
||||||
"vue-eslint-parser": "9.4.2",
|
"vue-eslint-parser": "9.4.2",
|
||||||
"vue-loader": "16.8.3",
|
"vue-loader": "16.8.3",
|
||||||
"webpack": "5.90.3",
|
"webpack": "5.98.0",
|
||||||
"webpack-cli": "5.1.1",
|
"webpack-cli": "5.1.1",
|
||||||
"webpack-dev-server": "5.0.2",
|
"webpack-dev-server": "5.0.2",
|
||||||
"webpack-merge": "5.10.0"
|
"webpack-merge": "6.0.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -rf ./dist ./node_modules ./coverage ./html-test-results ./e2e/test-results ./.nyc_output ./e2e/.nyc_output",
|
"clean": "rm -rf ./dist ./node_modules ./coverage ./html-test-results ./e2e/test-results ./.nyc_output ./e2e/.nyc_output",
|
||||||
|
@ -344,12 +344,19 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.marked = new Marked();
|
this.marked = new Marked();
|
||||||
this.renderer = new this.marked.Renderer();
|
this.marked.use({
|
||||||
|
breaks: true,
|
||||||
|
extensions: [
|
||||||
|
{
|
||||||
|
name: 'link',
|
||||||
|
renderer: (options) => {
|
||||||
|
return this.validateLink(options);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const originalLinkRenderer = this.renderer.link;
|
|
||||||
this.renderer.link = this.validateLink.bind(this, originalLinkRenderer);
|
|
||||||
|
|
||||||
this.manageEmbedLayout = _.debounce(this.manageEmbedLayout, 400);
|
this.manageEmbedLayout = _.debounce(this.manageEmbedLayout, 400);
|
||||||
|
|
||||||
if (this.$refs.embedsWrapper) {
|
if (this.$refs.embedsWrapper) {
|
||||||
@ -437,10 +444,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertMarkDownToHtml(text = '') {
|
convertMarkDownToHtml(text = '') {
|
||||||
let markDownHtml = this.marked.parse(text, {
|
let markDownHtml = this.marked.parse(text);
|
||||||
breaks: true,
|
|
||||||
renderer: this.renderer
|
|
||||||
});
|
|
||||||
markDownHtml = sanitizeHtml(markDownHtml, SANITIZATION_SCHEMA);
|
markDownHtml = sanitizeHtml(markDownHtml, SANITIZATION_SCHEMA);
|
||||||
return markDownHtml;
|
return markDownHtml;
|
||||||
},
|
},
|
||||||
@ -451,21 +455,19 @@ export default {
|
|||||||
this.$refs.entryInput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
this.$refs.entryInput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validateLink(originalLinkRenderer, href, title, text) {
|
validateLink(options) {
|
||||||
|
const { href, text } = options;
|
||||||
try {
|
try {
|
||||||
const domain = new URL(href).hostname;
|
const domain = new URL(href).hostname;
|
||||||
const urlIsWhitelisted = this.urlWhitelist.some((partialDomain) => {
|
const urlIsWhitelisted = this.urlWhitelist.some((partialDomain) => {
|
||||||
return domain.endsWith(partialDomain);
|
return domain.endsWith(partialDomain);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!urlIsWhitelisted) {
|
if (!urlIsWhitelisted) {
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
const linkHtml = originalLinkRenderer.call(this.renderer, href, title, text);
|
|
||||||
const linkHtmlWithTarget = linkHtml.replace(
|
return `<a class="c-hyperlink" target="_blank" href="${href}">${text}</a>`;
|
||||||
/^<a /,
|
|
||||||
'<a class="c-hyperlink" target="_blank"'
|
|
||||||
);
|
|
||||||
return linkHtmlWithTarget;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// had error parsing this URL, just return the text
|
// had error parsing this URL, just return the text
|
||||||
return text;
|
return text;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user