diff --git a/.eslintrc.json b/.eslintrc.json index 7ecc6622d..34072651d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,7 @@ }, "sourceType": "module" }, - "extends": ["eslint:recommended", "prettier"], + "extends": ["eslint:recommended", "prettier", "plugin:import/recommended"], "rules": { "semi": ["error", "always"], "no-var": "error", @@ -20,6 +20,17 @@ "no-constant-condition": ["error", { "checkLoops": false }], "no-mixed-spaces-and-tabs": ["error", "smart-tabs"], "no-unused-vars": ["off"], - "complexity": ["warn", 16] + "complexity": ["warn", 16], + + "import/newline-after-import": ["error", { "count": 1 }], + "import/no-unresolved": "off", + "import/order": [ + "error", + { + "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], + "newlines-between": "always", + "alphabetize": { "order": "asc", "caseInsensitive": true } + } + ] } } diff --git a/font-src/gen/build-font.mjs b/font-src/gen/build-font.mjs index e275a0a9a..3778e9d8e 100644 --- a/font-src/gen/build-font.mjs +++ b/font-src/gen/build-font.mjs @@ -1,11 +1,13 @@ -import { CreateEmptyFont } from "./empty-font.mjs"; import { buildGlyphs } from "../glyphs/index.mjs"; +import { copyFontMetrics } from "../meta/aesthetics.mjs"; +import { assignFontNames } from "../meta/naming.mjs"; +import { buildOtl } from "../otl/index.mjs"; + +import * as Caching from "./caching/index.mjs"; +import { CreateEmptyFont } from "./empty-font.mjs"; import { finalizeFont } from "./finalize/index.mjs"; import { convertOtd } from "./otd-conv/index.mjs"; -import * as Caching from "./caching/index.mjs"; -import { buildOtl } from "../otl/index.mjs"; -import { assignFontNames } from "../meta/naming.mjs"; -import { copyFontMetrics } from "../meta/aesthetics.mjs"; + ("use strict"); export async function buildFont(argv, para) { const gs = buildGlyphs(para); diff --git a/font-src/gen/caching/index.mjs b/font-src/gen/caching/index.mjs index 0d8b75ea3..c3642bf71 100644 --- a/font-src/gen/caching/index.mjs +++ b/font-src/gen/caching/index.mjs @@ -1,5 +1,6 @@ import fs from "fs"; import zlib from "zlib"; + import { encode, decode } from "@msgpack/msgpack"; const Edition = 20; @@ -75,8 +76,13 @@ class Cache { export const load = async function (path, version, freshAgeKey) { let cache = new Cache(freshAgeKey); if (path && fs.existsSync(path)) { - const buf = zlib.gunzipSync(await fs.promises.readFile(path)); - cache.loadRep(version, decode(buf)); + try { + const buf = zlib.gunzipSync(await fs.promises.readFile(path)); + cache.loadRep(version, decode(buf)); + } catch (e) { + console.error("Error loading cache. Treat as empty."); + console.error(e); + } } return cache; }; diff --git a/font-src/gen/finalize/glyphs.mjs b/font-src/gen/finalize/glyphs.mjs index a915baa0b..c53cfd102 100644 --- a/font-src/gen/finalize/glyphs.mjs +++ b/font-src/gen/finalize/glyphs.mjs @@ -1,8 +1,9 @@ import * as TypoGeom from "typo-geom"; + +import * as CurveUtil from "../../support/geometry/curve-util.mjs"; import * as Geom from "../../support/geometry/index.mjs"; import { Point } from "../../support/geometry/point.mjs"; import { Transform } from "../../support/geometry/transform.mjs"; -import * as CurveUtil from "../../support/geometry/curve-util.mjs"; /////////////////////////////////////////////////////////////////////////////////////////////////// function regulateGlyphStore(cache, skew, glyphStore) { diff --git a/font-src/gen/finalize/index.mjs b/font-src/gen/finalize/index.mjs index 1adbf5818..cfd10d3b2 100644 --- a/font-src/gen/finalize/index.mjs +++ b/font-src/gen/finalize/index.mjs @@ -1,7 +1,8 @@ -import { finalizeGlyphs } from "./glyphs.mjs"; -import { gcFont } from "./gc.mjs"; import { Nwid, Wwid } from "../../support/gr.mjs"; +import { gcFont } from "./gc.mjs"; +import { finalizeGlyphs } from "./glyphs.mjs"; + function assignGrAndCodeRank(glyphStore, ...flatteners) { for (const g of glyphStore.glyphs()) { g.codeRank = 0xffffffff; diff --git a/font-src/gen/otd-conv/glyph-name.mjs b/font-src/gen/otd-conv/glyph-name.mjs index 3b19902ce..689d8453a 100644 --- a/font-src/gen/otd-conv/glyph-name.mjs +++ b/font-src/gen/otd-conv/glyph-name.mjs @@ -1,4 +1,5 @@ import { Joining, AnyCv, TieMark, Nwid, Wwid } from "../../support/gr.mjs"; + const ApplePostNames = new Map([ /* spell-checker: disable */ [0xd, "nonmarkingreturn"], diff --git a/font-src/gen/otd-conv/glyphs.mjs b/font-src/gen/otd-conv/glyphs.mjs index 3cdf90007..ceeb994fb 100644 --- a/font-src/gen/otd-conv/glyphs.mjs +++ b/font-src/gen/otd-conv/glyphs.mjs @@ -1,7 +1,10 @@ import { Ot } from "ot-builder"; + import { Point } from "../../support/geometry/point.mjs"; import * as Gr from "../../support/gr.mjs"; + import { byCode, bySpacing, byGr, byBuildOrder } from "./glyph-name.mjs"; + function byRank([gna, a], [gnb, b]) { return ( b.glyphRank - a.glyphRank || diff --git a/font-src/gen/otd-conv/index.mjs b/font-src/gen/otd-conv/index.mjs index 980b29ac4..1a226eb68 100644 --- a/font-src/gen/otd-conv/index.mjs +++ b/font-src/gen/otd-conv/index.mjs @@ -1,5 +1,6 @@ import { convertGlyphs } from "./glyphs.mjs"; import { convertGsub, convertGpos, convertGdef } from "./layout.mjs"; + export function convertOtd(baseFont, otl, gs) { const { glyphs, cmap } = convertGlyphs(gs); const gsub = convertGsub(otl.GSUB, glyphs); diff --git a/font-src/gen/otd-conv/layout.mjs b/font-src/gen/otd-conv/layout.mjs index b5c09ded8..5282d0100 100644 --- a/font-src/gen/otd-conv/layout.mjs +++ b/font-src/gen/otd-conv/layout.mjs @@ -1,339 +1,311 @@ -import { Ot } from "ot-builder"; -class LookupStore { - constructor(handlers, glyphs) { - this.glyphs = glyphs; - this.m_handlers = handlers; - this.m_mapping = new Map(); - } - extract() { - return Array.from(this.m_mapping.values()); - } - query(id) { - return this.m_mapping.get(id); - } - declare(id, otdLookup) { - if (this.m_mapping.has(id)) - return; - const handler = this.m_handlers[otdLookup.type]; - if (!handler) - return; - this.m_mapping.set(id, handler.init()); - } - fill(id, otdLookup) { - const dst = this.query(id); - const handler = this.m_handlers[otdLookup.type]; - if (!dst || !handler) - return; - if (otdLookup.subtables) - throw new Error("Unreachable."); - handler.fill(dst, otdLookup, this); - } -} -const GsubSingleHandler = { - init() { - return new Ot.Gsub.Single(); - }, - fill(dst, src, store) { - const st = src.substitutions; - for (const k in st) { - const from = store.glyphs.queryByName(k); - const to = store.glyphs.queryByName(st[k]); - if (from && to) - dst.mapping.set(from, to); - } - } -}; -const GsubMultipleHandler = { - init() { - return new Ot.Gsub.Multiple(); - }, - fill(dst, src, store) { - const st = src.substitutions; - for (const k in st) { - const from = store.glyphs.queryByName(k); - const to = mapGlyphListAll(st[k], store); - if (!from || !to) - continue; - dst.mapping.set(from, to); - } - } -}; -const GsubAlternateHandler = { - init() { - return new Ot.Gsub.Alternate(); - }, - fill: GsubMultipleHandler.fill -}; -const GsubLigatureHandler = { - init() { - return new Ot.Gsub.Ligature(); - }, - fill(dst, src, store) { - const st = src.substitutions; - for (const { from: _from, to: _to } of st) { - const to = store.glyphs.queryByName(_to); - const from = mapGlyphListAll(_from, store); - if (!from || !to) - continue; - dst.mapping.push({ from, to }); - } - } -}; -const GsubChainingHandler = { - init() { - return new Ot.Gsub.Chaining(); - }, - fill(dst, src, store) { - out: for (const st of src.rules) { - const match = []; - for (const m of st.match) { - const m1 = mapGlyphListSome(m, store); - if (!m1) - continue out; - match.push(new Set(m1)); - } - const inputBegins = st.inputBegins; - const inputEnds = st.inputEnds; - const applications = []; - for (const ap of st.apply) { - const lookup = store.query(ap.lookup); - if (!lookup) - continue out; - applications.push({ at: ap.at - inputBegins, apply: lookup }); - } - dst.rules.push({ match, inputBegins, inputEnds, applications }); - } - } -}; -const GsubReverseHandler = { - init() { - return new Ot.Gsub.ReverseSub(); - }, - fill(dst, src, store) { - out: for (const st of src.rules) { - const match = []; - const doSubAt = st.inputIndex; - const replacement = new Map(); - for (let j = 0; j < st.match.length; j++) { - { - const m1 = new Set(); - for (let k = 0; k < st.match[j].length; k++) { - const gFrom = store.glyphs.queryByName(st.match[j][k]); - if (gFrom) - m1.add(gFrom); - } - if (!m1.size) - continue out; - match.push(m1); - } - if (j === doSubAt) { - for (let k = 0; k < st.match[j].length; k++) { - const gFrom = store.glyphs.queryByName(st.match[j][k]); - const gTo = store.glyphs.queryByName(st.to[k]); - if (!gFrom) - continue; - if (gTo) { - replacement.set(gFrom, gTo); - } - else { - replacement.set(gFrom, gFrom); - } - } - } - } - dst.rules.push({ match, doSubAt, replacement }); - } - } -}; -function mapGlyphListAll(gl, store) { - const out = []; - for (const item of gl) { - const fg = store.glyphs.queryByName(item); - if (!fg) - return null; - out.push(fg); - } - return out; -} -function mapGlyphListSome(gl, store) { - const out = []; - for (const item of gl) { - const fg = store.glyphs.queryByName(item); - if (!fg) - continue; - out.push(fg); - } - if (!out.length) - return null; - return out; -} -const GsubHandlers = { - gsub_single: GsubSingleHandler, - gsub_multiple: GsubMultipleHandler, - gsub_alternate: GsubAlternateHandler, - gsub_ligature: GsubLigatureHandler, - gsub_chaining: GsubChainingHandler, - gsub_reverse: GsubReverseHandler -}; -const GposMarkToBaseHandler = { - init() { - return new Ot.Gpos.MarkToBase(); - }, - fill(dst, src, store) { - const mm = collectClassMap(src.marks); - dst.marks = convertMarkRecords(src.marks, mm, store); - dst.bases = convertBaseRecords(src.bases, mm, store); - } -}; -const GposMarkToMarkHandler = { - init() { - return new Ot.Gpos.MarkToMark(); - }, - fill(dst, src, store) { - const mm = collectClassMap(src.marks); - dst.marks = convertMarkRecords(src.marks, mm, store); - dst.baseMarks = convertBaseRecords(src.bases, mm, store); - } -}; -function collectClassMap(marks) { - let n = 0; - const m = new Map(); - for (const gn in marks) { - const mark = marks[gn]; - if (!m.has(mark.class)) { - m.set(mark.class, n); - n++; - } - } - return m; -} -function convertMarkRecords(marks, mm, store) { - const out = new Map(); - for (const gn in marks) { - const mark = marks[gn]; - const g = store.glyphs.queryByName(gn); - if (!g) - continue; - let markAnchors = []; - markAnchors[mm.get(mark.class)] = { x: mark.x, y: mark.y }; - out.set(g, { markAnchors: markAnchors }); - } - return out; -} -function convertBaseRecords(bases, mm, store) { - const out = new Map(); - for (const gn in bases) { - const baseObj = bases[gn]; - const g = store.glyphs.queryByName(gn); - if (!g) - continue; - const baseArray = []; - for (const bkStr in baseObj) { - baseArray[mm.get(bkStr)] = baseObj[bkStr]; - } - out.set(g, { baseAnchors: baseArray }); - } - return out; -} -const GposHandlers = { - gpos_mark_to_base: GposMarkToBaseHandler, - gpos_mark_to_mark: GposMarkToMarkHandler -}; -class FeatureStore { - constructor(lookups) { - this.lookupStore = lookups; - this.m_mapping = new Map(); - } - extract() { - return Array.from(this.m_mapping.values()); - } - query(id) { - return this.m_mapping.get(id); - } - fill(id, data) { - const tag = id.slice(0, 4); - const lookups = []; - for (const lid of data) { - const lookup = this.lookupStore.query(lid); - if (lookup) - lookups.push(lookup); - } - this.m_mapping.set(id, { tag, lookups }); - } -} -class ScriptLanguageStore { - constructor(features) { - this.featureStore = features; - this.m_scriptMapping = new Map(); - } - extract() { - return this.m_scriptMapping; - } - fill(id, data) { - const scriptTag = id.slice(0, 4); - const languageTag = id.slice(5, 9).padEnd(4); - let sr = this.m_scriptMapping.get(scriptTag); - if (!sr) { - sr = { defaultLanguage: null, languages: new Map() }; - this.m_scriptMapping.set(scriptTag, sr); - } - const lr = this.createLanguageRecord(data); - if (languageTag === "dflt" || languageTag === "DFLT") - sr.defaultLanguage = lr; - else - sr.languages.set(languageTag, lr); - } - createLanguageRecord(data) { - const features = []; - for (const fid of data.features) { - const feature = this.featureStore.query(fid); - if (feature) - features.push(feature); - } - return { - requiredFeature: this.featureStore.query(data.requiredFeature) || null, - features: features - }; - } -} -function ConvertGsubGposT(handlers, T) { - return function (table, glyphs) { - if (!table) - return null; - const ls = new LookupStore(handlers, glyphs); - if (table.lookups) { - if (table.lookupOrder) { - for (const l of table.lookupOrder) - ls.declare(l, table.lookups[l]); - } - for (const l in table.lookups) - ls.declare(l, table.lookups[l]); - for (const l in table.lookups) - ls.fill(l, table.lookups[l]); - } - const fs = new FeatureStore(ls); - if (table.features) { - for (const f in table.features) - fs.fill(f, table.features[f]); - } - const ss = new ScriptLanguageStore(fs); - if (table.languages) { - for (const sl in table.languages) - ss.fill(sl, table.languages[sl]); - } - return new T(ss.extract(), fs.extract(), ls.extract()); - }; -} -function convertGdef(otdGdef, glyphs) { - const gdef = new Ot.Gdef.Table(); - gdef.glyphClassDef = new Map(); - for (const gn in otdGdef.glyphClassDef) { - const g = glyphs.queryByName(gn); - if (g) - gdef.glyphClassDef.set(g, otdGdef.glyphClassDef[gn]); - } - return gdef; -} -export const convertGsub = ConvertGsubGposT(GsubHandlers, Ot.Gsub.Table); -export const convertGpos = ConvertGsubGposT(GposHandlers, Ot.Gpos.Table); -export { convertGdef }; +import { Ot } from "ot-builder"; + +class LookupStore { + constructor(handlers, glyphs) { + this.glyphs = glyphs; + this.m_handlers = handlers; + this.m_mapping = new Map(); + } + extract() { + return Array.from(this.m_mapping.values()); + } + query(id) { + return this.m_mapping.get(id); + } + declare(id, otdLookup) { + if (this.m_mapping.has(id)) return; + const handler = this.m_handlers[otdLookup.type]; + if (!handler) return; + this.m_mapping.set(id, handler.init()); + } + fill(id, otdLookup) { + const dst = this.query(id); + const handler = this.m_handlers[otdLookup.type]; + if (!dst || !handler) return; + if (otdLookup.subtables) throw new Error("Unreachable."); + handler.fill(dst, otdLookup, this); + } +} +const GsubSingleHandler = { + init() { + return new Ot.Gsub.Single(); + }, + fill(dst, src, store) { + const st = src.substitutions; + for (const k in st) { + const from = store.glyphs.queryByName(k); + const to = store.glyphs.queryByName(st[k]); + if (from && to) dst.mapping.set(from, to); + } + } +}; +const GsubMultipleHandler = { + init() { + return new Ot.Gsub.Multiple(); + }, + fill(dst, src, store) { + const st = src.substitutions; + for (const k in st) { + const from = store.glyphs.queryByName(k); + const to = mapGlyphListAll(st[k], store); + if (!from || !to) continue; + dst.mapping.set(from, to); + } + } +}; +const GsubAlternateHandler = { + init() { + return new Ot.Gsub.Alternate(); + }, + fill: GsubMultipleHandler.fill +}; +const GsubLigatureHandler = { + init() { + return new Ot.Gsub.Ligature(); + }, + fill(dst, src, store) { + const st = src.substitutions; + for (const { from: _from, to: _to } of st) { + const to = store.glyphs.queryByName(_to); + const from = mapGlyphListAll(_from, store); + if (!from || !to) continue; + dst.mapping.push({ from, to }); + } + } +}; +const GsubChainingHandler = { + init() { + return new Ot.Gsub.Chaining(); + }, + fill(dst, src, store) { + out: for (const st of src.rules) { + const match = []; + for (const m of st.match) { + const m1 = mapGlyphListSome(m, store); + if (!m1) continue out; + match.push(new Set(m1)); + } + const inputBegins = st.inputBegins; + const inputEnds = st.inputEnds; + const applications = []; + for (const ap of st.apply) { + const lookup = store.query(ap.lookup); + if (!lookup) continue out; + applications.push({ at: ap.at - inputBegins, apply: lookup }); + } + dst.rules.push({ match, inputBegins, inputEnds, applications }); + } + } +}; +const GsubReverseHandler = { + init() { + return new Ot.Gsub.ReverseSub(); + }, + fill(dst, src, store) { + out: for (const st of src.rules) { + const match = []; + const doSubAt = st.inputIndex; + const replacement = new Map(); + for (let j = 0; j < st.match.length; j++) { + { + const m1 = new Set(); + for (let k = 0; k < st.match[j].length; k++) { + const gFrom = store.glyphs.queryByName(st.match[j][k]); + if (gFrom) m1.add(gFrom); + } + if (!m1.size) continue out; + match.push(m1); + } + if (j === doSubAt) { + for (let k = 0; k < st.match[j].length; k++) { + const gFrom = store.glyphs.queryByName(st.match[j][k]); + const gTo = store.glyphs.queryByName(st.to[k]); + if (!gFrom) continue; + if (gTo) { + replacement.set(gFrom, gTo); + } else { + replacement.set(gFrom, gFrom); + } + } + } + } + dst.rules.push({ match, doSubAt, replacement }); + } + } +}; +function mapGlyphListAll(gl, store) { + const out = []; + for (const item of gl) { + const fg = store.glyphs.queryByName(item); + if (!fg) return null; + out.push(fg); + } + return out; +} +function mapGlyphListSome(gl, store) { + const out = []; + for (const item of gl) { + const fg = store.glyphs.queryByName(item); + if (!fg) continue; + out.push(fg); + } + if (!out.length) return null; + return out; +} +const GsubHandlers = { + gsub_single: GsubSingleHandler, + gsub_multiple: GsubMultipleHandler, + gsub_alternate: GsubAlternateHandler, + gsub_ligature: GsubLigatureHandler, + gsub_chaining: GsubChainingHandler, + gsub_reverse: GsubReverseHandler +}; +const GposMarkToBaseHandler = { + init() { + return new Ot.Gpos.MarkToBase(); + }, + fill(dst, src, store) { + const mm = collectClassMap(src.marks); + dst.marks = convertMarkRecords(src.marks, mm, store); + dst.bases = convertBaseRecords(src.bases, mm, store); + } +}; +const GposMarkToMarkHandler = { + init() { + return new Ot.Gpos.MarkToMark(); + }, + fill(dst, src, store) { + const mm = collectClassMap(src.marks); + dst.marks = convertMarkRecords(src.marks, mm, store); + dst.baseMarks = convertBaseRecords(src.bases, mm, store); + } +}; +function collectClassMap(marks) { + let n = 0; + const m = new Map(); + for (const gn in marks) { + const mark = marks[gn]; + if (!m.has(mark.class)) { + m.set(mark.class, n); + n++; + } + } + return m; +} +function convertMarkRecords(marks, mm, store) { + const out = new Map(); + for (const gn in marks) { + const mark = marks[gn]; + const g = store.glyphs.queryByName(gn); + if (!g) continue; + let markAnchors = []; + markAnchors[mm.get(mark.class)] = { x: mark.x, y: mark.y }; + out.set(g, { markAnchors: markAnchors }); + } + return out; +} +function convertBaseRecords(bases, mm, store) { + const out = new Map(); + for (const gn in bases) { + const baseObj = bases[gn]; + const g = store.glyphs.queryByName(gn); + if (!g) continue; + const baseArray = []; + for (const bkStr in baseObj) { + baseArray[mm.get(bkStr)] = baseObj[bkStr]; + } + out.set(g, { baseAnchors: baseArray }); + } + return out; +} +const GposHandlers = { + gpos_mark_to_base: GposMarkToBaseHandler, + gpos_mark_to_mark: GposMarkToMarkHandler +}; +class FeatureStore { + constructor(lookups) { + this.lookupStore = lookups; + this.m_mapping = new Map(); + } + extract() { + return Array.from(this.m_mapping.values()); + } + query(id) { + return this.m_mapping.get(id); + } + fill(id, data) { + const tag = id.slice(0, 4); + const lookups = []; + for (const lid of data) { + const lookup = this.lookupStore.query(lid); + if (lookup) lookups.push(lookup); + } + this.m_mapping.set(id, { tag, lookups }); + } +} +class ScriptLanguageStore { + constructor(features) { + this.featureStore = features; + this.m_scriptMapping = new Map(); + } + extract() { + return this.m_scriptMapping; + } + fill(id, data) { + const scriptTag = id.slice(0, 4); + const languageTag = id.slice(5, 9).padEnd(4); + let sr = this.m_scriptMapping.get(scriptTag); + if (!sr) { + sr = { defaultLanguage: null, languages: new Map() }; + this.m_scriptMapping.set(scriptTag, sr); + } + const lr = this.createLanguageRecord(data); + if (languageTag === "dflt" || languageTag === "DFLT") sr.defaultLanguage = lr; + else sr.languages.set(languageTag, lr); + } + createLanguageRecord(data) { + const features = []; + for (const fid of data.features) { + const feature = this.featureStore.query(fid); + if (feature) features.push(feature); + } + return { + requiredFeature: this.featureStore.query(data.requiredFeature) || null, + features: features + }; + } +} +function ConvertGsubGposT(handlers, T) { + return function (table, glyphs) { + if (!table) return null; + const ls = new LookupStore(handlers, glyphs); + if (table.lookups) { + if (table.lookupOrder) { + for (const l of table.lookupOrder) ls.declare(l, table.lookups[l]); + } + for (const l in table.lookups) ls.declare(l, table.lookups[l]); + for (const l in table.lookups) ls.fill(l, table.lookups[l]); + } + const fs = new FeatureStore(ls); + if (table.features) { + for (const f in table.features) fs.fill(f, table.features[f]); + } + const ss = new ScriptLanguageStore(fs); + if (table.languages) { + for (const sl in table.languages) ss.fill(sl, table.languages[sl]); + } + return new T(ss.extract(), fs.extract(), ls.extract()); + }; +} +function convertGdef(otdGdef, glyphs) { + const gdef = new Ot.Gdef.Table(); + gdef.glyphClassDef = new Map(); + for (const gn in otdGdef.glyphClassDef) { + const g = glyphs.queryByName(gn); + if (g) gdef.glyphClassDef.set(g, otdGdef.glyphClassDef[gn]); + } + return gdef; +} +export const convertGsub = ConvertGsubGposT(GsubHandlers, Ot.Gsub.Table); +export const convertGpos = ConvertGsubGposT(GposHandlers, Ot.Gpos.Table); +export { convertGdef }; diff --git a/font-src/index.mjs b/font-src/index.mjs index be0e8782f..cdc22ef04 100644 --- a/font-src/index.mjs +++ b/font-src/index.mjs @@ -1,16 +1,18 @@ import fs from "fs"; import path from "path"; -import zlib from "zlib"; import * as url from "url"; +import zlib from "zlib"; + +import * as Toml from "@iarna/toml"; import { encode } from "@msgpack/msgpack"; import { FontIo } from "ot-builder"; -import * as Toml from "@iarna/toml"; + import { buildFont } from "./gen/build-font.mjs"; -import * as Parameters from "./support/parameters.mjs"; -import { applyMetricOverride } from "./support/metric-override.mjs"; -import * as VariantData from "./support/variant-data.mjs"; -import { applyLigationData } from "./support/ligation-data.mjs"; import { createGrDisplaySheet } from "./support/gr.mjs"; +import { applyLigationData } from "./support/ligation-data.mjs"; +import { applyMetricOverride } from "./support/metric-override.mjs"; +import * as Parameters from "./support/parameters.mjs"; +import * as VariantData from "./support/variant-data.mjs"; const __filename = url.fileURLToPath(import.meta.url); const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); diff --git a/font-src/kits/boole-kit.js b/font-src/kits/boole-kit.js deleted file mode 100644 index cb28e1aac..000000000 --- a/font-src/kits/boole-kit.js +++ /dev/null @@ -1,41 +0,0 @@ -import * as TypoGeom from "typo-geom"; -import { BooleanGeometry, TransformedGeometry } from "../support/geometry/index.mjs"; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -class BooleImpl { - constructor(bindings, operator, operands) { - this.bindings = bindings; - this.operator = operator; - this.operands = operands; - } - applyToGlyph(glyph) { - const operandGeometries = []; - const forwardGizmo = glyph.gizmo || this.bindings.GlobalTransform; - const backwardGizmo = forwardGizmo.inverse(); - for (const operand of this.operands) { - const g1 = new this.bindings.Glyph(); - g1.gizmo = forwardGizmo; - g1.include(operand); - operandGeometries.push(new TransformedGeometry(g1.geometry, backwardGizmo)); - } - return glyph.includeGeometry( - new TransformedGeometry( - new BooleanGeometry(this.operator, operandGeometries), - forwardGizmo - ) - ); - } -} -export const SetupBuilders = function (bindings) { - const union = (...operands) => - new BooleImpl(bindings, TypoGeom.Boolean.ClipType.ctUnion, operands); - const intersection = (...operands) => - new BooleImpl(bindings, TypoGeom.Boolean.ClipType.ctIntersection, operands); - const difference = (...operands) => - new BooleImpl(bindings, TypoGeom.Boolean.ClipType.ctDifference, operands); - return { - union: union, - intersection: intersection, - difference: difference - }; -}; diff --git a/font-src/kits/boole-kit.mjs b/font-src/kits/boole-kit.mjs index cb28e1aac..64a79efad 100644 --- a/font-src/kits/boole-kit.mjs +++ b/font-src/kits/boole-kit.mjs @@ -1,4 +1,5 @@ import * as TypoGeom from "typo-geom"; + import { BooleanGeometry, TransformedGeometry } from "../support/geometry/index.mjs"; /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/font-src/kits/spiro-kit.mjs b/font-src/kits/spiro-kit.mjs index 715328198..eadcf3137 100644 --- a/font-src/kits/spiro-kit.mjs +++ b/font-src/kits/spiro-kit.mjs @@ -1,7 +1,7 @@ import * as CurveUtil from "../support/geometry/curve-util.mjs"; +import { SpiroGeometry, DiSpiroGeometry } from "../support/geometry/index.mjs"; import { BiKnotCollector } from "../support/geometry/spiro-expand.mjs"; import { fallback, mix, bez3 } from "../support/utils.mjs"; -import { SpiroGeometry, DiSpiroGeometry } from "../support/geometry/index.mjs"; /////////////////////////////////////////////////////////////////////////////////////////////////// class DispiroImpl { diff --git a/font-src/support/geometry/curve-util.mjs b/font-src/support/geometry/curve-util.mjs index 33fed0206..55dc4e4ac 100644 --- a/font-src/support/geometry/curve-util.mjs +++ b/font-src/support/geometry/curve-util.mjs @@ -1,4 +1,5 @@ import * as TypoGeom from "typo-geom"; + import { Point } from "./point.mjs"; import { Transform } from "./transform.mjs"; diff --git a/font-src/support/geometry/index.mjs b/font-src/support/geometry/index.mjs index a19f44448..1eeb89aad 100644 --- a/font-src/support/geometry/index.mjs +++ b/font-src/support/geometry/index.mjs @@ -1,11 +1,14 @@ import crypto from "crypto"; -import * as TypoGeom from "typo-geom"; + import * as SpiroJs from "spiro"; -import * as CurveUtil from "./curve-util.mjs"; +import * as TypoGeom from "typo-geom"; + import * as Format from "../util/formatter.mjs"; + +import * as CurveUtil from "./curve-util.mjs"; import { Point } from "./point.mjs"; -import { Transform } from "./transform.mjs"; import { SpiroExpander } from "./spiro-expand.mjs"; +import { Transform } from "./transform.mjs"; class GeometryBase { asContours() { diff --git a/font-src/support/geometry/spiro-expand.mjs b/font-src/support/geometry/spiro-expand.mjs index ff22159ca..72cd906a7 100644 --- a/font-src/support/geometry/spiro-expand.mjs +++ b/font-src/support/geometry/spiro-expand.mjs @@ -1,6 +1,7 @@ import * as SpiroJs from "spiro"; -import { linreg } from "../utils.mjs"; + import * as Format from "../util/formatter.mjs"; +import { linreg } from "../utils.mjs"; class BiKnot { constructor(type, x, y, d1, d2) { diff --git a/font-src/support/glyph/index.mjs b/font-src/support/glyph/index.mjs index 8b00fc74b..6f280eef5 100644 --- a/font-src/support/glyph/index.mjs +++ b/font-src/support/glyph/index.mjs @@ -1,7 +1,7 @@ -import { Transform } from "../geometry/transform.mjs"; -import { Point } from "../geometry/point.mjs"; import { Anchor } from "../geometry/anchor.mjs"; import * as Geom from "../geometry/index.mjs"; +import { Point } from "../geometry/point.mjs"; +import { Transform } from "../geometry/transform.mjs"; export class Glyph { constructor(_identifier) { diff --git a/package-lock.json b/package-lock.json index 30845886d..d3eb5ac1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "cldr": "^7.2.0", "eslint": "^8.18.0", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.26.0", "patel": "^0.38.0", "prettier": "^2.7.1", "verda": "^1.10.0", @@ -597,6 +598,12 @@ "tslib": "^2.0.0" } }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@unicode/unicode-14.0.0": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@unicode/unicode-14.0.0/-/unicode-14.0.0-1.2.2.tgz", @@ -691,6 +698,43 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -707,6 +751,19 @@ "concat-map": "0.0.1" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -847,6 +904,22 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -865,6 +938,69 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/es-abstract": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", + "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.3", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -993,6 +1129,101 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, "node_modules/eslint-scope": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", @@ -1324,6 +1555,18 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -1363,12 +1606,45 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1378,6 +1654,36 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -1431,6 +1737,27 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1439,6 +1766,45 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hashish": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/hashish/-/hashish-0.0.4.tgz", @@ -1512,6 +1878,87 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1542,6 +1989,103 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1572,6 +2116,18 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -1597,6 +2153,19 @@ "node": ">= 0.8.0" } }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -1640,6 +2209,12 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1652,6 +2227,59 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1756,6 +2384,39 @@ "otb-ttc-bundle": "bin/otb-ttc-bundle" } }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -1793,6 +2454,15 @@ "patel-c": "bin/patel-c" } }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1811,6 +2481,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/patrisika": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/patrisika/-/patrisika-0.25.0.tgz", @@ -1871,6 +2547,23 @@ "node": ">=6" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -1892,6 +2585,23 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2011,6 +2721,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -2049,6 +2773,34 @@ "node": ">=8" } }, + "node_modules/string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2061,6 +2813,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2084,6 +2845,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -2110,6 +2883,18 @@ "node": "*" } }, + "node_modules/tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -2151,6 +2936,21 @@ "node": ">= 8.9.0" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/unicoderegexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/unicoderegexp/-/unicoderegexp-0.4.1.tgz", @@ -2265,6 +3065,22 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -2913,6 +3729,12 @@ "tslib": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "@unicode/unicode-14.0.0": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@unicode/unicode-14.0.0/-/unicode-14.0.0-1.2.2.tgz", @@ -2980,6 +3802,31 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + } + }, + "array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2996,6 +3843,16 @@ "concat-map": "0.0.1" } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3107,6 +3964,16 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3122,6 +3989,57 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "es-abstract": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", + "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.3", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3230,6 +4148,95 @@ "dev": true, "requires": {} }, + "eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "find-up": "^2.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "requires": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, "eslint-scope": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", @@ -3458,6 +4465,15 @@ "flat-cache": "^3.0.4" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -3491,18 +4507,63 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -3541,11 +4602,50 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "hashish": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/hashish/-/hashish-0.0.4.tgz", @@ -3601,6 +4701,60 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3622,6 +4776,67 @@ "is-extglob": "^2.1.1" } }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3649,6 +4864,15 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -3669,6 +4893,16 @@ "type-check": "~0.4.0" } }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3706,6 +4940,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3718,6 +4958,41 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3803,6 +5078,30 @@ "tslib": "^2.0.0" } }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3831,6 +5130,12 @@ "yargs": "^16.1.0" } }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -3843,6 +5148,12 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "patrisika": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/patrisika/-/patrisika-0.25.0.tgz", @@ -3882,6 +5193,17 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -3894,6 +5216,17 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3982,6 +5315,17 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -4014,6 +5358,28 @@ "strip-ansi": "^6.0.1" } }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4023,6 +5389,12 @@ "ansi-regex": "^5.0.1" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4037,6 +5409,12 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4060,6 +5438,18 @@ "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", "dev": true }, + "tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -4089,6 +5479,18 @@ "tslib": "^2.0.1" } }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, "unicoderegexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/unicoderegexp/-/unicoderegexp-0.4.1.tgz", @@ -4177,6 +5579,19 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/package.json b/package.json index 8235efcd9..6705730f2 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "cldr": "^7.2.0", "eslint": "^8.18.0", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.26.0", "patel": "^0.38.0", "prettier": "^2.7.1", "verda": "^1.10.0", diff --git a/utility/amend-readme/index.mjs b/utility/amend-readme/index.mjs index ec13f511e..6a9ca2c64 100644 --- a/utility/amend-readme/index.mjs +++ b/utility/amend-readme/index.mjs @@ -1,8 +1,12 @@ import fs from "fs"; import path from "path"; -import { parseVariantsData } from "../export-data/variants-data.mjs"; +import * as url from "url"; + import { parseLigationData } from "../export-data/ligation-data.mjs"; import { getCharMapAndSupportedLanguageList } from "../export-data/supported-languages.mjs"; +import { parseVariantsData } from "../export-data/variants-data.mjs"; + +const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); async function processSsOt(dirs) { const variantsData = await parseVariantsData(); diff --git a/utility/copy-char-name-to-markdown.mjs b/utility/copy-char-name-to-markdown.mjs index 7aa32b0f1..86f8127af 100644 --- a/utility/copy-char-name-to-markdown.mjs +++ b/utility/copy-char-name-to-markdown.mjs @@ -1,6 +1,7 @@ -import ucdNames from "@unicode/unicode-14.0.0/Names"; -for (let i = 2; i < process.argv.length; i++) { - const lch = parseInt(process.argv[i], 16); - const name = ucdNames.get(lch); - console.log(" -", name, `(\`U+${lch.toString(16).toUpperCase().padStart(4, "0")}\`);`); -} +import ucdNames from "@unicode/unicode-14.0.0/Names/index.js"; + +for (let i = 2; i < process.argv.length; i++) { + const lch = parseInt(process.argv[i], 16); + const name = ucdNames.get(lch); + console.log(" -", name, `(\`U+${lch.toString(16).toUpperCase().padStart(4, "0")}\`);`); +} diff --git a/utility/create-sha-file.mjs b/utility/create-sha-file.mjs index c8b51d65b..d87859651 100644 --- a/utility/create-sha-file.mjs +++ b/utility/create-sha-file.mjs @@ -1,29 +1,29 @@ -import fs from "fs"; -import crypto from "crypto"; -function hashFile(path) { - return new Promise((resolve, reject) => { - let sum = crypto.createHash("sha256"); - let fileStream = fs.createReadStream(path); - fileStream.on("error", err => { - return reject(err); - }); - fileStream.on("data", chunk => { - try { - sum.update(chunk); - } - catch (ex) { - return reject(ex); - } - }); - fileStream.on("end", () => { - return resolve(sum.digest("hex")); - }); - }); -} -export default (async function (out, archiveFiles) { - let s = ""; - for (const file of archiveFiles) { - s += `${file.base}\t${await hashFile(file.full)}\n`; - } - await fs.promises.writeFile(out, s); -}); +import crypto from "crypto"; +import fs from "fs"; + +function hashFile(path) { + return new Promise((resolve, reject) => { + let sum = crypto.createHash("sha256"); + let fileStream = fs.createReadStream(path); + fileStream.on("error", err => { + return reject(err); + }); + fileStream.on("data", chunk => { + try { + sum.update(chunk); + } catch (ex) { + return reject(ex); + } + }); + fileStream.on("end", () => { + return resolve(sum.digest("hex")); + }); + }); +} +export default (async function (out, archiveFiles) { + let s = ""; + for (const file of archiveFiles) { + s += `${file.base}\t${await hashFile(file.full)}\n`; + } + await fs.promises.writeFile(out, s); +}); diff --git a/utility/export-data/coverage-export/block-data.mjs b/utility/export-data/coverage-export/block-data.mjs index cc4f7d079..aa1203b5a 100644 --- a/utility/export-data/coverage-export/block-data.mjs +++ b/utility/export-data/coverage-export/block-data.mjs @@ -1,15 +1,20 @@ -import UnicodeDataIndex from "@unicode/unicode-14.0.0"; -const BlockData = [ - [[0xe0a0, 0xe0df], "Private Use Area — Powerline"], - [[0xee00, 0xee3f], "Private Use Area — Progress Bar"], - // Missing ranges in UnicodeDataIndex - [[0x1fa70, 0x1faff], "Symbols and Pictographs Extended-A "], - [[0x1fb00, 0x1fbff], "Symbols for Legacy Computing"] -]; -for (const id of UnicodeDataIndex.Block) { - if (!id || /Private_Use_Area/.test(id) || /undefined/.test(id)) - continue; - BlockData.push([[rg[0].begin, rg[0].end - 1], id.replace(/_/g, " ")]); -} -BlockData.sort((a, b) => a[0][0] - b[0][0]); -export { BlockData }; +import UnicodeDataIndex from "@unicode/unicode-14.0.0"; + +export async function collectBlockData() { + const BlockData = [ + [[0xe0a0, 0xe0df], "Private Use Area — Powerline"], + [[0xee00, 0xee3f], "Private Use Area — Progress Bar"], + // Missing ranges in UnicodeDataIndex + [[0x1fa70, 0x1faff], "Symbols and Pictographs Extended-A "], + [[0x1fb00, 0x1fbff], "Symbols for Legacy Computing"] + ]; + + for (const id of UnicodeDataIndex.Block) { + if (!id || /Private_Use_Area/.test(id) || /undefined/.test(id)) continue; + const rangesModule = await import(`@unicode/unicode-14.0.0/Block/${id}/ranges.js`); + const rg = rangesModule.default; + BlockData.push([[rg[0].begin, rg[0].end - 1], id.replace(/_/g, " ")]); + } + BlockData.sort((a, b) => a[0][0] - b[0][0]); + return BlockData; +} diff --git a/utility/export-data/coverage-export/gather-coverage-data.mjs b/utility/export-data/coverage-export/gather-coverage-data.mjs index 041593719..cebe1937c 100644 --- a/utility/export-data/coverage-export/gather-coverage-data.mjs +++ b/utility/export-data/coverage-export/gather-coverage-data.mjs @@ -1,6 +1,8 @@ -import { BlockData } from "./block-data.mjs"; -import ucdNames from "@unicode/unicode-14.0.0/Names"; -import ugc from "@unicode/unicode-14.0.0/General_Category"; +import ugc from "@unicode/unicode-14.0.0/General_Category/index.js"; +import ucdNames from "@unicode/unicode-14.0.0/Names/index.js"; + +import { collectBlockData } from "./block-data.mjs"; + function findFirstLastChar(lchBlockStart, lchBlockEnd, cov) { let lchFirst = 0, lchLast = 0; @@ -18,9 +20,9 @@ function findFirstLastChar(lchBlockStart, lchBlockEnd, cov) { const lchEnd = ((lchLast >>> 4) << 4) + 0x10; return [lchStart, lchEnd]; } -export const gatherCoverageData = function (covUpright, covItalic, covOblique) { +export async function gatherCoverageData(covUpright, covItalic, covOblique) { const result = []; - for (const [[lchBlockStart, lchBlockEnd], block] of BlockData) { + for (const [[lchBlockStart, lchBlockEnd], block] of await collectBlockData()) { let blockResults = []; const [lchStart, lchEnd] = findFirstLastChar(lchBlockStart, lchBlockEnd, covUpright); if (!lchStart || !lchEnd) continue; @@ -63,4 +65,4 @@ export const gatherCoverageData = function (covUpright, covItalic, covOblique) { } } return result; -}; +} diff --git a/utility/export-data/index.mjs b/utility/export-data/index.mjs index 863a97608..af6eb9dbf 100644 --- a/utility/export-data/index.mjs +++ b/utility/export-data/index.mjs @@ -1,11 +1,19 @@ import fs from "fs"; -import { parseVariantsData } from "./variants-data.mjs"; +import path from "path"; +import * as url from "url"; + import { parseLigationData } from "./ligation-data.mjs"; import { getCharMapAndSupportedLanguageList } from "./supported-languages.mjs"; -import package$0 from "../../package.json" assert { type: "json" }; +import { parseVariantsData } from "./variants-data.mjs"; + +export default main; +async function main(argv) { + const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); + const packageJson = JSON.parse( + await fs.promises.readFile(path.join(__dirname, "../../package.json")) + ); + const version = packageJson.version; -const version = package$0.version; -export default (async function main(argv) { const variantsData = await parseVariantsData(); const ligationData = await parseLigationData(); const cl = await getCharMapAndSupportedLanguageList( @@ -32,4 +40,4 @@ export default (async function main(argv) { argv.exportPathCov, JSON.stringify({ version, ...cl }, { spaces: 2 }) ); -}); +} diff --git a/utility/export-data/ligation-data.mjs b/utility/export-data/ligation-data.mjs index 408101cc2..305fc35a2 100644 --- a/utility/export-data/ligation-data.mjs +++ b/utility/export-data/ligation-data.mjs @@ -1,5 +1,7 @@ import fs from "fs"; import path from "path"; +import * as url from "url"; + import * as toml from "@iarna/toml"; const ligationSamples = [ @@ -217,6 +219,7 @@ function buildLigationSet(ligData, getKey) { return ligationSets; } export const parseLigationData = async function () { + const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const ligToml = await fs.promises.readFile( path.join(__dirname, "../../params/ligation-set.toml"), "utf8" diff --git a/utility/export-data/supported-languages.mjs b/utility/export-data/supported-languages.mjs index d2a28e7fe..581c6c253 100644 --- a/utility/export-data/supported-languages.mjs +++ b/utility/export-data/supported-languages.mjs @@ -1,7 +1,9 @@ -import cldr from "cldr"; import fs from "fs"; import zlib from "zlib"; + import { decode } from "@msgpack/msgpack"; +import cldr from "cldr"; + import { gatherCoverageData } from "./coverage-export/gather-coverage-data.mjs"; // List all the languages that Iosevka supports, but cannot inferred from CLDR data. @@ -74,11 +76,7 @@ function getRawCoverage(charMap) { for (const u of codes) rawCoverage.set(u, [gn, tv, cv]); return rawCoverage; } -export const getCharMapAndSupportedLanguageList = async function ( - cmpUpright, - cmpItalic, - cmpOblique -) { +export async function getCharMapAndSupportedLanguageList(cmpUpright, cmpItalic, cmpOblique) { const charMap = await readMpCharMap(cmpUpright); const charMapItalic = await readMpCharMap(cmpItalic); const charMapOblique = await readMpCharMap(cmpOblique); @@ -90,7 +88,11 @@ export const getCharMapAndSupportedLanguageList = async function ( glyphCount: charMap.length, codePointCount: rawCoverage.size }, - unicodeCoverage: gatherCoverageData(rawCoverage, rawCoverageItalic, rawCoverageOblique), + unicodeCoverage: await gatherCoverageData( + rawCoverage, + rawCoverageItalic, + rawCoverageOblique + ), languages: Array.from(getSupportedLanguageSet(rawCoverage)).sort() }; -}; +} diff --git a/utility/export-data/variants-data.mjs b/utility/export-data/variants-data.mjs index b047810fa..8bf8a82b7 100644 --- a/utility/export-data/variants-data.mjs +++ b/utility/export-data/variants-data.mjs @@ -1,6 +1,9 @@ import fs from "fs"; import path from "path"; +import * as url from "url"; + import * as toml from "@iarna/toml"; + import * as VariantDataParser from "../../font-src/support/variant-data.mjs"; function getCvData(parsed) { @@ -138,6 +141,7 @@ function uniqueHotChars(cfgDefault, cfgSS) { return Array.from(s); } export const parseVariantsData = async function () { + const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const variantsToml = await fs.promises.readFile( path.join(__dirname, "../../params/variants.toml"), "utf8" diff --git a/utility/generate-release-note/change-log.mjs b/utility/generate-release-note/change-log.mjs index 9025fadbb..80a6ab660 100644 --- a/utility/generate-release-note/change-log.mjs +++ b/utility/generate-release-note/change-log.mjs @@ -1,8 +1,13 @@ -import path from "path"; import fs from "fs"; +import path from "path"; +import * as url from "url"; + import semver from "semver"; + import { Output } from "./shared/index.mjs"; +const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); + const ChangeFileDir = path.join(__dirname, "../../changes"); const ModifiedSinceVersion = "2.x"; async function GenerateChangeList(argv, out) { diff --git a/utility/generate-release-note/package-list.mjs b/utility/generate-release-note/package-list.mjs index 8b3621e64..619facd3c 100644 --- a/utility/generate-release-note/package-list.mjs +++ b/utility/generate-release-note/package-list.mjs @@ -1,7 +1,11 @@ -import path from "path"; import fs from "fs"; +import path from "path"; +import * as url from "url"; + import { Output } from "./shared/index.mjs"; +const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); + /////////////////////////////////////////////////////////////////////////////////////////////////// // Copy Markdown async function CopyMarkdown(out, name) { diff --git a/utility/generate-release-note/release-note.mjs b/utility/generate-release-note/release-note.mjs index 1b205acf6..808f29242 100644 --- a/utility/generate-release-note/release-note.mjs +++ b/utility/generate-release-note/release-note.mjs @@ -1,8 +1,13 @@ -import path from "path"; import fs from "fs"; +import path from "path"; +import * as url from "url"; + import SemVer from "semver"; + import { Output } from "./shared/index.mjs"; +const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); + const ChangeFileDir = path.join(__dirname, "../../changes"); /////////////////////////////////////////////////////////////////////////////////////////////////// // CHANGE LIST diff --git a/utility/generate-samples/index.mjs b/utility/generate-samples/index.mjs index 7f2dae88e..188e14ace 100644 --- a/utility/generate-samples/index.mjs +++ b/utility/generate-samples/index.mjs @@ -1,15 +1,17 @@ import fs from "fs"; import path from "path"; + +import { parseLigationData } from "../export-data/ligation-data.mjs"; +import { parseVariantsData } from "../export-data/variants-data.mjs"; + import Button from "./templates/button.mjs"; +import CharVariant from "./templates/character-variant.mjs"; import GrandTitle from "./templates/grand-title.mjs"; import Languages from "./templates/languages.mjs"; -import Weights from "./templates/weights.mjs"; +import LigationSet from "./templates/ligation-set.mjs"; import Matrix from "./templates/matrix.mjs"; import StylisticSet from "./templates/stylistic-set.mjs"; -import CharVariant from "./templates/character-variant.mjs"; -import LigationSet from "./templates/ligation-set.mjs"; -import { parseVariantsData } from "../export-data/variants-data.mjs"; -import { parseLigationData } from "../export-data/ligation-data.mjs"; +import Weights from "./templates/weights.mjs"; class Generator { constructor(outputDir, fontFiles) { diff --git a/utility/generate-samples/templates/button.mjs b/utility/generate-samples/templates/button.mjs index 2e17646d1..7f2cf2337 100644 --- a/utility/generate-samples/templates/button.mjs +++ b/utility/generate-samples/templates/button.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + export default (function (args) { const theme = themes[args.theme]; const EM = 16; diff --git a/utility/generate-samples/templates/character-variant.mjs b/utility/generate-samples/templates/character-variant.mjs index 6a06e76e3..eb84623e5 100644 --- a/utility/generate-samples/templates/character-variant.mjs +++ b/utility/generate-samples/templates/character-variant.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + export default (function (args) { const theme = themes[args.theme]; const unitWidth = 128; diff --git a/utility/generate-samples/templates/grand-title.mjs b/utility/generate-samples/templates/grand-title.mjs index db3052992..d8d13d7c6 100644 --- a/utility/generate-samples/templates/grand-title.mjs +++ b/utility/generate-samples/templates/grand-title.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + export default (function (args) { const theme = themes[args.theme]; const EM = 240; diff --git a/utility/generate-samples/templates/languages.mjs b/utility/generate-samples/templates/languages.mjs index 1d5924604..21ff7b773 100644 --- a/utility/generate-samples/templates/languages.mjs +++ b/utility/generate-samples/templates/languages.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + // prettier-ignore const languages = [ { lang: 'English', sample: 'Shaw, those twelve beige hooks are joined if I patch a young, gooey mouth.' }, @@ -26,6 +27,7 @@ const languages = [ { lang: 'Turkish', sample: 'Pijamalı hasta yağız şoföre çabucak güvendi.' }, { lang: 'Ukrainian', sample: 'Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів!' } ]; + export default (function (args) { const theme = themes[args.theme]; const EM = 24; diff --git a/utility/generate-samples/templates/ligation-set.mjs b/utility/generate-samples/templates/ligation-set.mjs index 7f2ab5310..6be3220c7 100644 --- a/utility/generate-samples/templates/ligation-set.mjs +++ b/utility/generate-samples/templates/ligation-set.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + function* makeSample(theme, args) { const groupSet = new Set(args.ligSets); for (const row of args.ligationSamples) { diff --git a/utility/generate-samples/templates/matrix.mjs b/utility/generate-samples/templates/matrix.mjs index 15d8be49e..f8ec463ad 100644 --- a/utility/generate-samples/templates/matrix.mjs +++ b/utility/generate-samples/templates/matrix.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + export default (function (args) { const theme = themes[args.theme]; const EM = 48; diff --git a/utility/generate-samples/templates/stylistic-set.mjs b/utility/generate-samples/templates/stylistic-set.mjs index e8f0f32de..5c873cf7b 100644 --- a/utility/generate-samples/templates/stylistic-set.mjs +++ b/utility/generate-samples/templates/stylistic-set.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + const ssStrings = [ ["ABC.DEF.GHI.JKL.MNO.PQRS.TUV.WXYZ", "abc.def.ghi.jkl.mno.pqrs.tuv.wxyz"], ["¢ ſß ΓΛΔ αδιλμξ КУЗЯЖэльфязычникж", "float il1[]={1-2/3.4,5+6=7/8%90};"], diff --git a/utility/generate-samples/templates/weights.mjs b/utility/generate-samples/templates/weights.mjs index c33d38e51..e3f14c8c6 100644 --- a/utility/generate-samples/templates/weights.mjs +++ b/utility/generate-samples/templates/weights.mjs @@ -1,4 +1,5 @@ import * as themes from "../themes/index.mjs"; + export default (function (args) { const theme = themes[args.theme]; const EM = 48; diff --git a/utility/generate-samples/themes/index.mjs b/utility/generate-samples/themes/index.mjs index 515445552..9f2a5ad62 100644 --- a/utility/generate-samples/themes/index.mjs +++ b/utility/generate-samples/themes/index.mjs @@ -1,12 +1,12 @@ -export const light = { - body: "#20242E", - dimmed: "#20242E40", - stress: "#048FBF", - title: "#8757AD" -}; -export const dark = { - body: "#DEE4E3", - dimmed: "#DEE4E340", - stress: "#03AEE9", - title: "#B77FDB" -}; +export const light = { + body: "#20242E", + dimmed: "#20242E40", + stress: "#048FBF", + title: "#8757AD" +}; +export const dark = { + body: "#DEE4E3", + dimmed: "#DEE4E340", + stress: "#03AEE9", + title: "#B77FDB" +}; diff --git a/utility/ttf-to-woff2.mjs b/utility/ttf-to-woff2.mjs index a9f04a709..0c897a807 100644 --- a/utility/ttf-to-woff2.mjs +++ b/utility/ttf-to-woff2.mjs @@ -1,4 +1,5 @@ import fs from "fs"; + import * as wawoff from "wawoff2"; export default (async function (from, to) { diff --git a/utility/update-package-json-version/index.mjs b/utility/update-package-json-version/index.mjs index 8a2fb2d94..97536118b 100644 --- a/utility/update-package-json-version/index.mjs +++ b/utility/update-package-json-version/index.mjs @@ -1,5 +1,6 @@ -import path from "path"; import fs from "fs"; +import path from "path"; + import semver from "semver"; const ChangeFileDir = path.join(__dirname, "../../changes"); diff --git a/verdafile.mjs b/verdafile.mjs index 289fa61c5..4492789c3 100644 --- a/verdafile.mjs +++ b/verdafile.mjs @@ -1,10 +1,11 @@ import * as FS from "fs"; import * as Path from "path"; -import * as Verda from "verda"; -import which from "which"; + import * as toml from "@iarna/toml"; import semver from "semver"; import * as uuid from "uuid"; +import * as Verda from "verda"; +import which from "which"; /////////////////////////////////////////////////////////// @@ -922,7 +923,7 @@ phony(`release`, async target => { } const [archiveFiles] = await target.need(goals); // Create hash of packages - await target.need(fu`utility/create-sha-file.js`); + await target.need(fu`utility/create-sha-file.mjs`); await node("utility/create-sha-file.mjs", "doc/packages-sha.txt", archiveFiles); // Images and release notes await target.need(SampleImages, Pages, AmendReadme, ReleaseNotes, ChangeLog); @@ -938,12 +939,11 @@ const ScriptsUnder = oracle.make( (target, ext, dir) => FileList({ under: dir, pattern: `**/*.${ext}` })(target) ); const UtilScriptFiles = computed("util-script-files", async target => { - const [js, ejs, md] = await target.need( + const [mjs, md] = await target.need( ScriptsUnder("mjs", "utility"), - ScriptsUnder("ejs", "utility"), ScriptsUnder("md", "utility") ); - return [...js, ...ejs, ...md]; + return [...mjs, ...md]; }); const ScriptFiles = computed.group("script-files", async (target, ext) => { const [ss] = await target.need(ScriptsUnder(ext, `font-src`));