Skip to content
Snippets Groups Projects
Commit 62098530 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Only allow commonjs modules in external dependencies

parent 7c9597a3
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,9 @@ export default { ...@@ -20,7 +20,9 @@ export default {
plugins: [ plugins: [
multiEntry(), multiEntry(),
resolve(), resolve(),
commonjs(), commonjs({
include: 'node_modules/**'
}),
json(), json(),
replace({ replace({
"process.env.BUILD": '"' + build + '"', "process.env.BUILD": '"' + build + '"',
......
export const createUUID = () => {
let dt = new Date().getTime();
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = (dt + Math.random()*16)%16 | 0;
dt = Math.floor(dt/16);
return (c==='x' ? r :(r&0x3|0x8)).toString(16);
});
module.exports = { return uuid;
createUUID: () => { }
let dt = new Date().getTime();
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = (dt + Math.random()*16)%16 | 0;
dt = Math.floor(dt/16);
return (c==='x' ? r :(r&0x3|0x8)).toString(16);
});
return uuid;
}
};
import {i18n} from './i18n'; import {i18n} from './i18n';
import utils from './utils' import {createUUID} from './utils'
import {html} from 'lit-element'; import {html} from 'lit-element';
import VPULitElement from 'vpu-common/vpu-lit-element'; import VPULitElement from 'vpu-common/vpu-lit-element';
import commonUtils from 'vpu-common/utils'; import commonUtils from 'vpu-common/utils';
...@@ -33,7 +33,7 @@ class VPUNotification extends VPULitElement { ...@@ -33,7 +33,7 @@ class VPUNotification extends VPULitElement {
} }
that.notificationBlock = that._("#notification"); that.notificationBlock = that._("#notification");
const notificationId = `notification-${utils.createUUID()}`; const notificationId = `notification-${createUUID()}`;
const type = typeof e.detail.type !== 'undefined' ? e.detail.type : "info"; const type = typeof e.detail.type !== 'undefined' ? e.detail.type : "info";
const body = typeof e.detail.body !== 'undefined' ? e.detail.body : ""; const body = typeof e.detail.body !== 'undefined' ? e.detail.body : "";
......
common @ b30eaa64
Subproject commit 3623e0d1d062c1048ee37ac779d9425b56ffe26b Subproject commit b30eaa6475ccc65b5f99d2ead86ddbe2b8e015a7
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment