diff --git a/packages/browser-tests/package-lock.json b/packages/browser-tests/package-lock.json index 88f49d8..933c1af 100644 --- a/packages/browser-tests/package-lock.json +++ b/packages/browser-tests/package-lock.json @@ -10,29 +10,6 @@ "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==", "dev": true }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "dev": true, - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, - "@iconify/iconify": { - "version": "2.0.0-beta.2", - "resolved": "https://registry.npmjs.org/@iconify/iconify/-/iconify-2.0.0-beta.2.tgz", - "integrity": "sha512-8wV/WGwR/6Ys5QKpjPAEP6Ghs6f2aJYVlZaQ98CZ1md6/1d+S8qmXZurLcoPA6mFQh8XtfawnuzvWGp/B2DE3w==", - "dev": true - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==", - "dev": true - }, "@rollup/plugin-buble": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-buble/-/plugin-buble-0.21.3.tgz", @@ -179,16 +156,6 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.5.10" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -464,35 +431,6 @@ "is-buffer": "~2.0.3" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "optional": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - } - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 6e8564e..2d3ec5b 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -29,11 +29,6 @@ "resolved": "https://registry.npmjs.org/@cyberalien/redundancy/-/redundancy-1.0.0.tgz", "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==" }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==" - }, "@types/caseless": { "version": "0.12.2", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", diff --git a/packages/core/src/api/config.ts b/packages/core/src/api/config.ts index 8e80e1a..148b894 100644 --- a/packages/core/src/api/config.ts +++ b/packages/core/src/api/config.ts @@ -118,9 +118,14 @@ export function setAPIConfig( return true; } +/** + * Signature for getAPIConfig + */ +export type GetAPIConfig = (provider: string) => IconifyAPIConfig | undefined; + /** * Get API configuration */ -export function getAPIConfig(provider: string): IconifyAPIConfig | undefined { - return configStorage[provider]; -} +export const getAPIConfig: GetAPIConfig = ( + provider: string +): IconifyAPIConfig | undefined => configStorage[provider]; diff --git a/packages/core/src/api/modules.ts b/packages/core/src/api/modules.ts index 2937ea7..53ca46e 100644 --- a/packages/core/src/api/modules.ts +++ b/packages/core/src/api/modules.ts @@ -1,4 +1,5 @@ import { RedundancyPendingItem } from '@cyberalien/redundancy'; +import { GetAPIConfig } from '../api/config'; /** * Params for sendQuery() @@ -50,3 +51,10 @@ export function setAPIModule(provider: string, item: IconifyAPIModule): void { export function getAPIModule(provider: string): IconifyAPIModule | undefined { return storage[provider] === void 0 ? storage[''] : storage[provider]; } + +/** + * Function to return API interface + */ +export type GetIconifyAPIModule = ( + getAPIConfig: GetAPIConfig +) => IconifyAPIModule; diff --git a/packages/iconify/package-lock.json b/packages/iconify/package-lock.json index 230a36c..6465e35 100644 --- a/packages/iconify/package-lock.json +++ b/packages/iconify/package-lock.json @@ -30,23 +30,6 @@ "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==", "dev": true }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "dev": true, - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==", - "dev": true - }, "@microsoft/api-extractor": { "version": "7.8.8", "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.8.8.tgz", diff --git a/packages/iconify/src/iconify.ts b/packages/iconify/src/iconify.ts index 756d152..e8b8701 100644 --- a/packages/iconify/src/iconify.ts +++ b/packages/iconify/src/iconify.ts @@ -44,13 +44,20 @@ import { getRedundancyCache, IconifyAPIInternalStorage, } from '@iconify/core/lib/api/'; -import { setAPIModule } from '@iconify/core/lib/api/modules'; +import { + setAPIModule, + IconifyAPIModule, + IconifyAPISendQuery, + IconifyAPIPrepareQuery, +} from '@iconify/core/lib/api/modules'; import { setAPIConfig, PartialIconifyAPIConfig, IconifyAPIConfig, + getAPIConfig, + GetAPIConfig, } from '@iconify/core/lib/api/config'; -import { prepareQuery, sendQuery } from './modules/api-jsonp'; +import { getAPIModule } from './modules/api-jsonp'; import { IconifyIconLoaderCallback, IconifyIconLoaderAbort, @@ -69,7 +76,7 @@ import { scanDOM } from './scan'; * Export required types */ // JSON stuff -export { IconifyIcon, IconifyJSON }; +export { IconifyIcon, IconifyJSON, IconifyIconName }; // Customisations export { @@ -88,6 +95,10 @@ export { IconifyIconLoaderCallback, IconifyIconLoaderAbort, IconifyAPIInternalStorage, + IconifyAPIModule, + GetAPIConfig, + IconifyAPIPrepareQuery, + IconifyAPISendQuery, }; /** @@ -116,6 +127,16 @@ export interface IconifyExposedInternals { * Get internal API data, used by Icon Finder */ getAPI: (provider: string) => IconifyAPIInternalStorage | undefined; + + /** + * Get API config, used by custom modules + */ + getAPIConfig: GetAPIConfig; + + /** + * Set API module + */ + setAPIModule: (provider: string, item: IconifyAPIModule) => void; } /** @@ -455,6 +476,12 @@ const Iconify: IconifyGlobal = { // Get API data getAPI: getRedundancyCache, + + // Get API config + getAPIConfig, + + // Get API module + setAPIModule, }, }; @@ -463,10 +490,7 @@ const Iconify: IconifyGlobal = { */ // Set API coreModules.api = API; -setAPIModule('', { - send: sendQuery, - prepare: prepareQuery, -}); +setAPIModule('', getAPIModule(getAPIConfig)); if (typeof document !== 'undefined' && typeof window !== 'undefined') { // Add finder modules diff --git a/packages/iconify/src/modules/api-axios.ts b/packages/iconify/src/modules/api-axios.ts index 75e6cb9..0f64ef2 100644 --- a/packages/iconify/src/modules/api-axios.ts +++ b/packages/iconify/src/modules/api-axios.ts @@ -4,8 +4,10 @@ import { APIQueryParams, IconifyAPIPrepareQuery, IconifyAPISendQuery, + IconifyAPIModule, + GetIconifyAPIModule, } from '@iconify/core/lib/api/modules'; -import { getAPIConfig } from '@iconify/core/lib/api/config'; +import { GetAPIConfig } from '@iconify/core/lib/api/config'; /** * Endpoint @@ -19,128 +21,141 @@ const maxLengthCache: Record = Object.create(null); const pathCache: Record = Object.create(null); /** - * Calculate maximum icons list length for prefix + * Return API module */ -function calculateMaxLength(provider: string, prefix: string): number { - // Get config and store path - const config = getAPIConfig(provider); - if (!config) { - return 0; +export const getAPIModule: GetIconifyAPIModule = ( + getAPIConfig: GetAPIConfig +): IconifyAPIModule => { + /** + * Calculate maximum icons list length for prefix + */ + function calculateMaxLength(provider: string, prefix: string): number { + // Get config and store path + const config = getAPIConfig(provider); + if (!config) { + return 0; + } + + // Calculate + let result; + if (!config.maxURL) { + result = 0; + } else { + let maxHostLength = 0; + config.resources.forEach((host) => { + maxHostLength = Math.max(maxHostLength, host.length); + }); + + // Get available length + result = + config.maxURL - + maxHostLength - + config.path.length - + endPoint + .replace('{provider}', provider) + .replace('{prefix}', prefix) + .replace('{icons}', '').length; + } + + // Cache stuff and return result + const cacheKey = provider + ':' + prefix; + pathCache[cacheKey] = config.path; + maxLengthCache[cacheKey] = result; + return result; } - // Calculate - let result; - if (!config.maxURL) { - result = 0; - } else { - let maxHostLength = 0; - config.resources.forEach((host) => { - maxHostLength = Math.max(maxHostLength, host.length); - }); + /** + * Prepare params + */ + const prepare: IconifyAPIPrepareQuery = ( + provider: string, + prefix: string, + icons: string[] + ): APIQueryParams[] => { + const results: APIQueryParams[] = []; - // Get available length - result = - config.maxURL - - maxHostLength - - config.path.length - + // Get maximum icons list length + let maxLength = maxLengthCache[prefix]; + if (maxLength === void 0) { + maxLength = calculateMaxLength(provider, prefix); + } + + // Split icons + let item: APIQueryParams = { + provider, + prefix, + icons: [], + }; + let length = 0; + icons.forEach((name, index) => { + length += name.length + 1; + if (length >= maxLength && index > 0) { + // Next set + results.push(item); + item = { + provider, + prefix, + icons: [], + }; + length = name.length; + } + + item.icons.push(name); + }); + results.push(item); + + return results; + }; + + /** + * Load icons + */ + const send: IconifyAPISendQuery = ( + host: string, + params: APIQueryParams, + status: RedundancyPendingItem + ): void => { + const provider = params.provider; + const prefix = params.prefix; + const icons = params.icons; + const iconsList = icons.join(','); + + const cacheKey = provider + ':' + prefix; + let path = + pathCache[cacheKey] + endPoint .replace('{provider}', provider) .replace('{prefix}', prefix) - .replace('{icons}', '').length; - } + .replace('{icons}', iconsList); - // Cache stuff and return result - const cacheKey = provider + ':' + prefix; - pathCache[cacheKey] = config.path; - maxLengthCache[cacheKey] = result; - return result; -} - -/** - * Prepare params - */ -export const prepareQuery: IconifyAPIPrepareQuery = ( - provider: string, - prefix: string, - icons: string[] -): APIQueryParams[] => { - const results: APIQueryParams[] = []; - - // Get maximum icons list length - let maxLength = maxLengthCache[prefix]; - if (maxLength === void 0) { - maxLength = calculateMaxLength(provider, prefix); - } - - // Split icons - let item: APIQueryParams = { - provider, - prefix, - icons: [], - }; - let length = 0; - icons.forEach((name, index) => { - length += name.length + 1; - if (length >= maxLength && index > 0) { - // Next set - results.push(item); - item = { - provider, - prefix, - icons: [], - }; - length = name.length; - } - - item.icons.push(name); - }); - results.push(item); - - return results; -}; - -/** - * Load icons - */ -export const sendQuery: IconifyAPISendQuery = ( - host: string, - params: APIQueryParams, - status: RedundancyPendingItem -): void => { - const provider = params.provider; - const prefix = params.prefix; - const icons = params.icons; - const iconsList = icons.join(','); - - const cacheKey = provider + ':' + prefix; - let path = - pathCache[cacheKey] + - endPoint - .replace('{provider}', provider) - .replace('{prefix}', prefix) - .replace('{icons}', iconsList); - - // console.log('API query:', host + path); - const instance = axios.create({ - baseURL: host, - }); - instance - .get(path) - .then((response) => { - if (response.status !== 200) { - return; - } - - // Copy data. No need to parse it, axios parses JSON data - const data = response.data; - if (typeof data !== 'object' || data === null) { - return; - } - - // Store cache and complete - status.done(data); - }) - .catch((err) => { - // Do nothing + // console.log('API query:', host + path); + const instance = axios.create({ + baseURL: host, }); + instance + .get(path) + .then((response) => { + if (response.status !== 200) { + return; + } + + // Copy data. No need to parse it, axios parses JSON data + const data = response.data; + if (typeof data !== 'object' || data === null) { + return; + } + + // Store cache and complete + status.done(data); + }) + .catch((err) => { + // Do nothing + }); + }; + + // Return functions + return { + prepare, + send, + }; }; diff --git a/packages/iconify/src/modules/api-jsonp.ts b/packages/iconify/src/modules/api-jsonp.ts index 67dea6d..f578732 100644 --- a/packages/iconify/src/modules/api-jsonp.ts +++ b/packages/iconify/src/modules/api-jsonp.ts @@ -3,8 +3,10 @@ import { APIQueryParams, IconifyAPIPrepareQuery, IconifyAPISendQuery, + IconifyAPIModule, + GetIconifyAPIModule, } from '@iconify/core/lib/api/modules'; -import { getAPIConfig } from '@iconify/core/lib/api/config'; +import { GetAPIConfig } from '@iconify/core/lib/api/config'; /** * Global @@ -82,144 +84,157 @@ function getGlobal(): JSONPRoot { } /** - * Calculate maximum icons list length for prefix + * Return API module */ -function calculateMaxLength(provider: string, prefix: string): number { - // Get config and store path - const config = getAPIConfig(provider); - if (!config) { - return 0; +export const getAPIModule: GetIconifyAPIModule = ( + getAPIConfig: GetAPIConfig +): IconifyAPIModule => { + /** + * Calculate maximum icons list length for prefix + */ + function calculateMaxLength(provider: string, prefix: string): number { + // Get config and store path + const config = getAPIConfig(provider); + if (!config) { + return 0; + } + + // Calculate + let result; + if (!config.maxURL) { + result = 0; + } else { + let maxHostLength = 0; + config.resources.forEach((host) => { + maxHostLength = Math.max(maxHostLength, host.length); + }); + + // Make sure global is set + getGlobal(); + + // Extra width: prefix (3) + counter (4) - '{cb}' (4) + const extraLength = 3; + + // Get available length + result = + config.maxURL - + maxHostLength - + config.path.length - + endPoint + .replace('{provider}', provider) + .replace('{prefix}', prefix) + .replace('{icons}', '').length - + extraLength; + } + + // Cache stuff and return result + const cacheKey = provider + ':' + prefix; + pathCache[cacheKey] = config.path; + maxLengthCache[cacheKey] = result; + return result; } - // Calculate - let result; - if (!config.maxURL) { - result = 0; - } else { - let maxHostLength = 0; - config.resources.forEach((host) => { - maxHostLength = Math.max(maxHostLength, host.length); + /** + * Prepare params + */ + const prepare: IconifyAPIPrepareQuery = ( + provider: string, + prefix: string, + icons: string[] + ): APIQueryParams[] => { + const results: APIQueryParams[] = []; + + // Get maximum icons list length + const cacheKey = provider + ':' + prefix; + let maxLength = maxLengthCache[cacheKey]; + if (maxLength === void 0) { + maxLength = calculateMaxLength(provider, prefix); + } + + // Split icons + let item: APIQueryParams = { + provider, + prefix, + icons: [], + }; + let length = 0; + icons.forEach((name, index) => { + length += name.length + 1; + if (length >= maxLength && index > 0) { + // Next set + results.push(item); + item = { + provider, + prefix, + icons: [], + }; + length = name.length; + } + + item.icons.push(name); }); + results.push(item); - // Make sure global is set - getGlobal(); + return results; + }; - // Extra width: prefix (3) + counter (4) - '{cb}' (4) - const extraLength = 3; + /** + * Load icons + */ + const send: IconifyAPISendQuery = ( + host: string, + params: APIQueryParams, + status: RedundancyPendingItem + ): void => { + const provider = params.provider; + const prefix = params.prefix; + const icons = params.icons; + const iconsList = icons.join(','); + const cacheKey = provider + ':' + prefix; - // Get available length - result = - config.maxURL - - maxHostLength - - config.path.length - + // Create callback prefix + const cbPrefix = prefix.split('-').shift().slice(0, 3); + + const global = getGlobal(); + + // Callback hash + let cbCounter = hash( + provider + ':' + host + ':' + prefix + ':' + iconsList + ); + while (global[cbPrefix + cbCounter] !== void 0) { + cbCounter++; + } + const callbackName = cbPrefix + cbCounter; + + let path = + pathCache[cacheKey] + endPoint .replace('{provider}', provider) .replace('{prefix}', prefix) - .replace('{icons}', '').length - - extraLength; - } + .replace('{icons}', iconsList) + .replace('{cb}', callbackName); - // Cache stuff and return result - const cacheKey = provider + ':' + prefix; - pathCache[cacheKey] = config.path; - maxLengthCache[cacheKey] = result; - return result; -} + global[callbackName] = (data: unknown): void => { + // Remove callback and complete query + delete global[callbackName]; + status.done(data); + }; -/** - * Prepare params - */ -export const prepareQuery: IconifyAPIPrepareQuery = ( - provider: string, - prefix: string, - icons: string[] -): APIQueryParams[] => { - const results: APIQueryParams[] = []; + // Create URI + const uri = host + path; + // console.log('API query:', uri); - // Get maximum icons list length - const cacheKey = provider + ':' + prefix; - let maxLength = maxLengthCache[cacheKey]; - if (maxLength === void 0) { - maxLength = calculateMaxLength(provider, prefix); - } - - // Split icons - let item: APIQueryParams = { - provider, - prefix, - icons: [], - }; - let length = 0; - icons.forEach((name, index) => { - length += name.length + 1; - if (length >= maxLength && index > 0) { - // Next set - results.push(item); - item = { - provider, - prefix, - icons: [], - }; - length = name.length; - } - - item.icons.push(name); - }); - results.push(item); - - return results; -}; - -/** - * Load icons - */ -export const sendQuery: IconifyAPISendQuery = ( - host: string, - params: APIQueryParams, - status: RedundancyPendingItem -): void => { - const provider = params.provider; - const prefix = params.prefix; - const icons = params.icons; - const iconsList = icons.join(','); - const cacheKey = provider + ':' + prefix; - - // Create callback prefix - const cbPrefix = prefix.split('-').shift().slice(0, 3); - - const global = getGlobal(); - - // Callback hash - let cbCounter = hash( - provider + ':' + host + ':' + prefix + ':' + iconsList - ); - while (global[cbPrefix + cbCounter] !== void 0) { - cbCounter++; - } - const callbackName = cbPrefix + cbCounter; - - let path = - pathCache[cacheKey] + - endPoint - .replace('{provider}', provider) - .replace('{prefix}', prefix) - .replace('{icons}', iconsList) - .replace('{cb}', callbackName); - - global[callbackName] = (data: unknown): void => { - // Remove callback and complete query - delete global[callbackName]; - status.done(data); + // Create script and append it to head + const script = document.createElement('script'); + script.type = 'text/javascript'; + script.async = true; + script.src = uri; + document.head.appendChild(script); }; - // Create URI - const uri = host + path; - // console.log('API query:', uri); - - // Create script and append it to head - const script = document.createElement('script'); - script.type = 'text/javascript'; - script.async = true; - script.src = uri; - document.head.appendChild(script); + // Return functions + return { + prepare, + send, + }; }; diff --git a/packages/react-demo/package-lock.json b/packages/react-demo/package-lock.json index ede4467..66546f1 100644 --- a/packages/react-demo/package-lock.json +++ b/packages/react-demo/package-lock.json @@ -1113,12 +1113,6 @@ "integrity": "sha512-CDvuWyr8BMbR24JGvaLZS9ORBey0cP/qEWN48CAM3jWXylqYIbTqb6s2Gw6dBNwFQfRv2lEvqqI7k2iSLNIWyw==", "dev": true }, - "@iconify/react": { - "version": "2.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/react/-/react-2.0.0-beta.1.tgz", - "integrity": "sha512-DPgVuX/wD0A10hCW870+A2JmKWG1xlOXnSWZVD6TUEJ501aAzjZnX2z1jP1WaLDKgMq+2ekETNd+VZC1s1HpYQ==", - "dev": true - }, "@jest/console": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", diff --git a/packages/react/package-lock.json b/packages/react/package-lock.json index 82ee0eb..c7580a4 100644 --- a/packages/react/package-lock.json +++ b/packages/react/package-lock.json @@ -3489,29 +3489,6 @@ "minimist": "^1.2.0" } }, - "@cyberalien/redundancy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@cyberalien/redundancy/-/redundancy-1.0.0.tgz", - "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==", - "dev": true - }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "dev": true, - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==", - "dev": true - }, "@istanbuljs/load-nyc-config": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", @@ -4580,16 +4557,6 @@ "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", "dev": true }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.5.10" - } - }, "babel-jest": { "version": "25.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-25.5.1.tgz", @@ -5644,35 +5611,6 @@ "locate-path": "^2.0.0" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "optional": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - } - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", diff --git a/packages/sapper-demo/package-lock.json b/packages/sapper-demo/package-lock.json index a09ecdf..60a2721 100644 --- a/packages/sapper-demo/package-lock.json +++ b/packages/sapper-demo/package-lock.json @@ -1909,23 +1909,6 @@ "to-fast-properties": "^2.0.0" } }, - "@cyberalien/redundancy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@cyberalien/redundancy/-/redundancy-1.0.0.tgz", - "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==", - "dev": true - }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "dev": true, - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, "@iconify/icons-bi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@iconify/icons-bi/-/icons-bi-1.0.2.tgz", @@ -1938,22 +1921,6 @@ "integrity": "sha512-pfX8y7zV8uqTDMQIc6jRy0F27Uqu/akh9nvbmjW1ql7OjMqqNGl0kjKqVz43YE/5+TB2EG7ZPez8ozAi7xYumA==", "dev": true }, - "@iconify/svelte": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@iconify/svelte/-/svelte-1.0.0-beta.3.tgz", - "integrity": "sha512-WxhYhseNhCoP85dbW1Qzq8o878wWvbkiMjVo8RSPoRPZnclqIqdPGLojKQhLODGS/tKMHr40ZD/rd28N9gxclA==", - "dev": true, - "requires": { - "@iconify/core": "^1.0.0-beta.0", - "@iconify/types": "^1.0.2" - } - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==", - "dev": true - }, "@polka/url": { "version": "1.0.0-next.11", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.11.tgz", @@ -2051,16 +2018,6 @@ "color-convert": "^1.9.0" } }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.5.10" - } - }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -2355,28 +2312,6 @@ "locate-path": "^2.0.0" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "optional": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", diff --git a/packages/svelte-demo/package-lock.json b/packages/svelte-demo/package-lock.json index a0dfa4b..d936030 100644 --- a/packages/svelte-demo/package-lock.json +++ b/packages/svelte-demo/package-lock.json @@ -30,23 +30,6 @@ "js-tokens": "^4.0.0" } }, - "@cyberalien/redundancy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@cyberalien/redundancy/-/redundancy-1.0.0.tgz", - "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==", - "dev": true - }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "dev": true, - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, "@iconify/icons-bx": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@iconify/icons-bx/-/icons-bx-1.0.3.tgz", @@ -59,22 +42,6 @@ "integrity": "sha512-CfQWREZQGa1ebXKwUXlCgWGBPgxAcOeyRumdzUfkxoCK57Ha0DdL9A60kI0T23ir1X3z5eCbbQKx8i2juSaRYA==", "dev": true }, - "@iconify/svelte": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@iconify/svelte/-/svelte-1.0.0-beta.3.tgz", - "integrity": "sha512-WxhYhseNhCoP85dbW1Qzq8o878wWvbkiMjVo8RSPoRPZnclqIqdPGLojKQhLODGS/tKMHr40ZD/rd28N9gxclA==", - "dev": true, - "requires": { - "@iconify/core": "^1.0.0-beta.0", - "@iconify/types": "^1.0.2" - } - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==", - "dev": true - }, "@polka/url": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", @@ -169,16 +136,6 @@ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "dev": true }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.5.10" - } - }, "binary-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", @@ -259,16 +216,6 @@ "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==" }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -290,16 +237,6 @@ "to-regex-range": "^5.0.1" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "optional": true, - "requires": { - "debug": "=3.1.0" - } - }, "fsevents": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", @@ -462,13 +399,6 @@ "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==" }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", diff --git a/packages/svelte/package-lock.json b/packages/svelte/package-lock.json index af2f726..2854f3a 100644 --- a/packages/svelte/package-lock.json +++ b/packages/svelte/package-lock.json @@ -4,26 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@cyberalien/redundancy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@cyberalien/redundancy/-/redundancy-1.0.0.tgz", - "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==" - }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==" - }, "@rollup/plugin-commonjs": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz", @@ -84,15 +64,6 @@ "@types/node": "*" } }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "optional": true, - "requires": { - "follow-redirects": "1.5.10" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -136,15 +107,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, "estree-walker": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", @@ -160,15 +122,6 @@ "to-regex-range": "^5.0.1" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "optional": true, - "requires": { - "debug": "=3.1.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -261,12 +214,6 @@ "brace-expansion": "^1.1.7" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "optional": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", diff --git a/packages/vue-demo/package-lock.json b/packages/vue-demo/package-lock.json index db64364..1344634 100644 --- a/packages/vue-demo/package-lock.json +++ b/packages/vue-demo/package-lock.json @@ -1064,12 +1064,6 @@ "integrity": "sha512-CfQWREZQGa1ebXKwUXlCgWGBPgxAcOeyRumdzUfkxoCK57Ha0DdL9A60kI0T23ir1X3z5eCbbQKx8i2juSaRYA==", "dev": true }, - "@iconify/vue": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@iconify/vue/-/vue-1.0.1.tgz", - "integrity": "sha512-zMbkznq98AZ3gP7XrJhnrSYNgxQVVXC02mEqHJ5OkyiPT7u+SGdHtBy3Xyyhdjx/VMbequ6pO6Az/I6HNcyaVg==", - "dev": true - }, "@intervolga/optimize-cssnano-plugin": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@intervolga/optimize-cssnano-plugin/-/optimize-cssnano-plugin-1.0.6.tgz", diff --git a/packages/vue/package-lock.json b/packages/vue/package-lock.json index cd61e61..9c290d8 100644 --- a/packages/vue/package-lock.json +++ b/packages/vue/package-lock.json @@ -578,29 +578,6 @@ "minimist": "^1.2.0" } }, - "@cyberalien/redundancy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@cyberalien/redundancy/-/redundancy-1.0.0.tgz", - "integrity": "sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==", - "dev": true - }, - "@iconify/core": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.0.0-beta.1.tgz", - "integrity": "sha512-itIEF56rTmhiVSjElMlJY81D0wdXX7PBuPQglmy9y6VltjEZ/BT763HVCEySIhRni9Ae+CwoJXXTCDHs+TCtTQ==", - "dev": true, - "requires": { - "@cyberalien/redundancy": "^1.0.0", - "@iconify/types": "^1.0.2", - "axios": "^0.19.2" - } - }, - "@iconify/types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.2.tgz", - "integrity": "sha512-wl+cucwbbt3uVZQBQUbSN1buat03bv+orTVvkeDEq6K6hS7RB01Wc/6veDAQbDiAPxNBLi0+34TkTv82Fjm4dg==", - "dev": true - }, "@istanbuljs/load-nyc-config": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", @@ -1945,16 +1922,6 @@ "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", "dev": true }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.5.10" - } - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -3810,35 +3777,6 @@ "path-exists": "^4.0.0" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "optional": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - } - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",