Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {destroy, flow, getRoot, isAlive, types} from 'mobx-state-tree';
import getLogger from "../tools/getLogger";
import {fetch} from "whatwg-fetch";
import {struct} from 'superstruct';
import TrackerStore, {TrackerMetaStore} from "./TrackerStore";
import getTrackerCodeMeta from "../tools/getTrackerCodeMeta";
import storageGet from "../tools/storageGet";
import storageSet from "../tools/storageSet";
import getHash from "../tools/getHash";
import setCodeMeta from "../tools/setCodeMeta";
const logger = getLogger('TrackerStoreStore');
const Files = struct([struct.partial({
name: 'string',
// path: 'string',
// sha: 'string',
size: 'number',
// url: 'string',
html_url: 'string',
// git_url: 'string',
download_url: 'string',
type: 'string',
// _links: struct.partial({
// self: 'string',
// git: 'string',
// html: 'string',
// }),
})]);
fontSizes: 'array',
fontWeights: 'array',
lineHeights: 'array',
metadata: 'object?'
})
const Data = struct.partial({
name: 'string',
lastModified: 'string',
thumbnailUrl: 'string',
document: struct.partial({
children: struct.list([ 'object' ]),
}),
styles: struct.dict([
'string',
struct.partial({
name: 'string',
styleType: 'string',
})
])
})
const unique = arr => [...new Set(arr)]
module.exports = (data, opts = {}) => {
Data(data)
const {
styles = {},
document: {
children: tree = []
}
} = data
fontWeight: 'number',
lineHeight: 'number',
})
]),
fonts: 'array',
fontSizes: 'array',
fontWeights: 'array',
lineHeights: 'array',
metadata: 'object?'
})
const Data = struct.partial({
name: 'string',
lastModified: 'string',
thumbnailUrl: 'string',
document: struct.partial({
children: struct.list([ 'object' ]),
}),
styles: struct.dict([
'string',
struct.partial({
name: 'string',
styleType: 'string',
})
])
})
const unique = arr => [...new Set(arr)]
module.exports = (data, opts = {}) => {
Data(data)
const {
'string',
struct({
fontFamily: 'string',
fontSize: 'number',
fontWeight: 'number',
lineHeight: 'number',
})
]),
fonts: 'array',
fontSizes: 'array',
fontWeights: 'array',
lineHeights: 'array',
metadata: 'object?'
})
const Data = struct.partial({
name: 'string',
lastModified: 'string',
thumbnailUrl: 'string',
document: struct.partial({
children: struct.list([ 'object' ]),
}),
styles: struct.dict([
'string',
struct.partial({
name: 'string',
styleType: 'string',
})
])
})
const unique = arr => [...new Set(arr)]