@iconify/tools 2.1.2 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/colors/attribs.cjs +0 -2
- package/lib/colors/detect.cjs +0 -2
- package/lib/colors/parse.cjs +0 -2
- package/lib/colors/validate.cjs +0 -2
- package/lib/css/parse.cjs +0 -2
- package/lib/css/parser/error.cjs +0 -2
- package/lib/css/parser/export.cjs +0 -2
- package/lib/css/parser/strings.cjs +0 -2
- package/lib/css/parser/text.cjs +0 -2
- package/lib/css/parser/tokens.cjs +0 -2
- package/lib/css/parser/tree.cjs +0 -2
- package/lib/download/api/cache.cjs +0 -2
- package/lib/download/api/download.cjs +1 -7
- package/lib/download/api/index.cjs +1 -7
- package/lib/download/git/branch.cjs +0 -2
- package/lib/download/git/hash.cjs +0 -2
- package/lib/download/git/index.cjs +0 -2
- package/lib/download/git/reset.cjs +0 -2
- package/lib/download/github/hash.cjs +0 -2
- package/lib/download/github/index.cjs +0 -2
- package/lib/download/gitlab/hash.cjs +0 -2
- package/lib/download/gitlab/index.cjs +0 -2
- package/lib/download/gitlab/types.cjs +0 -2
- package/lib/download/helpers/untar.cjs +0 -2
- package/lib/download/helpers/unzip.cjs +1 -7
- package/lib/download/index.cjs +0 -2
- package/lib/download/npm/index.cjs +0 -2
- package/lib/download/npm/version.cjs +0 -2
- package/lib/export/directory.cjs +0 -2
- package/lib/export/helpers/custom-files.cjs +0 -2
- package/lib/export/helpers/prepare.cjs +0 -2
- package/lib/export/helpers/types-version.cjs +0 -2
- package/lib/export/icon-package.cjs +0 -2
- package/lib/export/json-package.cjs +0 -2
- package/lib/icon-set/index.cjs +0 -2
- package/lib/icon-set/match.cjs +0 -2
- package/lib/icon-set/merge.cjs +0 -2
- package/lib/icon-set/modified.cjs +0 -2
- package/lib/icon-set/props.cjs +0 -2
- package/lib/icon-set/tags.cjs +0 -2
- package/lib/import/directory.cjs +0 -2
- package/lib/import/figma/index.cjs +0 -2
- package/lib/import/figma/nodes.cjs +0 -2
- package/lib/import/figma/query.cjs +0 -2
- package/lib/index.cjs +0 -2
- package/lib/misc/bump-version.cjs +0 -2
- package/lib/misc/compare-dirs.cjs +0 -2
- package/lib/misc/exec.cjs +0 -2
- package/lib/misc/keyword.cjs +0 -2
- package/lib/misc/scan.cjs +0 -2
- package/lib/misc/write-json.cjs +0 -2
- package/lib/optimise/flags.cjs +0 -2
- package/lib/optimise/global-style.cjs +0 -2
- package/lib/optimise/scale.cjs +0 -2
- package/lib/optimise/svgo.cjs +1 -3
- package/lib/optimise/svgo.d.ts +3 -3
- package/lib/optimise/svgo.mjs +1 -1
- package/lib/svg/analyse/error.cjs +0 -2
- package/lib/svg/analyse.cjs +0 -2
- package/lib/svg/cleanup/attribs.cjs +0 -2
- package/lib/svg/cleanup/bad-tags.cjs +0 -2
- package/lib/svg/cleanup/inline-style.cjs +0 -2
- package/lib/svg/cleanup/root-style.cjs +0 -2
- package/lib/svg/cleanup/root-svg.cjs +0 -2
- package/lib/svg/cleanup/svgo-style.cjs +0 -2
- package/lib/svg/cleanup.cjs +0 -2
- package/lib/svg/data/attributes.cjs +0 -2
- package/lib/svg/data/tags.cjs +0 -2
- package/lib/svg/index.cjs +1 -7
- package/lib/svg/parse-style.cjs +0 -2
- package/lib/svg/parse.cjs +0 -2
- package/license.txt +0 -0
- package/package.json +533 -516
package/lib/colors/attribs.cjs
CHANGED
package/lib/colors/detect.cjs
CHANGED
package/lib/colors/parse.cjs
CHANGED
package/lib/colors/validate.cjs
CHANGED
package/lib/css/parse.cjs
CHANGED
package/lib/css/parser/error.cjs
CHANGED
package/lib/css/parser/text.cjs
CHANGED
package/lib/css/parser/tree.cjs
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const fetch = require('node-fetch');
|
|
6
4
|
const util = require('util');
|
|
7
5
|
const stream = require('stream');
|
|
8
6
|
const fs = require('fs');
|
|
9
7
|
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
11
|
-
|
|
12
|
-
const fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
|
|
13
|
-
|
|
14
8
|
const streamPipeline = util.promisify(stream.pipeline);
|
|
15
9
|
async function downloadFile(query, target) {
|
|
16
10
|
const params = query.params ? query.params.toString() : "";
|
|
17
11
|
const url = query.uri + (params ? "?" + params : "");
|
|
18
12
|
const headers = query.headers;
|
|
19
|
-
const response = await
|
|
13
|
+
const response = await fetch(url, {
|
|
20
14
|
headers
|
|
21
15
|
});
|
|
22
16
|
if (!response.ok || !response.body) {
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const fetch = require('node-fetch');
|
|
6
4
|
const download_api_cache = require('./cache.cjs');
|
|
7
5
|
require('fs');
|
|
8
6
|
require('crypto');
|
|
9
7
|
require('../../misc/scan.cjs');
|
|
10
8
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
12
|
-
|
|
13
|
-
const fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
|
|
14
|
-
|
|
15
9
|
async function sendAPIQuery(query, cache) {
|
|
16
10
|
const cacheKey = cache ? download_api_cache.apiCacheKey(query) : "";
|
|
17
11
|
if (cache) {
|
|
@@ -36,7 +30,7 @@ async function sendQuery(query) {
|
|
|
36
30
|
console.log("Fetch:", url);
|
|
37
31
|
const headers = query.headers;
|
|
38
32
|
try {
|
|
39
|
-
const response = await
|
|
33
|
+
const response = await fetch(url, {
|
|
40
34
|
headers
|
|
41
35
|
});
|
|
42
36
|
if (response.status >= 400) {
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const extract = require('extract-zip');
|
|
6
4
|
const fs = require('fs');
|
|
7
5
|
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
9
|
-
|
|
10
|
-
const extract__default = /*#__PURE__*/_interopDefaultLegacy(extract);
|
|
11
|
-
|
|
12
6
|
async function unzip(source, path) {
|
|
13
7
|
const dir = await fs.promises.realpath(path);
|
|
14
|
-
await
|
|
8
|
+
await extract(source, {
|
|
15
9
|
dir
|
|
16
10
|
});
|
|
17
11
|
}
|
package/lib/download/index.cjs
CHANGED
package/lib/export/directory.cjs
CHANGED
package/lib/icon-set/index.cjs
CHANGED
package/lib/icon-set/match.cjs
CHANGED
package/lib/icon-set/merge.cjs
CHANGED
package/lib/icon-set/props.cjs
CHANGED
package/lib/icon-set/tags.cjs
CHANGED
package/lib/import/directory.cjs
CHANGED
package/lib/index.cjs
CHANGED
package/lib/misc/exec.cjs
CHANGED
package/lib/misc/keyword.cjs
CHANGED
package/lib/misc/scan.cjs
CHANGED
package/lib/misc/write-json.cjs
CHANGED
package/lib/optimise/flags.cjs
CHANGED
package/lib/optimise/scale.cjs
CHANGED
package/lib/optimise/svgo.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const svgo = require('svgo');
|
|
6
4
|
|
|
7
5
|
function getSVGOPlugins(options) {
|
|
@@ -48,7 +46,7 @@ function getSVGOPlugins(options) {
|
|
|
48
46
|
],
|
|
49
47
|
...options.cleanupIDs !== false ? [
|
|
50
48
|
{
|
|
51
|
-
name: "
|
|
49
|
+
name: "cleanupIds",
|
|
52
50
|
params: {
|
|
53
51
|
prefix: typeof options.cleanupIDs === "string" ? options.cleanupIDs : "svgID"
|
|
54
52
|
}
|
package/lib/optimise/svgo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PluginConfig } from 'svgo';
|
|
2
2
|
import { SVG } from '../svg/index.js';
|
|
3
3
|
import '@iconify/types';
|
|
4
4
|
import '@iconify/utils/lib/customisations/defaults';
|
|
@@ -13,7 +13,7 @@ interface GetSVGOPluingOptions extends CleanupIDsOption {
|
|
|
13
13
|
/**
|
|
14
14
|
* Get list of plugins
|
|
15
15
|
*/
|
|
16
|
-
declare function getSVGOPlugins(options: GetSVGOPluingOptions):
|
|
16
|
+
declare function getSVGOPlugins(options: GetSVGOPluingOptions): PluginConfig[];
|
|
17
17
|
/**
|
|
18
18
|
* Options
|
|
19
19
|
*/
|
|
@@ -21,7 +21,7 @@ interface SVGOCommonOptions {
|
|
|
21
21
|
multipass?: boolean;
|
|
22
22
|
}
|
|
23
23
|
interface SVGOOptionsWithPlugin extends SVGOCommonOptions {
|
|
24
|
-
plugins:
|
|
24
|
+
plugins: PluginConfig[];
|
|
25
25
|
}
|
|
26
26
|
interface SVGOptionsWithoutPlugin extends SVGOCommonOptions, CleanupIDsOption {
|
|
27
27
|
plugins?: undefined;
|
package/lib/optimise/svgo.mjs
CHANGED
package/lib/svg/analyse.cjs
CHANGED