Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getOptions(opts = {}) {
let moduleExtensions = new Set(['js', 'jsx', 'vue', 'ts', 'tsx', 'mjs']);
const options = merge.all([
{
env: {
NODE_ENV: 'development'
},
debug: false,
quiet: false
},
opts.mains ? { mains: opts.mains } : { mains: { index: 'index' } },
omit(['mains'], opts)
]);
Object
.keys(options.env)
.forEach(env => process.env[env] = options.env[env]);
pathOptions.forEach(([path, defaultValue, getNormalizeBase]) => {
const options = config.get()
const _style = createUnderstyle(options)
const filter = filterProps(options)
const props = {}
Object.keys(original)
.forEach(key => {
if (!filter(key) || AXS_PROPS.test(key)) return
const value = original[key]
props[key] = value
})
const propStyles = _style(original)
const styles = merge.all([
{ margin: 0 },
(original._css || {}),
propStyles,
(original.css || {}),
])
const cxsClassName = cxs(styles)
const className = classnames(original.className, cxsClassName)
return { props, className }
}
constructor(cfg = {}) {
const config = merge.all([defaultConfig, cfg]);
this.config = config;
const spriteFactoryOptions = {
attrs: config.spriteAttrs
};
if (config.plainSprite) {
spriteFactoryOptions.styles = false;
spriteFactoryOptions.usages = false;
}
this.factory = ({ symbols }) => {
const opts = merge.all([spriteFactoryOptions, { symbols }]);
return spriteFactory(opts);
};
import merge from 'deepmerge';
import {CRB} from './CRB'
import {ROT} from './ROT'
export const talents = merge.all([CRB, ROT]);
function mergeExtensions(paths) {
const config = paths.map(path => {
return getFileContents(path) || {}
})
const merged = deepmerge.all(config)
const mergedExtensions = Object.entries(merged.extensions).map(([code, extension]) => {
return extensionConfig = {
...EXTENSION_DEFAULTS,
...extension,
...{ code }
}
})
return {
attribute_fields: merged.attribute_fields,
extensions: mergedExtensions.sort((a, b) => {
return a.position - b.position
})
}
}
import { all as deepMerge } from "deepmerge";
import currying from "./currying";
import noMutations from "./no-mutations";
import noExceptions from "./no-exceptions";
import noObjectOrientation from "./no-object-orientation";
import noStatements from "./no-statements";
import { Config } from "../util/misc";
const config: Config = deepMerge([
currying,
noMutations,
noExceptions,
noObjectOrientation,
noStatements
]);
export default config;
},
serverConfig: {},
clientConfig: {},
webpackConfig: {
include: [],
ignore: [
'node_modules',
'.nuxt/dist/client/img'
],
urlPrefix: publicPath.startsWith('/') ? `~${publicPath}` : publicPath,
configFile: '.sentryclirc'
}
}
const topLevelOptions = this.options.sentry || {}
const options = deepMerge.all([defaults, topLevelOptions, moduleOptions])
options.serverConfig = deepMerge.all([options.config, options.serverConfig])
options.clientConfig = deepMerge.all([options.config, options.clientConfig])
if (!options.disableServerRelease) {
options.webpackConfig.include.push(`${buildDirRelative}/dist/server`)
}
if (!options.disableClientRelease) {
options.webpackConfig.include.push(`${buildDirRelative}/dist/client`)
}
if (options.config.release && !options.webpackConfig.release) {
options.webpackConfig.release = options.config.release
}
const initializationRequired = options.initialize && options.dsn
const findTypeInSchema = (schema, dataPath) => {
if (!schema) {
return;
} else if (dataPath.length === 0 && schema.hasOwnProperty("type")) {
return schema.type;
} else {
if (schema.type === "array") {
return findTypeInSchema(schema.items, dataPath.slice(1));
} else if (schema.hasOwnProperty("allOf")) {
if (dataPath.length === 0) return "allOf";
schema = { ...schema, ...merge.all(schema.allOf) };
delete schema.allOf;
return findTypeInSchema(schema, dataPath);
} else if (schema.hasOwnProperty("oneOf")) {
if (dataPath.length === 0) return "oneOf";
schema.oneOf.forEach(item => {
let type = findTypeInSchema(item, dataPath);
if (type) {
return type;
}
});
} else {
return findTypeInSchema(
schema.properties[dataPath[0]],
dataPath.slice(1)
);
}
sample = code.substring(startIndex + SAMPLE_START.length + 1, endIndex - 1);
}
if (this.suffix.endsWith('\n')) {
this.suffix = this.suffix.substr(0, this.suffix.length - 1)
}
} else {
if (this.state.folded) {
sample = this.codemirror.getValue();
} else {
let editorValue = this.codemirror.getValue();
sample = editorValue.substring(this.prefix.length, editorValue.length - this.suffix.length);
}
}
this.state = merge.all([this.state, state, {
isShouldBeFolded: this.isShouldBeFolded && state.isFoldedButton
}]);
super.update(this.state);
if (!this.initialized) {
this.initializeCodeMirror(state);
this.initialized = true;
} else {
this.showDiagnostics(state.errors);
if (state.folded === undefined) {
return
}
}
if (this.state.folded) {
this.codemirror.setOption("lineNumbers", state.lines && !hasMarkers);
componentWillLoad(){
const typeStyle = new TypographyStyle();
let changeStyle:object = {
root:{
display : this.display
}
}
if(this.color){
changeStyle[this.type] = {'color': this.color};
}
if(this.styles){
if(changeStyle[this.type])
{
changeStyle[this.type] = deepmerge.all([changeStyle[this.type],this.styles])
}else{
changeStyle[this.type] = this.styles
}
}
typeStyle.setup(changeStyle)
let classNames: Array = []
classNames.push('root')
classNames.push(this.type)
classNames.push(`align${this.align}`)
if(this.nowrap){
classNames.push('nowrap')
}
if(this.gutterbottom){
classNames.push('gutterbottom')
}