From a1b9be453bbace564b3c9034aab9462bb4dc9977 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 15 Aug 2019 00:47:55 +0100 Subject: [PATCH 001/260] Add math run and fraction --- demo/47-math.ts | 33 ++++++++++++++ src/file/paragraph/index.ts | 1 + src/file/paragraph/math/fraction/index.ts | 3 ++ .../math/fraction/math-denominator.spec.ts | 25 +++++++++++ .../math/fraction/math-denominator.ts | 11 +++++ .../math/fraction/math-fraction.spec.ts | 45 +++++++++++++++++++ .../paragraph/math/fraction/math-fraction.ts | 18 ++++++++ .../math/fraction/math-numerator.spec.ts | 25 +++++++++++ .../paragraph/math/fraction/math-numerator.ts | 11 +++++ src/file/paragraph/math/index.ts | 3 ++ src/file/paragraph/math/math-run.spec.ts | 21 +++++++++ src/file/paragraph/math/math-run.ts | 11 +++++ src/file/paragraph/math/math-text.spec.ts | 17 +++++++ src/file/paragraph/math/math-text.ts | 9 ++++ src/file/paragraph/math/math.spec.ts | 38 ++++++++++++++++ src/file/paragraph/math/math.ts | 19 ++++++++ src/file/paragraph/paragraph.ts | 3 +- 17 files changed, 292 insertions(+), 1 deletion(-) create mode 100644 demo/47-math.ts create mode 100644 src/file/paragraph/math/fraction/index.ts create mode 100644 src/file/paragraph/math/fraction/math-denominator.spec.ts create mode 100644 src/file/paragraph/math/fraction/math-denominator.ts create mode 100644 src/file/paragraph/math/fraction/math-fraction.spec.ts create mode 100644 src/file/paragraph/math/fraction/math-fraction.ts create mode 100644 src/file/paragraph/math/fraction/math-numerator.spec.ts create mode 100644 src/file/paragraph/math/fraction/math-numerator.ts create mode 100644 src/file/paragraph/math/index.ts create mode 100644 src/file/paragraph/math/math-run.spec.ts create mode 100644 src/file/paragraph/math/math-run.ts create mode 100644 src/file/paragraph/math/math-text.spec.ts create mode 100644 src/file/paragraph/math/math-text.ts create mode 100644 src/file/paragraph/math/math.spec.ts create mode 100644 src/file/paragraph/math/math.ts diff --git a/demo/47-math.ts b/demo/47-math.ts new file mode 100644 index 0000000000..7862feac97 --- /dev/null +++ b/demo/47-math.ts @@ -0,0 +1,33 @@ +// Simple example to add text to a document +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, Math, MathDenominator, MathFraction, MathNumerator, MathRun, Packer, Paragraph, TextRun } from "../build"; + +const doc = new Document(); + +doc.addSection({ + properties: {}, + children: [ + new Paragraph({ + children: [ + new Math({ + children: [ + new MathRun("2+2"), + new MathFraction({ + numerator: new MathNumerator("hi"), + denominator: new MathDenominator("2"), + }), + ], + }), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); diff --git a/src/file/paragraph/index.ts b/src/file/paragraph/index.ts index 222cb1bf4f..a2ab11a21e 100644 --- a/src/file/paragraph/index.ts +++ b/src/file/paragraph/index.ts @@ -4,3 +4,4 @@ export * from "./properties"; export * from "./run"; export * from "./links"; export * from "./image"; +export * from "./math"; diff --git a/src/file/paragraph/math/fraction/index.ts b/src/file/paragraph/math/fraction/index.ts new file mode 100644 index 0000000000..c8af438329 --- /dev/null +++ b/src/file/paragraph/math/fraction/index.ts @@ -0,0 +1,3 @@ +export * from "./math-fraction"; +export * from "./math-denominator"; +export * from "./math-numerator"; diff --git a/src/file/paragraph/math/fraction/math-denominator.spec.ts b/src/file/paragraph/math/fraction/math-denominator.spec.ts new file mode 100644 index 0000000000..cca8ae0ee1 --- /dev/null +++ b/src/file/paragraph/math/fraction/math-denominator.spec.ts @@ -0,0 +1,25 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathDenominator } from "./math-denominator"; + +describe("MathDenominator", () => { + describe("#constructor()", () => { + it("should create a MathDenominator with correct root key", () => { + const mathDenominator = new MathDenominator("2+2"); + const tree = new Formatter().format(mathDenominator); + expect(tree).to.deep.equal({ + "m:den": [ + { + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/fraction/math-denominator.ts b/src/file/paragraph/math/fraction/math-denominator.ts new file mode 100644 index 0000000000..da9f283bdc --- /dev/null +++ b/src/file/paragraph/math/fraction/math-denominator.ts @@ -0,0 +1,11 @@ +import { XmlComponent } from "file/xml-components"; + +import { MathRun } from "../math-run"; + +export class MathDenominator extends XmlComponent { + constructor(readonly text: string) { + super("m:den"); + + this.root.push(new MathRun(text)); + } +} diff --git a/src/file/paragraph/math/fraction/math-fraction.spec.ts b/src/file/paragraph/math/fraction/math-fraction.spec.ts new file mode 100644 index 0000000000..9a7386e85e --- /dev/null +++ b/src/file/paragraph/math/fraction/math-fraction.spec.ts @@ -0,0 +1,45 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathDenominator } from "./math-denominator"; +import { MathFraction } from "./math-fraction"; +import { MathNumerator } from "./math-numerator"; + +describe("MathFraction", () => { + describe("#constructor()", () => { + it("should create a MathFraction with correct root key", () => { + const mathFraction = new MathFraction({ + numerator: new MathNumerator("2"), + denominator: new MathDenominator("2"), + }); + const tree = new Formatter().format(mathFraction); + expect(tree).to.deep.equal({ + "m:f": [ + { + "m:num": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + { + "m:den": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/fraction/math-fraction.ts b/src/file/paragraph/math/fraction/math-fraction.ts new file mode 100644 index 0000000000..062c3ef575 --- /dev/null +++ b/src/file/paragraph/math/fraction/math-fraction.ts @@ -0,0 +1,18 @@ +import { XmlComponent } from "file/xml-components"; + +import { MathDenominator } from "./math-denominator"; +import { MathNumerator } from "./math-numerator"; + +export interface IMathFractionOptions { + readonly numerator: MathNumerator; + readonly denominator: MathDenominator; +} + +export class MathFraction extends XmlComponent { + constructor(readonly options: IMathFractionOptions) { + super("m:f"); + + this.root.push(options.numerator); + this.root.push(options.denominator); + } +} diff --git a/src/file/paragraph/math/fraction/math-numerator.spec.ts b/src/file/paragraph/math/fraction/math-numerator.spec.ts new file mode 100644 index 0000000000..1cc5fc4aa4 --- /dev/null +++ b/src/file/paragraph/math/fraction/math-numerator.spec.ts @@ -0,0 +1,25 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathNumerator } from "./math-numerator"; + +describe("MathNumerator", () => { + describe("#constructor()", () => { + it("should create a MathNumerator with correct root key", () => { + const mathNumerator = new MathNumerator("2+2"); + const tree = new Formatter().format(mathNumerator); + expect(tree).to.deep.equal({ + "m:num": [ + { + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/fraction/math-numerator.ts b/src/file/paragraph/math/fraction/math-numerator.ts new file mode 100644 index 0000000000..68799328cb --- /dev/null +++ b/src/file/paragraph/math/fraction/math-numerator.ts @@ -0,0 +1,11 @@ +import { XmlComponent } from "file/xml-components"; + +import { MathRun } from "../math-run"; + +export class MathNumerator extends XmlComponent { + constructor(readonly text: string) { + super("m:num"); + + this.root.push(new MathRun(text)); + } +} diff --git a/src/file/paragraph/math/index.ts b/src/file/paragraph/math/index.ts new file mode 100644 index 0000000000..9f3b22b5fa --- /dev/null +++ b/src/file/paragraph/math/index.ts @@ -0,0 +1,3 @@ +export * from "./math"; +export * from "./math-run"; +export * from "./fraction"; diff --git a/src/file/paragraph/math/math-run.spec.ts b/src/file/paragraph/math/math-run.spec.ts new file mode 100644 index 0000000000..2773a0fb9c --- /dev/null +++ b/src/file/paragraph/math/math-run.spec.ts @@ -0,0 +1,21 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "./math-run"; + +describe("MathRun", () => { + describe("#constructor()", () => { + it("should create a MathRun with correct root key", () => { + const mathRun = new MathRun("2+2"); + const tree = new Formatter().format(mathRun); + expect(tree).to.deep.equal({ + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/math-run.ts b/src/file/paragraph/math/math-run.ts new file mode 100644 index 0000000000..5b9b9536c4 --- /dev/null +++ b/src/file/paragraph/math/math-run.ts @@ -0,0 +1,11 @@ +import { XmlComponent } from "file/xml-components"; + +import { MathText } from "./math-text"; + +export class MathRun extends XmlComponent { + constructor(readonly text: string) { + super("m:r"); + + this.root.push(new MathText(text)); + } +} diff --git a/src/file/paragraph/math/math-text.spec.ts b/src/file/paragraph/math/math-text.spec.ts new file mode 100644 index 0000000000..0001816ed1 --- /dev/null +++ b/src/file/paragraph/math/math-text.spec.ts @@ -0,0 +1,17 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathText } from "./math-text"; + +describe("MathText", () => { + describe("#constructor()", () => { + it("should create a MathText with correct root key", () => { + const mathText = new MathText("2+2"); + const tree = new Formatter().format(mathText); + expect(tree).to.deep.equal({ + "m:t": ["2+2"], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/math-text.ts b/src/file/paragraph/math/math-text.ts new file mode 100644 index 0000000000..907294aab9 --- /dev/null +++ b/src/file/paragraph/math/math-text.ts @@ -0,0 +1,9 @@ +import { XmlComponent } from "file/xml-components"; + +export class MathText extends XmlComponent { + constructor(readonly text: string) { + super("m:t"); + + this.root.push(text); + } +} diff --git a/src/file/paragraph/math/math.spec.ts b/src/file/paragraph/math/math.spec.ts new file mode 100644 index 0000000000..d5c4f6f494 --- /dev/null +++ b/src/file/paragraph/math/math.spec.ts @@ -0,0 +1,38 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { Math } from "./math"; +import { MathRun } from "./math-run"; + +describe("Math", () => { + describe("#constructor()", () => { + it("should create a Math with correct root key", () => { + const math = new Math({ + children: [], + }); + const tree = new Formatter().format(math); + expect(tree).to.deep.equal({ + "m:oMath": {}, + }); + }); + + it("should be able to add children", () => { + const math = new Math({ + children: [new MathRun("2+2")], + }); + const tree = new Formatter().format(math); + expect(tree).to.deep.equal({ + "m:oMath": [ + { + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/math.ts b/src/file/paragraph/math/math.ts new file mode 100644 index 0000000000..eee6fdff65 --- /dev/null +++ b/src/file/paragraph/math/math.ts @@ -0,0 +1,19 @@ +// http://www.datypic.com/sc/ooxml/e-m_oMath-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathFraction } from "./fraction"; +import { MathRun } from "./math-run"; + +export interface IMathOptions { + readonly children: Array; +} + +export class Math extends XmlComponent { + constructor(readonly options: IMathOptions) { + super("m:oMath"); + + for (const child of options.children) { + this.root.push(child); + } + } +} diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index 3f39ba68bc..c0375fac5c 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -15,6 +15,7 @@ import { HeadingLevel, Style } from "./formatting/style"; import { CenterTabStop, LeaderType, LeftTabStop, MaxRightTabStop, RightTabStop } from "./formatting/tab-stop"; import { NumberProperties } from "./formatting/unordered-list"; import { Bookmark, Hyperlink, OutlineLevel } from "./links"; +import { Math } from "./math"; import { ParagraphProperties } from "./properties"; import { PictureRun, Run, SequentialIdentifier, TextRun } from "./run"; @@ -54,7 +55,7 @@ export interface IParagraphOptions { readonly level: number; readonly custom?: boolean; }; - readonly children?: Array; + readonly children?: Array; } export class Paragraph extends XmlComponent { From 4f8d435e166fe3445649ea3b959cec90b87d226a Mon Sep 17 00:00:00 2001 From: Dolan Date: Tue, 20 Aug 2019 20:40:40 +0100 Subject: [PATCH 002/260] Add Math Summation --- demo/47-math.ts | 13 +++- src/file/paragraph/math/index.ts | 1 + src/file/paragraph/math/math-run.ts | 1 + src/file/paragraph/math/math.ts | 3 +- src/file/paragraph/math/n-ary/index.ts | 7 ++ .../math/n-ary/math-accent-character.spec.ts | 22 ++++++ .../math/n-ary/math-accent-character.ts | 14 ++++ .../paragraph/math/n-ary/math-base.spec.ts | 27 +++++++ src/file/paragraph/math/n-ary/math-base.ts | 12 +++ .../math/n-ary/math-limit-location.spec.ts | 22 ++++++ .../math/n-ary/math-limit-location.ts | 14 ++++ .../math/n-ary/math-naray-properties.spec.ts | 33 ++++++++ .../math/n-ary/math-naray-properties.ts | 14 ++++ .../math/n-ary/math-sub-script.spec.ts | 27 +++++++ .../paragraph/math/n-ary/math-sub-script.ts | 12 +++ .../paragraph/math/n-ary/math-sum.spec.ts | 75 +++++++++++++++++++ src/file/paragraph/math/n-ary/math-sum.ts | 25 +++++++ .../math/n-ary/math-super-script.spec.ts | 27 +++++++ .../paragraph/math/n-ary/math-super-script.ts | 12 +++ 19 files changed, 359 insertions(+), 2 deletions(-) create mode 100644 src/file/paragraph/math/n-ary/index.ts create mode 100644 src/file/paragraph/math/n-ary/math-accent-character.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-accent-character.ts create mode 100644 src/file/paragraph/math/n-ary/math-base.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-base.ts create mode 100644 src/file/paragraph/math/n-ary/math-limit-location.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-limit-location.ts create mode 100644 src/file/paragraph/math/n-ary/math-naray-properties.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-naray-properties.ts create mode 100644 src/file/paragraph/math/n-ary/math-sub-script.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-sub-script.ts create mode 100644 src/file/paragraph/math/n-ary/math-sum.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-sum.ts create mode 100644 src/file/paragraph/math/n-ary/math-super-script.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-super-script.ts diff --git a/demo/47-math.ts b/demo/47-math.ts index 7862feac97..5cad1707de 100644 --- a/demo/47-math.ts +++ b/demo/47-math.ts @@ -1,7 +1,7 @@ // Simple example to add text to a document // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, Math, MathDenominator, MathFraction, MathNumerator, MathRun, Packer, Paragraph, TextRun } from "../build"; +import { Document, Math, MathDenominator, MathFraction, MathNumerator, MathRun, MathSum, Packer, Paragraph, TextRun } from "../build"; const doc = new Document(); @@ -25,6 +25,17 @@ doc.addSection({ }), ], }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSum({ + child: new MathRun("test"), + }), + ], + }), + ], + }), ], }); diff --git a/src/file/paragraph/math/index.ts b/src/file/paragraph/math/index.ts index 9f3b22b5fa..063678689c 100644 --- a/src/file/paragraph/math/index.ts +++ b/src/file/paragraph/math/index.ts @@ -1,3 +1,4 @@ export * from "./math"; export * from "./math-run"; export * from "./fraction"; +export * from "./n-ary"; diff --git a/src/file/paragraph/math/math-run.ts b/src/file/paragraph/math/math-run.ts index 5b9b9536c4..3b7cceb362 100644 --- a/src/file/paragraph/math/math-run.ts +++ b/src/file/paragraph/math/math-run.ts @@ -1,3 +1,4 @@ +// http://www.datypic.com/sc/ooxml/e-m_r-1.html import { XmlComponent } from "file/xml-components"; import { MathText } from "./math-text"; diff --git a/src/file/paragraph/math/math.ts b/src/file/paragraph/math/math.ts index eee6fdff65..43272ed941 100644 --- a/src/file/paragraph/math/math.ts +++ b/src/file/paragraph/math/math.ts @@ -3,9 +3,10 @@ import { XmlComponent } from "file/xml-components"; import { MathFraction } from "./fraction"; import { MathRun } from "./math-run"; +import { MathSum } from "./n-ary"; export interface IMathOptions { - readonly children: Array; + readonly children: Array; } export class Math extends XmlComponent { diff --git a/src/file/paragraph/math/n-ary/index.ts b/src/file/paragraph/math/n-ary/index.ts new file mode 100644 index 0000000000..6929544152 --- /dev/null +++ b/src/file/paragraph/math/n-ary/index.ts @@ -0,0 +1,7 @@ +export * from "./math-accent-character"; +export * from "./math-base"; +export * from "./math-limit-location"; +export * from "./math-naray-properties"; +export * from "./math-sub-script"; +export * from "./math-sum"; +export * from "./math-super-script"; diff --git a/src/file/paragraph/math/n-ary/math-accent-character.spec.ts b/src/file/paragraph/math/n-ary/math-accent-character.spec.ts new file mode 100644 index 0000000000..b414f4c744 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-accent-character.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathAccentCharacter } from "./math-accent-character"; + +describe("MathAccentCharacter", () => { + describe("#constructor()", () => { + it("should create a MathAccentCharacter with correct root key", () => { + const mathAccentCharacter = new MathAccentCharacter("∑"); + + const tree = new Formatter().format(mathAccentCharacter); + expect(tree).to.deep.equal({ + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-accent-character.ts b/src/file/paragraph/math/n-ary/math-accent-character.ts new file mode 100644 index 0000000000..3a5a10d7d2 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-accent-character.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_chr-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathAccentCharacterAttributes extends XmlAttributeComponent<{ readonly accent: string }> { + protected readonly xmlKeys = { accent: "m:val" }; +} + +export class MathAccentCharacter extends XmlComponent { + constructor(readonly accent: string) { + super("m:chr"); + + this.root.push(new MathAccentCharacterAttributes({ accent })); + } +} diff --git a/src/file/paragraph/math/n-ary/math-base.spec.ts b/src/file/paragraph/math/n-ary/math-base.spec.ts new file mode 100644 index 0000000000..012147c4d9 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-base.spec.ts @@ -0,0 +1,27 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathBase } from "./math-base"; + +describe("MathBase", () => { + describe("#constructor()", () => { + it("should create a MathBase with correct root key", () => { + const mathBase = new MathBase(new MathRun("2+2")); + + const tree = new Formatter().format(mathBase); + expect(tree).to.deep.equal({ + "m:e": [ + { + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-base.ts b/src/file/paragraph/math/n-ary/math-base.ts new file mode 100644 index 0000000000..e75231cdb2 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-base.ts @@ -0,0 +1,12 @@ +// http://www.datypic.com/sc/ooxml/e-m_e-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathRun } from "../math-run"; + +export class MathBase extends XmlComponent { + constructor(readonly run: MathRun) { + super("m:e"); + + this.root.push(run); + } +} diff --git a/src/file/paragraph/math/n-ary/math-limit-location.spec.ts b/src/file/paragraph/math/n-ary/math-limit-location.spec.ts new file mode 100644 index 0000000000..426f3d0198 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-limit-location.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathLimitLocation } from "./math-limit-location"; + +describe("MathLimitLocation", () => { + describe("#constructor()", () => { + it("should create a MathLimitLocation with correct root key", () => { + const mathLimitLocation = new MathLimitLocation(); + + const tree = new Formatter().format(mathLimitLocation); + expect(tree).to.deep.equal({ + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-limit-location.ts b/src/file/paragraph/math/n-ary/math-limit-location.ts new file mode 100644 index 0000000000..5504e1890d --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-limit-location.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_limLoc-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathLimitLocationAttributes extends XmlAttributeComponent<{ readonly value: string }> { + protected readonly xmlKeys = { value: "m:val" }; +} + +export class MathLimitLocation extends XmlComponent { + constructor() { + super("m:limLoc"); + + this.root.push(new MathLimitLocationAttributes({ value: "undOvr" })); + } +} diff --git a/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts b/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts new file mode 100644 index 0000000000..01ac55fb03 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts @@ -0,0 +1,33 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathNArayProperties } from "./math-naray-properties"; + +describe("MathNArayProperties", () => { + describe("#constructor()", () => { + it("should create a MathNArayProperties with correct root key", () => { + const mathNArayProperties = new MathNArayProperties("∑"); + + const tree = new Formatter().format(mathNArayProperties); + expect(tree).to.deep.equal({ + "m:naryPr": [ + { + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }, + { + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-naray-properties.ts b/src/file/paragraph/math/n-ary/math-naray-properties.ts new file mode 100644 index 0000000000..4b28b58794 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-naray-properties.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_naryPr-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathAccentCharacter } from "./math-accent-character"; +import { MathLimitLocation } from "./math-limit-location"; + +export class MathNArayProperties extends XmlComponent { + constructor(readonly accent: string) { + super("m:naryPr"); + + this.root.push(new MathAccentCharacter(accent)); + this.root.push(new MathLimitLocation()); + } +} diff --git a/src/file/paragraph/math/n-ary/math-sub-script.spec.ts b/src/file/paragraph/math/n-ary/math-sub-script.spec.ts new file mode 100644 index 0000000000..d09908b192 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-sub-script.spec.ts @@ -0,0 +1,27 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathSubScript } from "./math-sub-script"; + +describe("MathSubScript", () => { + describe("#constructor()", () => { + it("should create a MathSubScript with correct root key", () => { + const mathSubScript = new MathSubScript(new MathRun("2+2")); + + const tree = new Formatter().format(mathSubScript); + expect(tree).to.deep.equal({ + "m:sub": [ + { + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-sub-script.ts b/src/file/paragraph/math/n-ary/math-sub-script.ts new file mode 100644 index 0000000000..25fe8da894 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-sub-script.ts @@ -0,0 +1,12 @@ +// http://www.datypic.com/sc/ooxml/e-m_e-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathRun } from "../math-run"; + +export class MathSubScript extends XmlComponent { + constructor(readonly run: MathRun) { + super("m:sub"); + + this.root.push(run); + } +} diff --git a/src/file/paragraph/math/n-ary/math-sum.spec.ts b/src/file/paragraph/math/n-ary/math-sum.spec.ts new file mode 100644 index 0000000000..e168792b1f --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-sum.spec.ts @@ -0,0 +1,75 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathSum } from "./math-sum"; + +describe("MathSum", () => { + describe("#constructor()", () => { + it("should create a MathSum with correct root key", () => { + const mathSum = new MathSum({ + child: new MathRun("1"), + subScript: new MathRun("2"), + superScript: new MathRun("3"), + }); + + const tree = new Formatter().format(mathSum); + expect(tree).to.deep.equal({ + "m:nary": [ + { + "m:naryPr": [ + { + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }, + { + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }, + ], + }, + { + "m:sub": [ + { + "m:r": [ + { + "m:t": ["1"], + }, + ], + }, + ], + }, + { + "m:sup": [ + { + "m:r": [ + { + "m:t": ["1"], + }, + ], + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["1"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-sum.ts b/src/file/paragraph/math/n-ary/math-sum.ts new file mode 100644 index 0000000000..2664b87fad --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-sum.ts @@ -0,0 +1,25 @@ +// http://www.datypic.com/sc/ooxml/e-m_nary-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathRun } from "../math-run"; +import { MathBase } from "./math-base"; +import { MathNArayProperties } from "./math-naray-properties"; +import { MathSubScript } from "./math-sub-script"; +import { MathSuperScript } from "./math-super-script"; + +export interface IMathSumOptions { + readonly child: MathRun; + readonly subScript?: MathRun; + readonly superScript?: MathRun; +} + +export class MathSum extends XmlComponent { + constructor(readonly options: IMathSumOptions) { + super("m:nary"); + + this.root.push(new MathNArayProperties("∑")); + this.root.push(new MathSubScript(options.child)); + this.root.push(new MathSuperScript(options.child)); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/n-ary/math-super-script.spec.ts b/src/file/paragraph/math/n-ary/math-super-script.spec.ts new file mode 100644 index 0000000000..7270276c28 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-super-script.spec.ts @@ -0,0 +1,27 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathSuperScript } from "./math-super-script"; + +describe("MathSuperScript", () => { + describe("#constructor()", () => { + it("should create a MathSuperScript with correct root key", () => { + const mathSuperScript = new MathSuperScript(new MathRun("2+2")); + + const tree = new Formatter().format(mathSuperScript); + expect(tree).to.deep.equal({ + "m:sup": [ + { + "m:r": [ + { + "m:t": ["2+2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-super-script.ts b/src/file/paragraph/math/n-ary/math-super-script.ts new file mode 100644 index 0000000000..8296c59f6a --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-super-script.ts @@ -0,0 +1,12 @@ +// http://www.datypic.com/sc/ooxml/e-m_e-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathRun } from "../math-run"; + +export class MathSuperScript extends XmlComponent { + constructor(readonly run: MathRun) { + super("m:sup"); + + this.root.push(run); + } +} From 06abde24252318f199e275cdd36cc34283e65bf8 Mon Sep 17 00:00:00 2001 From: Seiya Date: Sat, 12 Oct 2019 02:06:17 +0300 Subject: [PATCH 003/260] fix set table cell width --- src/file/table/table-cell/table-cell.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index 5c34d17903..469331bc08 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -6,7 +6,7 @@ import { IXmlableObject, XmlComponent } from "file/xml-components"; import { ITableShadingAttributesProperties } from "../shading"; import { Table } from "../table"; import { ITableCellMarginOptions } from "./cell-margin/table-cell-margins"; -import { VerticalAlign, VerticalMergeType } from "./table-cell-components"; +import { VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components"; import { TableCellProperties } from "./table-cell-properties"; export interface ITableCellOptions { @@ -14,6 +14,10 @@ export interface ITableCellOptions { readonly margins?: ITableCellMarginOptions; readonly verticalAlign?: VerticalAlign; readonly verticalMerge?: VerticalMergeType; + readonly width?: { + readonly size: number | string; + readonly type?: WidthType; + }; readonly columnSpan?: number; readonly rowSpan?: number; readonly borders?: { @@ -78,6 +82,10 @@ export class TableCell extends XmlComponent { this.properties.addVerticalMerge(VerticalMergeType.RESTART); } + if (options.width) { + this.properties.setWidth(options.width.size, options.width.type); + } + if (options.borders) { if (options.borders.top) { this.properties.Borders.addTopBorder(options.borders.top.style, options.borders.top.size, options.borders.top.color); From bfbe59cb84b9f124b303a86887d381fb55a07e5e Mon Sep 17 00:00:00 2001 From: Seiya Date: Sat, 12 Oct 2019 03:14:25 +0300 Subject: [PATCH 004/260] table cell width test --- src/file/table/table-cell/table-cell.spec.ts | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/file/table/table-cell/table-cell.spec.ts b/src/file/table/table-cell/table-cell.spec.ts index 4dd86ffc9c..a4c316f7ba 100644 --- a/src/file/table/table-cell/table-cell.spec.ts +++ b/src/file/table/table-cell/table-cell.spec.ts @@ -395,6 +395,33 @@ describe("TableCell", () => { }); }); + it("should create with width", () => { + const cell = new TableCell({ + children: [], + width: { size: 100, type: WidthType.DXA }, + }); + const tree = new Formatter().format(cell); + expect(tree).to.deep.equal({ + "w:tc": [ + { + "w:tcPr": [ + { + "w:tcW": { + _attr: { + "w:type": "dxa", + "w:w": 100, + }, + }, + }, + ], + }, + { + "w:p": {}, + }, + ], + }); + }); + it("should create with column span", () => { const cell = new TableCell({ children: [], From fcc42025983ce4b75a451efd0030317abf49cd74 Mon Sep 17 00:00:00 2001 From: James Montalvo Date: Sat, 12 Oct 2019 00:42:54 -0500 Subject: [PATCH 005/260] Bump nyc from 13.1.0 to 14.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fbe0f4f2f..976e4d23f3 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "jszip": "^3.1.5", "mocha": "^5.2.0", "mocha-webpack": "^1.0.1", - "nyc": "^13.1.0", + "nyc": "^14.1.1", "pre-commit": "^1.2.2", "prettier": "^1.15.2", "prompt": "^1.0.0", From 50911fff5774bac9eaf32d6d50f60a0fa443f840 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 12 Oct 2019 21:42:10 +0100 Subject: [PATCH 006/260] Add color to example --- demo/2-declaritive-styles.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index eaf39daffe..34d7e19e70 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -19,6 +19,7 @@ const doc = new Document({ size: 28, bold: true, italics: true, + color: "red", }, paragraph: { spacing: { From f685dbe0d1296cdda4985f72f0094974899ddd30 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 12 Oct 2019 21:46:18 +0100 Subject: [PATCH 007/260] Add lock file --- .gitignore | 1 - package-lock.json | 8452 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 8452 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 8a7c8baf67..7b65d85792 100644 --- a/.gitignore +++ b/.gitignore @@ -52,7 +52,6 @@ docs/.nojekyll .idea # Lock files -package-lock.json yarn.lock # Documents diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..90cf8f386f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8452 @@ +{ + "name": "docx", + "version": "5.0.0-rc7", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", + "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "dev": true, + "requires": { + "@babel/types": "^7.6.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } + } + }, + "@babel/parser": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", + "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==", + "dev": true + }, + "@babel/template": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", + "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.0" + } + }, + "@babel/traverse": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", + "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.3", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.6.3", + "@babel/types": "^7.6.3", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", + "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } + } + }, + "@sinonjs/commons": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", + "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + }, + "dependencies": { + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } + } + }, + "@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "@sinonjs/samsam": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.2.tgz", + "integrity": "sha512-ILO/rR8LfAb60Y1Yfp9vxfYAASK43NFC2mLzpvLUbCQY/Qu8YwReboseu8aheCEkyElZF2L2T9mHcR2bgdvZyA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.0.2", + "array-from": "^2.1.1", + "lodash": "^4.17.11" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/anymatch": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz", + "integrity": "sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==", + "dev": true + }, + "@types/bluebird": { + "version": "3.5.27", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.27.tgz", + "integrity": "sha512-6BmYWSBea18+tSjjSC3QIyV93ZKAeNWGM7R6aYt1ryTZXrlHF+QLV0G2yV0viEGVyRkyQsWfMoJ0k/YghBX5sQ==", + "dev": true + }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", + "dev": true + }, + "@types/chai": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-3.5.2.tgz", + "integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4=", + "dev": true + }, + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", + "dev": true + }, + "@types/form-data": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", + "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/fs-extra": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.1.tgz", + "integrity": "sha512-h3wnflb+jMTipvbbZnClgA2BexrT4w0GcfoCz5qyxd0IRsbqhLSyesM6mqZTAnhbVmhyTm5tuxfRu9R+8l+lGw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "dev": true, + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/handlebars": { + "version": "4.0.36", + "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.0.36.tgz", + "integrity": "sha512-LjNiTX7TY7wtuC6y3QwC93hKMuqYhgV9A1uXBKNvZtVC8ZvyWAjZkJ5BvT0K7RKqORRYRLMrqCxpw5RgS+MdrQ==", + "dev": true + }, + "@types/highlight.js": { + "version": "9.12.2", + "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.2.tgz", + "integrity": "sha512-y5x0XD/WXDaGSyiTaTcKS4FurULJtSiYbGTeQd0m2LYZGBcZZ/7fM6t5H/DzeUF+kv8y6UfmF6yJABQsHcp9VQ==", + "dev": true + }, + "@types/jszip": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.6.tgz", + "integrity": "sha512-m8uFcI+O2EupCfbEVQWsBM/4nhbegjOHL7cQgBpM95FeF98kdFJXzy9/8yhx4b3lCRl/gMBhcvyh30Qt3X+XPQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/lodash": { + "version": "4.14.104", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.104.tgz", + "integrity": "sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ==", + "dev": true + }, + "@types/marked": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.3.0.tgz", + "integrity": "sha512-CSf9YWJdX1DkTNu9zcNtdCcn6hkRtB5ILjbhRId4ZOQqx30fXmdecuaXhugQL6eyrhuXtaHJ7PHI+Vm7k9ZJjg==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/mocha": { + "version": "2.2.48", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", + "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "dev": true + }, + "@types/node": { + "version": "12.0.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz", + "integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==" + }, + "@types/request": { + "version": "2.48.1", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.1.tgz", + "integrity": "sha512-ZgEZ1TiD+KGA9LiAAPPJL68Id2UWfeSO62ijSXZjFJArVV+2pKcsVHmrcu+1oiE3q6eDGiFiSolRc4JHoerBBg==", + "dev": true, + "requires": { + "@types/caseless": "*", + "@types/form-data": "*", + "@types/node": "*", + "@types/tough-cookie": "*" + } + }, + "@types/request-promise": { + "version": "4.1.44", + "resolved": "https://registry.npmjs.org/@types/request-promise/-/request-promise-4.1.44.tgz", + "integrity": "sha512-RId7eFsUKxfal1LirDDIcOp9u3MM3NXFDBcC3sqIMcmu7f4U6DsCEMD8RbLZtnPrQlN5Jc79di/WPsIEDO4keg==", + "dev": true, + "requires": { + "@types/bluebird": "*", + "@types/request": "*" + } + }, + "@types/shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha512-M2giRw93PxKS7YjU6GZjtdV9HASdB7TWqizBXe4Ju7AqbKlWvTr0gNO92XH56D/gMxqD/jNHLNfC5hA34yGqrQ==", + "dev": true, + "requires": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "@types/sinon": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-4.3.3.tgz", + "integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", + "dev": true + }, + "@types/tapable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", + "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", + "dev": true + }, + "@types/tough-cookie": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.5.tgz", + "integrity": "sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==", + "dev": true + }, + "@types/uglify-js": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz", + "integrity": "sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "@types/webpack": { + "version": "4.4.34", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.34.tgz", + "integrity": "sha512-GnEBgjHsfO1M7DIQ0dAupSofcmDItE3Zsu3reK8SQpl/6N0rtUQxUmQzVFAS5ou/FGjsYKjXAWfItLZ0kNFTfQ==", + "dev": true, + "requires": { + "@types/anymatch": "*", + "@types/node": "*", + "@types/tapable": "*", + "@types/uglify-js": "*", + "source-map": "^0.6.0" + } + }, + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "dev": true, + "requires": { + "acorn": "^4.0.3" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "^2.0.0" + } + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "awesome-typescript-loader": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-3.5.0.tgz", + "integrity": "sha512-qzgm9SEvodVkSi9QY7Me1/rujg+YBNMjayNSAyzNghwTEez++gXoPCwMvpbHRG7wrOkDCiF6dquvv9ESmUBAuw==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "enhanced-resolve": "3.3.0", + "loader-utils": "^1.1.0", + "lodash": "^4.17.4", + "micromatch": "^3.0.3", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.3" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-polyfill": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", + "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "core-js": "^2.4.0", + "regenerator-runtime": "^0.10.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bluebird": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caching-transform": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", + "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "dev": true, + "requires": { + "assertion-error": "^1.0.1", + "deep-eql": "^0.1.3", + "type-detect": "^1.0.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "clipboard": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", + "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "dev": true, + "optional": true, + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + } + }, + "connect-livereload": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.1.tgz", + "integrity": "sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g==", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cp-file": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-4.2.0.tgz", + "integrity": "sha1-cVNhZjtx7eC23dvDyA4roC5yXsM=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^2.3.0", + "safe-buffer": "^5.0.1" + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", + "dev": true + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "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" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + } + } + }, + "deep-equal": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", + "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=", + "dev": true + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "dev": true, + "optional": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "docsify": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.9.4.tgz", + "integrity": "sha512-Xtm6sfrNU7cqOViWMewDhscn0cySF60q2KTKok9OaPmzt6nRkTAIvYU4dj916IT21o/b336Or3vO2hsvmaQzxg==", + "dev": true, + "requires": { + "marked": "^0.5.1", + "medium-zoom": "^0.4.0", + "opencollective": "^1.0.3", + "prismjs": "^1.15.0", + "tinydate": "^1.0.0", + "tweezer.js": "^1.4.0" + } + }, + "docsify-cli": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/docsify-cli/-/docsify-cli-4.3.0.tgz", + "integrity": "sha512-88O1sMeoZv4lb5GPSJzDtOAv2KzBjpQaSqVlVqY+6hGJfb2wpz9PvlUhvlgPq54zu4kPDeCCyUYgqa/llhKg3w==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "connect": "^3.6.0", + "connect-livereload": "^0.6.0", + "cp-file": "^4.1.1", + "docsify": ">=3", + "docsify-server-renderer": ">=4", + "fs-extra": "^2.1.2", + "livereload": "^0.7.0", + "lru-cache": "^4.1.1", + "opn": "^5.3.0", + "serve-static": "^1.12.1", + "update-notifier": "^2.1.0", + "y18n": "^3.2.1", + "yargonaut": "^1.1.2", + "yargs": "^7.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "fs-extra": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "docsify-server-renderer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.9.1.tgz", + "integrity": "sha512-JERMD3yEJq38nSim/o1VGBoyqxsRo1VRscafpkx3mT7g07orOg5UARUgztKQNmv+0xnkWsmu+BMr9nsurXmBMQ==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "docsify": "^4.8.0", + "node-fetch": "^1.7.0", + "resolve-pathname": "^2.1.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "elliptic": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", + "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz", + "integrity": "sha512-2qbxE7ek3YxPJ1ML6V+satHkzHpJQKWkRHmRx6mfAoW59yP8YH8BFplbegSP+u2hBd6B6KCOpvJQ3dZAP+hkpg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.5" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.50", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", + "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "^1.0.0" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "figlet": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.2.3.tgz", + "integrity": "sha512-+F5zdvZ66j77b8x2KCPvWUHC0UCKUMWrewxmewgPlagp3wmDpcrHMbyv/ygq/6xoxBPGQA+UJU3SMoBzKoROQQ==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true, + "optional": true + } + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "^1.3.4" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "dev": true, + "optional": true, + "requires": { + "delegate": "^3.1.2" + } + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "handlebars": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.1.tgz", + "integrity": "sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "highlight.js": { + "version": "9.15.8", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.8.tgz", + "integrity": "sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "i": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", + "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", + "integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "chalk": "^1.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.1", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx": "^4.1.0", + "string-width": "^2.0.0", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "requires": { + "ci-info": "^1.5.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + } + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-instrumenter-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", + "dev": true, + "requires": { + "convert-source-map": "^1.5.0", + "istanbul-lib-instrument": "^1.7.3", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", + "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", + "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", + "dev": true, + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.1", + "semver": "^5.3.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", + "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "dev": true, + "requires": { + "handlebars": "^4.1.2" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "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": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jszip": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", + "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + } + }, + "just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "^4.0.0" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } + }, + "livereload": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.7.0.tgz", + "integrity": "sha512-PHnIGczQEvmCctDvRTWylA+1wSwE0/eFm+LkNhlmlAFus/aCRlVE97UOLOf6TUGLmZyfg7z7twG37ZiOgNJAyQ==", + "dev": true, + "requires": { + "chokidar": "^1.7.0", + "opts": ">= 1.2.0", + "ws": "^1.1.5" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lolex": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", + "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "marked": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.5.2.tgz", + "integrity": "sha512-fdZvBa7/vSQIZCi4uuwo2N3q+7jJURpMVCcbaX0S1Mg65WZ5ilXvC67MviJAsdjqqgD+CEq4RKo5AYGgINkVAA==", + "dev": true + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "medium-zoom": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-0.4.0.tgz", + "integrity": "sha512-0z7yMfd6I1BTCAa8QaR4cp5AqDkQD571GzhHIbbfefKEssGLSvs+4Xai/itOAncm4FBlF5gUoMQ22yW9/f8Sig==", + "dev": true + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + } + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "dev": true + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "dev": true, + "requires": { + "mime-db": "1.40.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "mocha-webpack": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mocha-webpack/-/mocha-webpack-1.1.0.tgz", + "integrity": "sha512-brmE0tR6G5JbEzZXspJmF/uZm2J/YM/69M3VS6ND76i6wXbebFpE+bQDaehilK8CZanNSsTCcqTTLh1PZuRKJw==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "chalk": "^2.3.0", + "chokidar": "^1.6.1", + "glob-parent": "^3.1.0", + "globby": "^6.1.0", + "interpret": "^1.0.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "lodash": "^4.3.0", + "memory-fs": "^0.4.1", + "nodent-runtime": "^3.0.3", + "normalize-path": "^2.0.1", + "progress": "^2.0.0", + "source-map-support": "^0.5.0", + "strip-ansi": "^4.0.0", + "toposort": "^1.0.0", + "yargs": "^4.8.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "ncp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz", + "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "nested-error-stacks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", + "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nise": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.0.tgz", + "integrity": "sha512-Z3sfYEkLFzFmL8KY6xnSJLRxwQwYBjOXi/24lb62ZnZiGA0JUzGGTI6TBIgfCSMIDl9Jlu8SRmHNACLTemDHww==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^3.1.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^4.1.0", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "@sinonjs/formatio": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", + "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "lolex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.1.0.tgz", + "integrity": "sha512-BYxIEXiVq5lGIXeVHnsFzqa1TxN5acnKnPCdlZSpzm8viNEOhiigupA4vTQ9HEFQ6nLTQ9wQOgBknJgzUYQ9Aw==", + "dev": true + } + } + }, + "node-fetch": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", + "integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "nodent-runtime": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz", + "integrity": "sha512-7Ws63oC+215smeKJQCxzrK21VFVlCFBkwl0MOObt0HOpVQXs3u483sAmtkF33nNqZ5rSOQjB76fgyPBmAUrtCA==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nyc": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", + "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "caching-transform": "^3.0.2", + "convert-source-map": "^1.6.0", + "cp-file": "^6.2.0", + "find-cache-dir": "^2.1.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.2.3", + "uuid": "^3.3.2", + "yargs": "^13.2.2", + "yargs-parser": "^13.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "make-dir": "^2.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^4.0.1", + "safe-buffer": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "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 + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "requires": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "opencollective": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", + "integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=", + "dev": true, + "requires": { + "babel-polyfill": "6.23.0", + "chalk": "1.1.3", + "inquirer": "3.0.6", + "minimist": "1.2.0", + "node-fetch": "1.6.3", + "opn": "4.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "opn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", + "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } + } + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "dev": true + }, + "opts": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.6.tgz", + "integrity": "sha1-0YXAQlz9652h0YKQi2W1wCOP67M=", + "dev": true + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, + "pako": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + }, + "parent-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz", + "integrity": "sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc=", + "dev": true + }, + "parse-asn1": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + } + } + }, + "pkginfo": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", + "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "pre-commit": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", + "integrity": "sha1-287g7p3nI15X95xW186UZBpp7sY=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "spawn-sync": "^1.0.15", + "which": "1.2.x" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "prettier": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", + "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", + "dev": true + }, + "prismjs": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.16.0.tgz", + "integrity": "sha512-OA4MKxjFZHSvZcisLGe14THYsug/nF6O1f0pAJc0KN0wTyAcLqmsbE+lTGKSpyh+9pEW57+k6pg2AfYR+coyHA==", + "dev": true, + "requires": { + "clipboard": "^2.0.0" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "prompt": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.0.0.tgz", + "integrity": "sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4=", + "dev": true, + "requires": { + "colors": "^1.1.2", + "pkginfo": "0.x.x", + "read": "1.0.x", + "revalidator": "0.1.x", + "utile": "0.3.x", + "winston": "2.1.x" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz", + "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "registry-auth-token": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", + "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-in-file": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-3.4.4.tgz", + "integrity": "sha512-ehq0dFsxSpfPiPLBU5kli38Ud8bZL0CQKG8WQVbvhmyilXaMJ8y4LtDZs/K3MD8C0+rHbsfW8c9r2bUEy0B/6Q==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "glob": "^7.1.3", + "yargs": "^13.2.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "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 + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.2.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", + "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "request-promise": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.4.tgz", + "integrity": "sha512-8wgMrvE546PzbR5WbYxUQogUnUDfM0S7QIFZMID+J73vdFARkFy+HElj4T+MWYhpXwlLp0EQ8Zoj8xUA0he4Vg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.2", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, + "request-promise-core": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", + "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-pathname": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", + "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "revalidator": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + } + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sinon": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-5.1.1.tgz", + "integrity": "sha512-h/3uHscbt5pQNxkf7Y/Lb9/OM44YNCicHakcq73ncbrIS8lXg+ZGOZbtuU+/km4YnyiCYfQQEwANaReJz7KDfw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.5.0", + "lodash.get": "^4.4.2", + "lolex": "^2.4.2", + "nise": "^1.3.3", + "supports-color": "^5.4.0", + "type-detect": "^4.0.8" + }, + "dependencies": { + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "dev": true, + "requires": { + "concat-stream": "^1.4.7", + "os-shim": "^0.1.2" + } + }, + "spawn-wrap": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", + "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", + "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tapable": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz", + "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==", + "dev": true + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "^0.7.0" + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + } + } + }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "dev": true, + "optional": true + }, + "tinydate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.1.0.tgz", + "integrity": "sha512-YF6YTOyBRHX4b3EtEI0W/mROcv82Gt6VccmVuSAkRV3FNORug2457wSGvT2cThbfuctQvVSmC5GobGheScxtIw==", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, + "tslint": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", + "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + } + }, + "tslint-immutable": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/tslint-immutable/-/tslint-immutable-4.9.1.tgz", + "integrity": "sha512-iIFCq08H4YyNIX0bV5N6fGQtAmjc4OQZKQCgBP5WHgQaITyGAHPVmAw+Yf7qe0zbRCvCDZdrdEC/191fLGFiww==", + "dev": true + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "tweezer.js": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/tweezer.js/-/tweezer.js-1.5.0.tgz", + "integrity": "sha512-aSiJz7rGWNAQq7hjMK9ZYDuEawXupcCWgl3woQQSoDP2Oh8O4srWb/uO1PzzHIsrPEOqrjJ2sUb9FERfzuBabQ==", + "dev": true + }, + "type": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz", + "integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw==", + "dev": true + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typedoc": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.11.1.tgz", + "integrity": "sha512-jdNIoHm5wkZqxQTe/g9AQ3LKnZyrzHXqu6A/c9GUOeJyBWLxNr7/Dm3rwFvLksuxRNwTvY/0HRDU9sJTa9WQSg==", + "dev": true, + "requires": { + "@types/fs-extra": "5.0.1", + "@types/handlebars": "4.0.36", + "@types/highlight.js": "9.12.2", + "@types/lodash": "4.14.104", + "@types/marked": "0.3.0", + "@types/minimatch": "3.0.3", + "@types/shelljs": "0.7.8", + "fs-extra": "^5.0.0", + "handlebars": "^4.0.6", + "highlight.js": "^9.0.0", + "lodash": "^4.17.5", + "marked": "^0.3.17", + "minimatch": "^3.0.0", + "progress": "^2.0.0", + "shelljs": "^0.8.1", + "typedoc-default-themes": "^0.5.0", + "typescript": "2.7.2" + }, + "dependencies": { + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "dev": true + }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "typescript": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", + "dev": true + } + } + }, + "typedoc-default-themes": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz", + "integrity": "sha1-bcJDPnjti+qOiHo6zeLzF4W9Yic=", + "dev": true + }, + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + }, + "uglify-js": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true, + "optional": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "dev": true, + "requires": { + "source-map": "^0.5.6", + "uglify-js": "^2.8.29", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "^1.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "upath": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "dev": true + }, + "update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "dev": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utile": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/utile/-/utile-0.3.0.tgz", + "integrity": "sha1-E1LDQOuCDk2N26A5pPv6oy7U7zo=", + "dev": true, + "requires": { + "async": "~0.9.0", + "deep-equal": "~0.2.1", + "i": "0.3.x", + "mkdirp": "0.x.x", + "ncp": "1.0.x", + "rimraf": "2.x.x" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", + "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", + "dev": true + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "chokidar": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "webpack": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", + "integrity": "sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "acorn-dynamic-import": "^2.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "async": "^2.1.2", + "enhanced-resolve": "^3.4.0", + "escope": "^3.6.0", + "interpret": "^1.0.0", + "json-loader": "^0.5.4", + "json5": "^0.5.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "mkdirp": "~0.5.0", + "node-libs-browser": "^2.0.0", + "source-map": "^0.5.3", + "supports-color": "^4.2.1", + "tapable": "^0.2.7", + "uglifyjs-webpack-plugin": "^0.4.6", + "watchpack": "^1.4.0", + "webpack-sources": "^1.0.1", + "yargs": "^8.0.2" + }, + "dependencies": { + "ajv": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.1.tgz", + "integrity": "sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.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": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "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": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-sources": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "widest-line": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", + "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "dev": true, + "requires": { + "string-width": "^2.1.1" + } + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, + "winston": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz", + "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=", + "dev": true, + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "pkginfo": "0.3.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", + "dev": true + } + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "ws": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", + "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "dev": true, + "requires": { + "options": ">=0.0.5", + "ultron": "1.0.x" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=" + }, + "xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "requires": { + "sax": "^1.2.4" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargonaut": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz", + "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "figlet": "^1.1.1", + "parent-require": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "dev": true, + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true + } + } +} From 75cdae1473a45d51f065a5e36b546389055153cb Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 12 Oct 2019 22:16:36 +0100 Subject: [PATCH 008/260] Put docx in a seperate namespace in the browser version rather than the global namespace --- demo/browser-demo.html | 12 ++++++------ webpack.config.ts | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/demo/browser-demo.html b/demo/browser-demo.html index 22c7c821a5..82f064deb2 100644 --- a/demo/browser-demo.html +++ b/demo/browser-demo.html @@ -12,18 +12,18 @@ + From 250a1de71e151e59f3e2499c8a4d16869533cbd9 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 23 Apr 2020 11:50:56 +0100 Subject: [PATCH 067/260] Disable e2e temporarily --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3bf1b47690..d27f452f86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ script: - npm run style - npm run build - npm run ts-node -- ./demo/1-basic.ts - - npm run e2e "My Document.docx" +# - npm run e2e "My Document.docx" - npm run ts-node -- ./demo/2-declaritive-styles.ts - npm run ts-node -- ./demo/3-numbering-and-bullet-points.ts - npm run ts-node -- ./demo/4-basic-table.ts @@ -20,7 +20,7 @@ script: - npm run ts-node -- ./demo/8-header-footer.ts - npm run ts-node -- ./demo/9-images-in-header-and-footer.ts - npm run ts-node -- ./demo/10-my-cv.ts - - npm run e2e "My Document.docx" +# - npm run e2e "My Document.docx" - npm run ts-node -- ./demo/11-declaritive-styles-2.ts - npm run ts-node -- ./demo/12-scaling-images.ts - npm run ts-node -- ./demo/13-xml-styles.ts From faefbae3a14fcd6f4ef22a51079a2ddef27a7345 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Wed, 6 May 2020 02:13:25 +0100 Subject: [PATCH 068/260] Add Japanese example --- demo/52-japanese.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 demo/52-japanese.ts diff --git a/demo/52-japanese.ts b/demo/52-japanese.ts new file mode 100644 index 0000000000..5339c4b3a9 --- /dev/null +++ b/demo/52-japanese.ts @@ -0,0 +1,37 @@ +// Japanese text - Need to use a Japanese font +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, HeadingLevel, Packer, Paragraph } from "../build"; + +const doc = new Document({ + styles: { + paragraphStyles: [ + { + id: "Normal", + name: "Normal", + basedOn: "Normal", + next: "Normal", + quickFormat: true, + run: { + font: "MS Gothic", + }, + }, + ], + }, +}); + +doc.addSection({ + children: [ + new Paragraph({ + text: "KFCを食べるのが好き", + heading: HeadingLevel.HEADING_1, + }), + new Paragraph({ + text: "こんにちは", + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); From 0ebdcc30edba98b990e2bd7fb2b3a76a7ce2822a Mon Sep 17 00:00:00 2001 From: adrielstar Date: Thu, 7 May 2020 11:49:42 +0200 Subject: [PATCH 069/260] Update numbering.ts --- src/file/numbering/numbering.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index b8747991d0..4c0d299fb6 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -147,6 +147,17 @@ export class Numbering extends XmlComponent { }, }, }, + { + level: 9, + format: "bullet", + text: "\u2726", + alignment: AlignmentType.LEFT, + style: { + paragraph: { + indent: { left: 720, hanging: 360 }, + }, + }, + }, ]); this.createConcreteNumbering(abstractNumbering); From 25a7ce37428c2df5d4f47603994a350258f7d343 Mon Sep 17 00:00:00 2001 From: bs595r Date: Sun, 10 May 2020 10:36:25 -0700 Subject: [PATCH 070/260] adds textDirection to table cells --- demo/31-tables.ts | 26 +++++++++++++++- .../table/table-cell/table-cell-components.ts | 25 ++++++++++++++++ .../table/table-cell/table-cell-properties.ts | 8 +++++ src/file/table/table-cell/table-cell.spec.ts | 30 ++++++++++++++++++- src/file/table/table-cell/table-cell.ts | 7 ++++- 5 files changed, 93 insertions(+), 3 deletions(-) diff --git a/demo/31-tables.ts b/demo/31-tables.ts index 7daec1506d..601e216c49 100644 --- a/demo/31-tables.ts +++ b/demo/31-tables.ts @@ -1,7 +1,7 @@ // Example of how you would create a table and add data to it // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, HeadingLevel, Packer, Paragraph, Table, TableCell, TableRow, VerticalAlign } from "../build"; +import { Document, HeadingLevel, Packer, Paragraph, Table, TableCell, TableRow, VerticalAlign, TextDirection } from "../build"; const doc = new Document(); @@ -17,6 +17,14 @@ const table = new Table({ children: [new Paragraph({}), new Paragraph({})], verticalAlign: VerticalAlign.CENTER, }), + new TableCell({ + children: [new Paragraph({text: "bottom to top"}), new Paragraph({})], + textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT + }), + new TableCell({ + children: [new Paragraph({text: "top to bottom"}), new Paragraph({})], + textDirection: TextDirection.TOPTOBOTTOMRIGHTTOLEFT + }), ], }), new TableRow({ @@ -38,6 +46,22 @@ const table = new Table({ ], verticalAlign: VerticalAlign.CENTER, }), + new TableCell({ + children: [ + new Paragraph({ + text: "Text above should be vertical from bottom to top", + }), + ], + verticalAlign: VerticalAlign.CENTER, + }), + new TableCell({ + children: [ + new Paragraph({ + text: "Text above should be vertical from top to bottom", + }), + ], + verticalAlign: VerticalAlign.CENTER, + }), ], }), ], diff --git a/src/file/table/table-cell/table-cell-components.ts b/src/file/table/table-cell/table-cell-components.ts index e16c2f6885..0afe1cd291 100644 --- a/src/file/table/table-cell/table-cell-components.ts +++ b/src/file/table/table-cell/table-cell-components.ts @@ -158,6 +158,31 @@ export class VAlign extends XmlComponent { } } +export enum TextDirection { + BOTTOMTOTOPLEFTTORIGHT = "btLr", + LEFTTORIGHTTOPTOBOTTOM = "lrTb", + TOPTOBOTTOMRIGHTTOLEFT = "tbRl", +} + +class TDirectionAttributes extends XmlAttributeComponent<{ readonly val: TextDirection }> { + protected readonly xmlKeys = { val: "w:val" }; +} + +/** + * Text Direction within a table cell + */ +export class TDirection extends XmlComponent { + constructor(value: TextDirection) { + super("w:textDirection"); + + this.root.push( + new TDirectionAttributes({ + val: value, + }), + ); + } +} + export enum WidthType { /** Auto. */ AUTO = "auto", diff --git a/src/file/table/table-cell/table-cell-properties.ts b/src/file/table/table-cell/table-cell-properties.ts index aed56aaeda..e248290294 100644 --- a/src/file/table/table-cell/table-cell-properties.ts +++ b/src/file/table/table-cell/table-cell-properties.ts @@ -6,6 +6,8 @@ import { GridSpan, TableCellBorders, TableCellWidth, + TDirection, + TextDirection, VAlign, VerticalAlign, VerticalMerge, @@ -61,4 +63,10 @@ export class TableCellProperties extends IgnoreIfEmptyXmlComponent { return this; } + + public setTextDirection(type: TextDirection): TableCellProperties { + this.root.push(new TDirection(type)); + + return this; + } } diff --git a/src/file/table/table-cell/table-cell.spec.ts b/src/file/table/table-cell/table-cell.spec.ts index a4c316f7ba..b22538978b 100644 --- a/src/file/table/table-cell/table-cell.spec.ts +++ b/src/file/table/table-cell/table-cell.spec.ts @@ -5,7 +5,7 @@ import { BorderStyle } from "file/styles"; import { ShadingType } from "../shading"; import { TableCell } from "./table-cell"; -import { TableCellBorders, TableCellWidth, VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components"; +import { TableCellBorders, TableCellWidth, TextDirection, VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components"; describe("TableCellBorders", () => { describe("#prepForXml", () => { @@ -271,6 +271,34 @@ describe("TableCell", () => { }); }); + it("should create with text direction", () => { + const cell = new TableCell({ + children: [], + textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT, + }); + + const tree = new Formatter().format(cell); + + expect(tree).to.deep.equal({ + "w:tc": [ + { + "w:tcPr": [ + { + "w:textDirection": { + _attr: { + "w:val": "btLr", + }, + }, + }, + ], + }, + { + "w:p": {}, + }, + ], + }); + }); + it("should create with vertical merge", () => { const cell = new TableCell({ children: [], diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index fe8f8b5868..c809c157ad 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -7,13 +7,14 @@ import { File } from "../../file"; import { ITableShadingAttributesProperties } from "../shading"; import { Table } from "../table"; import { ITableCellMarginOptions } from "./cell-margin/table-cell-margins"; -import { VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components"; +import { TextDirection, VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components"; import { TableCellProperties } from "./table-cell-properties"; export interface ITableCellOptions { readonly shading?: ITableShadingAttributesProperties; readonly margins?: ITableCellMarginOptions; readonly verticalAlign?: VerticalAlign; + readonly textDirection?: TextDirection; readonly verticalMerge?: VerticalMergeType; readonly width?: { readonly size: number | string; @@ -63,6 +64,10 @@ export class TableCell extends XmlComponent { this.properties.setVerticalAlign(options.verticalAlign); } + if (options.textDirection) { + this.properties.setTextDirection(options.textDirection); + } + if (options.verticalMerge) { this.properties.addVerticalMerge(options.verticalMerge); } From b4f1c4dd6a56d64cfa155970a495a6b7451c15fe Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Wed, 13 May 2020 02:51:47 +0100 Subject: [PATCH 071/260] Increase readability for enums --- demo/31-tables.ts | 8 ++++---- src/file/table/table-cell/table-cell-components.ts | 6 +++--- src/file/table/table-cell/table-cell.spec.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/demo/31-tables.ts b/demo/31-tables.ts index 601e216c49..24fc6030f8 100644 --- a/demo/31-tables.ts +++ b/demo/31-tables.ts @@ -18,12 +18,12 @@ const table = new Table({ verticalAlign: VerticalAlign.CENTER, }), new TableCell({ - children: [new Paragraph({text: "bottom to top"}), new Paragraph({})], - textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT + children: [new Paragraph({ text: "bottom to top" }), new Paragraph({})], + textDirection: TextDirection.BOTTOM_TO_TOP_LEFT_TO_RIGHT, }), new TableCell({ - children: [new Paragraph({text: "top to bottom"}), new Paragraph({})], - textDirection: TextDirection.TOPTOBOTTOMRIGHTTOLEFT + children: [new Paragraph({ text: "top to bottom" }), new Paragraph({})], + textDirection: TextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT, }), ], }), diff --git a/src/file/table/table-cell/table-cell-components.ts b/src/file/table/table-cell/table-cell-components.ts index 0afe1cd291..f3ebe570e9 100644 --- a/src/file/table/table-cell/table-cell-components.ts +++ b/src/file/table/table-cell/table-cell-components.ts @@ -159,9 +159,9 @@ export class VAlign extends XmlComponent { } export enum TextDirection { - BOTTOMTOTOPLEFTTORIGHT = "btLr", - LEFTTORIGHTTOPTOBOTTOM = "lrTb", - TOPTOBOTTOMRIGHTTOLEFT = "tbRl", + BOTTOM_TO_TOP_LEFT_TO_RIGHT = "btLr", + LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb", + TOP_TO_BOTTOM_RIGHT_TO_LEFT = "tbRl", } class TDirectionAttributes extends XmlAttributeComponent<{ readonly val: TextDirection }> { diff --git a/src/file/table/table-cell/table-cell.spec.ts b/src/file/table/table-cell/table-cell.spec.ts index b22538978b..2ba34bc9d4 100644 --- a/src/file/table/table-cell/table-cell.spec.ts +++ b/src/file/table/table-cell/table-cell.spec.ts @@ -274,7 +274,7 @@ describe("TableCell", () => { it("should create with text direction", () => { const cell = new TableCell({ children: [], - textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT, + textDirection: TextDirection.BOTTOM_TO_TOP_LEFT_TO_RIGHT, }); const tree = new Formatter().format(cell); From 2654799822493edbe4b96af544f6d51c79381f9a Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 19 May 2020 19:24:29 +0100 Subject: [PATCH 072/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05e824f186..bea66bd3a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.0.2", + "version": "5.1.0", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From 120c3a7bbef10736ed37e5eb806e1975e52a50be Mon Sep 17 00:00:00 2001 From: wangfengming Date: Fri, 22 May 2020 12:22:45 +0800 Subject: [PATCH 073/260] :feat: support emphasis mark --- package-lock.json | 2 +- src/file/numbering/abstract-numbering.spec.ts | 55 +++++++- src/file/numbering/level.ts | 4 + src/file/paragraph/run/emphasis-mark.spec.ts | 29 ++++ src/file/paragraph/run/emphasis-mark.ts | 28 ++++ src/file/paragraph/run/formatting.ts | 2 + src/file/paragraph/run/index.ts | 1 + src/file/paragraph/run/run.spec.ts | 36 ++++- src/file/paragraph/run/run.ts | 8 ++ src/file/paragraph/run/symbol-run.spec.ts | 6 + src/file/styles/style-options.ts | 5 +- src/file/styles/style/character-style.spec.ts | 73 +++++++++- src/file/styles/style/character-style.ts | 8 ++ src/file/styles/style/paragraph-style.spec.ts | 125 ++++++++++++++++-- src/file/styles/style/paragraph-style.ts | 4 + 15 files changed, 371 insertions(+), 15 deletions(-) create mode 100644 src/file/paragraph/run/emphasis-mark.spec.ts create mode 100644 src/file/paragraph/run/emphasis-mark.ts diff --git a/package-lock.json b/package-lock.json index f0226f8dc5..f149d49335 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.0.2", + "version": "5.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index 59655aa40e..a2fb61b000 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -3,7 +3,7 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; import { EMPTY_OBJECT } from "file/xml-components"; -import { AlignmentType, TabStopPosition } from "../paragraph"; +import { AlignmentType, EmphasisMarkType, TabStopPosition } from "../paragraph"; import { UnderlineType } from "../paragraph/run/underline"; import { ShadingType } from "../table"; import { AbstractNumbering } from "./abstract-numbering"; @@ -433,7 +433,16 @@ describe("AbstractNumbering", () => { const tree = new Formatter().format(abstractNumbering); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:rPr": [ - { "w:rFonts": { _attr: { "w:ascii": "Times", "w:cs": "Times", "w:eastAsia": "Times", "w:hAnsi": "Times" } } }, + { + "w:rFonts": { + _attr: { + "w:ascii": "Times", + "w:cs": "Times", + "w:eastAsia": "Times", + "w:hAnsi": "Times", + }, + }, + }, ], }); }); @@ -582,6 +591,48 @@ describe("AbstractNumbering", () => { }); }); + describe("#emphasisMark", () => { + it("should set emphasisMark to 'dot' if no arguments are given", () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { + emphasisMark: {}, + }, + }, + }, + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ + "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }], + }); + }); + + it("should set the style if given", () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { + emphasisMark: { + type: EmphasisMarkType.DOT, + }, + }, + }, + }, + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ + "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }], + }); + }); + }); + it("#color", () => { const abstractNumbering = new AbstractNumbering(1, [ { diff --git a/src/file/numbering/level.ts b/src/file/numbering/level.ts index cbef58dfc0..ddef2b2d78 100644 --- a/src/file/numbering/level.ts +++ b/src/file/numbering/level.ts @@ -177,6 +177,10 @@ export class LevelBase extends XmlComponent { this.runProperties.push(new formatting.Underline(style.run.underline.type, style.run.underline.color)); } + if (style.run.emphasisMark) { + this.runProperties.push(new formatting.EmphasisMark(style.run.emphasisMark.type)); + } + if (style.run.color) { this.runProperties.push(new formatting.Color(style.run.color)); } diff --git a/src/file/paragraph/run/emphasis-mark.spec.ts b/src/file/paragraph/run/emphasis-mark.spec.ts new file mode 100644 index 0000000000..4ad4878f64 --- /dev/null +++ b/src/file/paragraph/run/emphasis-mark.spec.ts @@ -0,0 +1,29 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import * as em from "./emphasis-mark"; + +describe("EmphasisMark", () => { + describe("#constructor()", () => { + it("should create a new EmphasisMark object with w:em as the rootKey", () => { + const emphasisMark = new em.EmphasisMark(); + const tree = new Formatter().format(emphasisMark); + expect(tree).to.deep.equal({ + "w:em": { _attr: { "w:val": "dot" } }, + }); + }); + }); +}); + +describe("DotEmphasisMark", () => { + describe("#constructor()", () => { + it("should put value in attribute", () => { + const emphasisMark = new em.DotEmphasisMark(); + const tree = new Formatter().format(emphasisMark); + expect(tree).to.deep.equal({ + "w:em": { _attr: { "w:val": "dot" } }, + }); + }); + }); +}); diff --git a/src/file/paragraph/run/emphasis-mark.ts b/src/file/paragraph/run/emphasis-mark.ts new file mode 100644 index 0000000000..b8af756072 --- /dev/null +++ b/src/file/paragraph/run/emphasis-mark.ts @@ -0,0 +1,28 @@ +import { Attributes, XmlComponent } from "file/xml-components"; + +export enum EmphasisMarkType { + DOT = "dot", +} + +export abstract class BaseEmphasisMark extends XmlComponent { + protected constructor(emphasisMarkType: EmphasisMarkType) { + super("w:em"); + this.root.push( + new Attributes({ + val: emphasisMarkType, + }), + ); + } +} + +export class EmphasisMark extends BaseEmphasisMark { + constructor(emphasisMarkType: EmphasisMarkType = EmphasisMarkType.DOT) { + super(emphasisMarkType); + } +} + +export class DotEmphasisMark extends BaseEmphasisMark { + constructor() { + super(EmphasisMarkType.DOT); + } +} diff --git a/src/file/paragraph/run/formatting.ts b/src/file/paragraph/run/formatting.ts index 549f2ae552..3055ba44e7 100644 --- a/src/file/paragraph/run/formatting.ts +++ b/src/file/paragraph/run/formatting.ts @@ -1,5 +1,7 @@ import { Attributes, XmlComponent } from "file/xml-components"; + export { Underline } from "./underline"; +export { EmphasisMark } from "./emphasis-mark"; export { SubScript, SuperScript } from "./script"; export { RunFonts } from "./run-fonts"; diff --git a/src/file/paragraph/run/index.ts b/src/file/paragraph/run/index.ts index 21df415f35..745e33ea5a 100644 --- a/src/file/paragraph/run/index.ts +++ b/src/file/paragraph/run/index.ts @@ -5,4 +5,5 @@ export * from "./picture-run"; export * from "./run-fonts"; export * from "./sequential-identifier"; export * from "./underline"; +export * from "./emphasis-mark"; export * from "./tab"; diff --git a/src/file/paragraph/run/run.spec.ts b/src/file/paragraph/run/run.spec.ts index b5febf199e..8712622921 100644 --- a/src/file/paragraph/run/run.spec.ts +++ b/src/file/paragraph/run/run.spec.ts @@ -5,6 +5,7 @@ import { Formatter } from "export/formatter"; import { ShadingType } from "file/table"; import { Run } from "./"; +import { EmphasisMarkType } from "./emphasis-mark"; import { PageNumber } from "./run"; import { UnderlineType } from "./underline"; @@ -84,6 +85,30 @@ describe("Run", () => { }); }); + describe("#emphasisMark()", () => { + it("should default to 'dot'", () => { + const run = new Run({ + emphasisMark: {}, + }); + const tree = new Formatter().format(run); + expect(tree).to.deep.equal({ + "w:r": [{ "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }] }], + }); + }); + + it("should set the style type if given", () => { + const run = new Run({ + emphasisMark: { + type: EmphasisMarkType.DOT, + }, + }); + const tree = new Formatter().format(run); + expect(tree).to.deep.equal({ + "w:r": [{ "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }] }], + }); + }); + }); + describe("#smallCaps()", () => { it("it should add smallCaps to the properties", () => { const run = new Run({ @@ -235,7 +260,16 @@ describe("Run", () => { "w:r": [ { "w:rPr": [ - { "w:rFonts": { _attr: { "w:ascii": "Times", "w:cs": "Times", "w:eastAsia": "Times", "w:hAnsi": "Times" } } }, + { + "w:rFonts": { + _attr: { + "w:ascii": "Times", + "w:cs": "Times", + "w:eastAsia": "Times", + "w:hAnsi": "Times", + }, + }, + }, ], }, ], diff --git a/src/file/paragraph/run/run.ts b/src/file/paragraph/run/run.ts index 20777b72a2..8225ebdc95 100644 --- a/src/file/paragraph/run/run.ts +++ b/src/file/paragraph/run/run.ts @@ -6,6 +6,7 @@ import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run" import { FieldInstruction } from "file/table-of-contents/field-instruction"; import { Break } from "./break"; import { Caps, SmallCaps } from "./caps"; +import { EmphasisMark, EmphasisMarkType } from "./emphasis-mark"; import { Begin, End, Separate } from "./field"; import { Bold, @@ -38,6 +39,9 @@ export interface IRunOptions { readonly color?: string; readonly type?: UnderlineType; }; + readonly emphasisMark?: { + readonly type?: EmphasisMarkType; + }; readonly color?: string; readonly size?: number; readonly rightToLeft?: boolean; @@ -90,6 +94,10 @@ export class Run extends XmlComponent { this.properties.push(new Underline(options.underline.type, options.underline.color)); } + if (options.emphasisMark) { + this.properties.push(new EmphasisMark(options.emphasisMark.type)); + } + if (options.color) { this.properties.push(new Color(options.color)); } diff --git a/src/file/paragraph/run/symbol-run.spec.ts b/src/file/paragraph/run/symbol-run.spec.ts index f3faee8bb0..c41e6e1d51 100644 --- a/src/file/paragraph/run/symbol-run.spec.ts +++ b/src/file/paragraph/run/symbol-run.spec.ts @@ -1,5 +1,7 @@ import { expect } from "chai"; +import { EmphasisMarkType } from "./emphasis-mark"; + import { Formatter } from "export/formatter"; import { UnderlineType } from "./underline"; @@ -44,6 +46,9 @@ describe("SymbolRun", () => { color: "red", type: UnderlineType.DOUBLE, }, + emphasisMark: { + type: EmphasisMarkType.DOT, + }, color: "green", size: 40, highlight: "yellow", @@ -59,6 +64,7 @@ describe("SymbolRun", () => { { "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }, { "w:u": { _attr: { "w:val": "double", "w:color": "red" } } }, + { "w:em": { _attr: { "w:val": "dot" } } }, { "w:color": { _attr: { "w:val": "green" } } }, { "w:sz": { _attr: { "w:val": 40 } } }, { "w:szCs": { _attr: { "w:val": 40 } } }, diff --git a/src/file/styles/style-options.ts b/src/file/styles/style-options.ts index 18a9e9aab9..b748c42e79 100644 --- a/src/file/styles/style-options.ts +++ b/src/file/styles/style-options.ts @@ -1,4 +1,4 @@ -import { AlignmentType, IIndentAttributesProperties, ISpacingProperties, UnderlineType } from "../paragraph"; +import { AlignmentType, EmphasisMarkType, IIndentAttributesProperties, ISpacingProperties, UnderlineType } from "../paragraph"; import { ShadingType } from "../table"; export interface IRunStyleOptions { @@ -15,6 +15,9 @@ export interface IRunStyleOptions { readonly type?: UnderlineType; readonly color?: string; }; + readonly emphasisMark?: { + readonly type?: EmphasisMarkType; + }; readonly color?: string; readonly font?: string; readonly characterSpacing?: number; diff --git a/src/file/styles/style/character-style.spec.ts b/src/file/styles/style/character-style.spec.ts index fe269bfceb..c660b152be 100644 --- a/src/file/styles/style/character-style.spec.ts +++ b/src/file/styles/style/character-style.spec.ts @@ -1,6 +1,7 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; +import { EmphasisMarkType } from "file/paragraph/run/emphasis-mark"; import { UnderlineType } from "file/paragraph/run/underline"; import { ShadingType } from "file/table"; import { EMPTY_OBJECT } from "file/xml-components"; @@ -412,6 +413,66 @@ describe("CharacterStyle", () => { }); }); + describe("#emphasisMark", () => { + it("should set emphasisMark to 'dot' if no arguments are given", () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { + emphasisMark: {}, + }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }], + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, + }, + }, + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); + }); + + it("should set the style if given", () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { + emphasisMark: { + type: EmphasisMarkType.DOT, + }, + }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }], + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, + }, + }, + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); + }); + }); + it("#superScript", () => { const style = new CharacterStyle({ id: "myStyleId", @@ -616,7 +677,17 @@ describe("CharacterStyle", () => { "w:style": [ { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, { - "w:rPr": [{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }], + "w:rPr": [ + { + "w:shd": { + _attr: { + "w:val": "pct10", + "w:fill": "00FFFF", + "w:color": "FF0000", + }, + }, + }, + ], }, { "w:uiPriority": { diff --git a/src/file/styles/style/character-style.ts b/src/file/styles/style/character-style.ts index 32ff4b6b69..f92540dc16 100644 --- a/src/file/styles/style/character-style.ts +++ b/src/file/styles/style/character-style.ts @@ -1,3 +1,4 @@ +import { EmphasisMarkType } from "file/paragraph/run/emphasis-mark"; import * as formatting from "file/paragraph/run/formatting"; import { RunProperties } from "file/paragraph/run/properties"; import { UnderlineType } from "file/paragraph/run/underline"; @@ -23,6 +24,9 @@ export interface IBaseCharacterStyleOptions { readonly type?: UnderlineType; readonly color?: string; }; + readonly emphasisMark?: { + readonly type?: EmphasisMarkType; + }; readonly color?: string; readonly font?: string; readonly characterSpacing?: number; @@ -104,6 +108,10 @@ export class CharacterStyle extends Style { this.runProperties.push(new formatting.Underline(options.run.underline.type, options.run.underline.color)); } + if (options.run.emphasisMark) { + this.runProperties.push(new formatting.EmphasisMark(options.run.emphasisMark.type)); + } + if (options.run.color) { this.runProperties.push(new formatting.Color(options.run.color)); } diff --git a/src/file/styles/style/paragraph-style.spec.ts b/src/file/styles/style/paragraph-style.spec.ts index 8d9b4da15a..3331dc3513 100644 --- a/src/file/styles/style/paragraph-style.spec.ts +++ b/src/file/styles/style/paragraph-style.spec.ts @@ -1,7 +1,7 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; -import { AlignmentType, TabStopPosition } from "file/paragraph"; +import { AlignmentType, EmphasisMarkType, TabStopPosition } from "file/paragraph"; import { UnderlineType } from "file/paragraph/run/underline"; import { ShadingType } from "file/table"; import { EMPTY_OBJECT } from "file/xml-components"; @@ -49,7 +49,15 @@ describe("ParagraphStyle", () => { const style = new ParagraphStyle({ id: "myStyleId", quickFormat: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ - "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:qFormat": EMPTY_OBJECT }], + "w:style": [ + { + _attr: { + "w:type": "paragraph", + "w:styleId": "myStyleId", + }, + }, + { "w:qFormat": EMPTY_OBJECT }, + ], }); }); @@ -299,7 +307,15 @@ describe("ParagraphStyle", () => { }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ - "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:pPr": [{ "w:keepLines": EMPTY_OBJECT }] }], + "w:style": [ + { + _attr: { + "w:type": "paragraph", + "w:styleId": "myStyleId", + }, + }, + { "w:pPr": [{ "w:keepLines": EMPTY_OBJECT }] }, + ], }); }); @@ -312,7 +328,15 @@ describe("ParagraphStyle", () => { }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ - "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:pPr": [{ "w:keepNext": EMPTY_OBJECT }] }], + "w:style": [ + { + _attr: { + "w:type": "paragraph", + "w:styleId": "myStyleId", + }, + }, + { "w:pPr": [{ "w:keepNext": EMPTY_OBJECT }] }, + ], }); }); @@ -473,7 +497,16 @@ describe("ParagraphStyle", () => { { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:rPr": [ - { "w:rFonts": { _attr: { "w:ascii": "Times", "w:cs": "Times", "w:eastAsia": "Times", "w:hAnsi": "Times" } } }, + { + "w:rFonts": { + _attr: { + "w:ascii": "Times", + "w:cs": "Times", + "w:eastAsia": "Times", + "w:hAnsi": "Times", + }, + }, + }, ], }, ], @@ -550,7 +583,17 @@ describe("ParagraphStyle", () => { "w:style": [ { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { - "w:rPr": [{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }], + "w:rPr": [ + { + "w:shd": { + _attr: { + "w:val": "pct10", + "w:fill": "00FFFF", + "w:color": "FF0000", + }, + }, + }, + ], }, ], }); @@ -617,6 +660,46 @@ describe("ParagraphStyle", () => { }); }); + describe("#emphasisMark", () => { + it("should set emphasisMark to 'dot' if no arguments are given", () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { + emphasisMark: {}, + }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, + { + "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }], + }, + ], + }); + }); + + it("should set the style if given", () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { + emphasisMark: { + type: EmphasisMarkType.DOT, + }, + }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, + { + "w:rPr": [{ "w:em": { _attr: { "w:val": "dot" } } }], + }, + ], + }); + }); + }); + it("#color", () => { const style = new ParagraphStyle({ id: "myStyleId", @@ -639,7 +722,15 @@ describe("ParagraphStyle", () => { const style = new ParagraphStyle({ id: "myStyleId", link: "MyLink" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ - "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:link": { _attr: { "w:val": "MyLink" } } }], + "w:style": [ + { + _attr: { + "w:type": "paragraph", + "w:styleId": "myStyleId", + }, + }, + { "w:link": { _attr: { "w:val": "MyLink" } } }, + ], }); }); @@ -647,7 +738,15 @@ describe("ParagraphStyle", () => { const style = new ParagraphStyle({ id: "myStyleId", semiHidden: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ - "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:semiHidden": EMPTY_OBJECT }], + "w:style": [ + { + _attr: { + "w:type": "paragraph", + "w:styleId": "myStyleId", + }, + }, + { "w:semiHidden": EMPTY_OBJECT }, + ], }); }); @@ -672,7 +771,15 @@ describe("ParagraphStyle", () => { const style = new ParagraphStyle({ id: "myStyleId", unhideWhenUsed: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ - "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:unhideWhenUsed": EMPTY_OBJECT }], + "w:style": [ + { + _attr: { + "w:type": "paragraph", + "w:styleId": "myStyleId", + }, + }, + { "w:unhideWhenUsed": EMPTY_OBJECT }, + ], }); }); }); diff --git a/src/file/styles/style/paragraph-style.ts b/src/file/styles/style/paragraph-style.ts index 3adb1edbbe..0a53c9251a 100644 --- a/src/file/styles/style/paragraph-style.ts +++ b/src/file/styles/style/paragraph-style.ts @@ -114,6 +114,10 @@ export class ParagraphStyle extends Style { this.runProperties.push(new formatting.Underline(options.run.underline.type, options.run.underline.color)); } + if (options.run.emphasisMark) { + this.runProperties.push(new formatting.EmphasisMark(options.run.emphasisMark.type)); + } + if (options.run.color) { this.runProperties.push(new formatting.Color(options.run.color)); } From 6bcd1c2c242ed4012906d516ea2ef06d1ce2bd29 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Fri, 22 May 2020 12:32:40 +0800 Subject: [PATCH 074/260] :doc: support emphasis mark --- docs/usage/styling-with-js.md | 3 ++- docs/usage/text.md | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/usage/styling-with-js.md b/docs/usage/styling-with-js.md index 26d294c942..c8bbb5c8db 100644 --- a/docs/usage/styling-with-js.md +++ b/docs/usage/styling-with-js.md @@ -22,7 +22,8 @@ const name = new TextRun({ ### Run formatting - `bold`, `italics`, `smallCaps`, `allCaps`, `strike`, `doubleStrike`, `subScript`, `superScript`: Set the formatting property to true -- `underline(style="single", color=null)`: Set the underline style and color +- `underline({type="single", color=null})`: Set the underline style and color +- `emphasisMark({type="dot"})`: Set the emphasis mark style - `color(color)`: Set the text color, using 6 hex characters for RRGGBB (no leading `#`) - `size(halfPts)`: Set the font size, measured in half-points - `font(name)`: Set the run's font diff --git a/docs/usage/text.md b/docs/usage/text.md index 6cbd9da224..4816959eb6 100644 --- a/docs/usage/text.md +++ b/docs/usage/text.md @@ -68,6 +68,15 @@ const text = new TextRun({ }); ``` +### Emphasis Mark + +```ts +const text = new TextRun({ + text: "and then emphasis mark", + emphasisMark: {}, +}); +``` + ### Strike through ```ts From 538264dec5d6960d535f91f1b8b01f03f4ddc20b Mon Sep 17 00:00:00 2001 From: wangfengming Date: Fri, 22 May 2020 12:56:02 +0800 Subject: [PATCH 075/260] :demo: support emphasis mark --- demo/2-declaritive-styles.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index 472b916091..c34eae9628 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -161,6 +161,10 @@ doc.addSection({ text: "and then underlined ", underline: {}, }), + new TextRun({ + text: "and then emphasis-mark ", + emphasisMark: {}, + }), new TextRun({ text: "and back to normal.", }), From 5ae824358c8ab885e1b5b37cb4a1b0115c986d72 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 26 May 2020 21:06:43 +0100 Subject: [PATCH 076/260] Revert "Update numbering.ts" This reverts commit 0ebdcc30edba98b990e2bd7fb2b3a76a7ce2822a. --- src/file/numbering/numbering.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index 4c0d299fb6..b8747991d0 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -147,17 +147,6 @@ export class Numbering extends XmlComponent { }, }, }, - { - level: 9, - format: "bullet", - text: "\u2726", - alignment: AlignmentType.LEFT, - style: { - paragraph: { - indent: { left: 720, hanging: 360 }, - }, - }, - }, ]); this.createConcreteNumbering(abstractNumbering); From 20e6b987701286b5493fd73556d8544fef1646d9 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 26 May 2020 21:07:30 +0100 Subject: [PATCH 077/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bea66bd3a4..2d8bc02945 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.0", + "version": "5.1.1", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From d657f61e1179a66289815a206daf389136d8ff8c Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 28 May 2020 18:38:55 +0100 Subject: [PATCH 078/260] Update node types --- package-lock.json | 76 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0226f8dc5..78bcd81aee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.0.2", + "version": "5.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -256,7 +256,7 @@ }, "@types/fs-extra": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.1.tgz", + "resolved": "http://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.1.tgz", "integrity": "sha512-h3wnflb+jMTipvbbZnClgA2BexrT4w0GcfoCz5qyxd0IRsbqhLSyesM6mqZTAnhbVmhyTm5tuxfRu9R+8l+lGw==", "dev": true, "requires": { @@ -296,7 +296,7 @@ }, "@types/lodash": { "version": "4.14.104", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.104.tgz", + "resolved": "http://registry.npmjs.org/@types/lodash/-/lodash-4.14.104.tgz", "integrity": "sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ==", "dev": true }, @@ -319,9 +319,9 @@ "dev": true }, "@types/node": { - "version": "13.1.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.6.tgz", - "integrity": "sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg==" + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", + "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==" }, "@types/request": { "version": "2.48.1", @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -755,7 +755,7 @@ }, "awesome-typescript-loader": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-3.5.0.tgz", + "resolved": "http://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-3.5.0.tgz", "integrity": "sha512-qzgm9SEvodVkSi9QY7Me1/rujg+YBNMjayNSAyzNghwTEez++gXoPCwMvpbHRG7wrOkDCiF6dquvv9ESmUBAuw==", "dev": true, "requires": { @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1285,7 +1285,7 @@ }, "chai": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "resolved": "http://registry.npmjs.org/chai/-/chai-3.5.0.tgz", "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -1763,7 +1763,7 @@ }, "deep-eql": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "resolved": "http://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", "dev": true, "requires": { @@ -2586,7 +2586,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -3927,7 +3927,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, "is-ci": { @@ -4351,7 +4351,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4483,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4777,7 +4777,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -4812,7 +4812,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -4967,7 +4967,7 @@ }, "ncp": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz", "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=", "dev": true }, @@ -4985,7 +4985,7 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, @@ -5518,7 +5518,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5695,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5766,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -6467,7 +6467,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -7034,7 +7034,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7052,7 +7052,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, @@ -7440,7 +7440,7 @@ }, "typedoc": { "version": "0.11.1", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.11.1.tgz", + "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.11.1.tgz", "integrity": "sha512-jdNIoHm5wkZqxQTe/g9AQ3LKnZyrzHXqu6A/c9GUOeJyBWLxNr7/Dm3rwFvLksuxRNwTvY/0HRDU9sJTa9WQSg==", "dev": true, "requires": { @@ -7482,7 +7482,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7586,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8015,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8216,7 +8216,7 @@ }, "winston": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz", + "resolved": "http://registry.npmjs.org/winston/-/winston-2.1.1.tgz", "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=", "dev": true, "requires": { @@ -8231,13 +8231,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8257,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8391,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8435,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { diff --git a/package.json b/package.json index 2d8bc02945..900a6f6357 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "types": "./build/index.d.ts", "dependencies": { "@types/jszip": "^3.1.4", - "@types/node": "^13.1.6", + "@types/node": "^14.0.5", "jszip": "^3.1.5", "shortid": "^2.2.15", "xml": "^1.0.1", From fdfce79e87b4c1973c70c9cf63b19427175e6137 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sun, 7 Jun 2020 12:38:03 +0800 Subject: [PATCH 079/260] :feat: Font for eastAsia --- src/file/paragraph/run/formatting.ts | 2 +- src/file/paragraph/run/run-fonts.ts | 42 +++++++++++++--------- src/file/paragraph/run/run.ts | 18 ++++++---- src/file/styles/defaults/run-properties.ts | 6 ++-- src/file/styles/style-options.ts | 11 ++++-- src/file/styles/style/character-style.ts | 3 +- 6 files changed, 53 insertions(+), 29 deletions(-) diff --git a/src/file/paragraph/run/formatting.ts b/src/file/paragraph/run/formatting.ts index 3055ba44e7..51b14be5cf 100644 --- a/src/file/paragraph/run/formatting.ts +++ b/src/file/paragraph/run/formatting.ts @@ -3,7 +3,7 @@ import { Attributes, XmlComponent } from "file/xml-components"; export { Underline } from "./underline"; export { EmphasisMark } from "./emphasis-mark"; export { SubScript, SuperScript } from "./script"; -export { RunFonts } from "./run-fonts"; +export { RunFonts, IFontAttributesProperties } from "./run-fonts"; export class Bold extends XmlComponent { constructor() { diff --git a/src/file/paragraph/run/run-fonts.ts b/src/file/paragraph/run/run-fonts.ts index 10a441626c..c1eed32613 100644 --- a/src/file/paragraph/run/run-fonts.ts +++ b/src/file/paragraph/run/run-fonts.ts @@ -1,14 +1,14 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; -interface IRunFontAttributesProperties { - readonly ascii: string; - readonly cs: string; - readonly eastAsia: string; - readonly hAnsi: string; +export interface IFontAttributesProperties { + readonly ascii?: string; + readonly cs?: string; + readonly eastAsia?: string; + readonly hAnsi?: string; readonly hint?: string; } -class RunFontAttributes extends XmlAttributeComponent { +class RunFontAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { ascii: "w:ascii", cs: "w:cs", @@ -19,16 +19,26 @@ class RunFontAttributes extends XmlAttributeComponent Date: Sun, 7 Jun 2020 12:38:31 +0800 Subject: [PATCH 080/260] :test: Font for eastAsia --- src/file/numbering/abstract-numbering.spec.ts | 33 ++++++++++++++- src/file/paragraph/run/run-fonts.spec.ts | 7 ++++ src/file/paragraph/run/run.spec.ts | 26 ++++++++++++ src/file/styles/style/character-style.spec.ts | 42 ++++++++++++++++++- src/file/styles/style/paragraph-style.spec.ts | 32 +++++++++++++- 5 files changed, 137 insertions(+), 3 deletions(-) diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index a2fb61b000..6548a4436d 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -417,7 +417,7 @@ describe("AbstractNumbering", () => { }); }); - it("#font", () => { + it("#font by name", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, @@ -447,6 +447,37 @@ describe("AbstractNumbering", () => { }); }); + it("#font for ascii and eastAsia", () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { + font: { + ascii: "Times", + eastAsia: "KaiTi", + }, + }, + }, + }, + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ + "w:rPr": [ + { + "w:rFonts": { + _attr: { + "w:ascii": "Times", + "w:eastAsia": "KaiTi", + }, + }, + }, + ], + }); + }); + it("#bold", () => { const abstractNumbering = new AbstractNumbering(1, [ { diff --git a/src/file/paragraph/run/run-fonts.spec.ts b/src/file/paragraph/run/run-fonts.spec.ts index 1eacc8ecc9..a0180eae81 100644 --- a/src/file/paragraph/run/run-fonts.spec.ts +++ b/src/file/paragraph/run/run-fonts.spec.ts @@ -21,5 +21,12 @@ describe("RunFonts", () => { }, }); }); + + it("uses the font attrs for ascii and eastAsia", () => { + const tree = new Formatter().format(new RunFonts({ ascii: "Times", eastAsia: "KaiTi" })); + expect(tree).to.deep.equal({ + "w:rFonts": { _attr: { "w:ascii": "Times", "w:eastAsia": "KaiTi" } }, + }); + }); }); }); diff --git a/src/file/paragraph/run/run.spec.ts b/src/file/paragraph/run/run.spec.ts index 8712622921..32904327d8 100644 --- a/src/file/paragraph/run/run.spec.ts +++ b/src/file/paragraph/run/run.spec.ts @@ -275,6 +275,32 @@ describe("Run", () => { ], }); }); + + it("should set the font for ascii and eastAsia", () => { + const run = new Run({ + font: { + ascii: "Times", + eastAsia: "KaiTi", + }, + }); + const tree = new Formatter().format(run); + expect(tree).to.deep.equal({ + "w:r": [ + { + "w:rPr": [ + { + "w:rFonts": { + _attr: { + "w:ascii": "Times", + "w:eastAsia": "KaiTi", + }, + }, + }, + ], + }, + ], + }); + }); }); describe("#color", () => { diff --git a/src/file/styles/style/character-style.spec.ts b/src/file/styles/style/character-style.spec.ts index c660b152be..64c866a8c8 100644 --- a/src/file/styles/style/character-style.spec.ts +++ b/src/file/styles/style/character-style.spec.ts @@ -202,7 +202,7 @@ describe("CharacterStyle", () => { }); }); - it("should add font", () => { + it("should add font by name", () => { const style = new CharacterStyle({ id: "myStyleId", run: { @@ -241,6 +241,46 @@ describe("CharacterStyle", () => { }); }); + it("should add font for ascii and eastAsia", () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { + font: { + ascii: "test font ascii", + eastAsia: "test font eastAsia", + }, + }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": [ + { + "w:rFonts": { + _attr: { + "w:ascii": "test font ascii", + "w:eastAsia": "test font eastAsia", + }, + }, + }, + ], + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, + }, + }, + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); + }); + it("should add character spacing", () => { const style = new CharacterStyle({ id: "myStyleId", diff --git a/src/file/styles/style/paragraph-style.spec.ts b/src/file/styles/style/paragraph-style.spec.ts index 3331dc3513..7d01ef87e7 100644 --- a/src/file/styles/style/paragraph-style.spec.ts +++ b/src/file/styles/style/paragraph-style.spec.ts @@ -484,7 +484,7 @@ describe("ParagraphStyle", () => { }); }); - it("#font", () => { + it("#font by name", () => { const style = new ParagraphStyle({ id: "myStyleId", run: { @@ -513,6 +513,36 @@ describe("ParagraphStyle", () => { }); }); + it("#font for ascii and eastAsia", () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { + font: { + ascii: "Times", + eastAsia: "KaiTi", + }, + }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, + { + "w:rPr": [ + { + "w:rFonts": { + _attr: { + "w:ascii": "Times", + "w:eastAsia": "KaiTi", + }, + }, + }, + ], + }, + ], + }); + }); + it("#bold", () => { const style = new ParagraphStyle({ id: "myStyleId", From 596761d78db497f368bd04ea2f8b77cfc53b441a Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sun, 7 Jun 2020 12:39:17 +0800 Subject: [PATCH 081/260] :doc: doc and demo for "Font for eastAsia" --- demo/53-chinese.ts | 46 +++++++++++++++++++++++++++++++++++ docs/usage/styling-with-js.md | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 demo/53-chinese.ts diff --git a/demo/53-chinese.ts b/demo/53-chinese.ts new file mode 100644 index 0000000000..eb9afb39a2 --- /dev/null +++ b/demo/53-chinese.ts @@ -0,0 +1,46 @@ +// Chinese text - Chinese need to use a Chinese font. And ascii Text Need to use a ascii font. +// Different from the `52-japanese.ts`. +// `52-japanese.ts` will set all characters to use Japanese font. +// `53-chinese.ts` will set Chinese characters to use Chinese font, and set ascii characters to use ascii font. + +// Note that if the compute have not install `KaiTi` font, this demo doesn't work. + +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, HeadingLevel, Packer, Paragraph } from "../build"; + +const doc = new Document({ + styles: { + paragraphStyles: [ + { + id: "Normal", + name: "Normal", + basedOn: "Normal", + next: "Normal", + quickFormat: true, + run: { + font: { + ascii: "Times", + eastAsia: "KaiTi", + }, + }, + }, + ], + }, +}); + +doc.addSection({ + children: [ + new Paragraph({ + text: "中文和英文 Chinese and English", + heading: HeadingLevel.HEADING_1, + }), + new Paragraph({ + text: "中文和英文 Chinese and English", + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); diff --git a/docs/usage/styling-with-js.md b/docs/usage/styling-with-js.md index c8bbb5c8db..0dafac2904 100644 --- a/docs/usage/styling-with-js.md +++ b/docs/usage/styling-with-js.md @@ -26,7 +26,7 @@ const name = new TextRun({ - `emphasisMark({type="dot"})`: Set the emphasis mark style - `color(color)`: Set the text color, using 6 hex characters for RRGGBB (no leading `#`) - `size(halfPts)`: Set the font size, measured in half-points -- `font(name)`: Set the run's font +- `font(name)` or `font({ascii, cs, eastAsia, hAnsi, hint})`: Set the run's font - `style(name)`: Apply a named run style - `characterSpacing(value)`: Set the character spacing adjustment (in TWIPs) From f11bca728fa28c73b3bef61e9d630080d7496cfe Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sun, 7 Jun 2020 12:46:21 +0800 Subject: [PATCH 082/260] :typo: update comment for the demo --- demo/53-chinese.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/53-chinese.ts b/demo/53-chinese.ts index eb9afb39a2..1bacf888a6 100644 --- a/demo/53-chinese.ts +++ b/demo/53-chinese.ts @@ -1,9 +1,9 @@ -// Chinese text - Chinese need to use a Chinese font. And ascii Text Need to use a ascii font. +// Chinese text - Chinese text need to use a Chinese font. And ascii text need to use a ascii font. // Different from the `52-japanese.ts`. // `52-japanese.ts` will set all characters to use Japanese font. // `53-chinese.ts` will set Chinese characters to use Chinese font, and set ascii characters to use ascii font. -// Note that if the compute have not install `KaiTi` font, this demo doesn't work. +// Note that if the OS have not install `KaiTi` font, this demo doesn't work. // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; From d6fa33035a02130d1c3826547194aeb9c75b8668 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sun, 7 Jun 2020 14:58:59 +0800 Subject: [PATCH 083/260] :doc: update demo `53-chinese.ts` --- demo/53-chinese.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/demo/53-chinese.ts b/demo/53-chinese.ts index 1bacf888a6..eee6eb9032 100644 --- a/demo/53-chinese.ts +++ b/demo/53-chinese.ts @@ -7,7 +7,7 @@ // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, HeadingLevel, Packer, Paragraph } from "../build"; +import { Document, HeadingLevel, Packer, Paragraph, TextRun } from "../build"; const doc = new Document({ styles: { @@ -38,6 +38,15 @@ doc.addSection({ new Paragraph({ text: "中文和英文 Chinese and English", }), + new Paragraph({ + children: [ + new TextRun({ + text: "中文和英文 Chinese and English", + font: { eastAsia: "SimSun" }, // set eastAsia to "SimSun". + // The ascii characters will use the default font ("Times") specified in paragraphStyles + }), + ], + }), ], }); From 3cdf96ee0ccf3d69a665e24e325baeed75b82053 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Wed, 17 Jun 2020 14:34:27 +0100 Subject: [PATCH 084/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 900a6f6357..09b272cb5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.0", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From 994df8531b171c48b9b6b645649026563dffefe0 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sat, 20 Jun 2020 19:47:46 +0800 Subject: [PATCH 085/260] :fix: `rowSpan` does not work correctly --- demo/32-merge-and-shade-table-cells.ts | 39 ++++++++++++++++++++++++++ src/file/table/table-row/table-row.ts | 4 +++ src/file/table/table.ts | 15 ++++------ 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index db3174aeaf..14667ffd78 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -209,6 +209,43 @@ const table5 = new Table({ }, }); +const table6 = new Table({ + rows: [ + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("11")], + }), + new TableCell({ + children: [new Paragraph("12")], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("21"), new Paragraph("31")], + rowSpan: 2, + }), + new TableCell({ + children: [new Paragraph("22")], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("32")], + }), + ], + }), + ], + width: { + size: 100, + type: WidthType.PERCENTAGE, + }, +}); + doc.addSection({ children: [ table, @@ -226,6 +263,8 @@ doc.addSection({ table4, new Paragraph("More Merging columns"), table5, + new Paragraph("Another Merging columns"), + table6, ], }); diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 466b7eb320..2a655a535d 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -46,6 +46,10 @@ export class TableRow extends XmlComponent { return this.options.children; } + public get cells(): TableCell[] { + return this.root.filter((xmlComponent) => xmlComponent instanceof TableCell); + } + public addCellToIndex(cell: TableCell, index: number): void { // Offset because properties is also in root. this.root.splice(index + 1, 0, cell); diff --git a/src/file/table/table.ts b/src/file/table/table.ts index a0e6dab88f..2cc408dc64 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -78,27 +78,24 @@ export class Table extends XmlComponent { this.root.push(row); } - for (const row of rows) { - row.Children.forEach((cell, cellIndex) => { - const column = rows.map((r) => r.Children[cellIndex]); + rows.forEach((row, rowIndex) => { + row.cells.forEach((cell, cellIndex) => { // Row Span has to be added in this method and not the constructor because it needs to know information about the column which happens after Table Cell construction // Row Span of 1 will crash word as it will add RESTART and not a corresponding CONTINUE if (cell.options.rowSpan && cell.options.rowSpan > 1) { - const thisCellsColumnIndex = column.indexOf(cell); - const endColumnIndex = thisCellsColumnIndex + (cell.options.rowSpan - 1); - - for (let i = thisCellsColumnIndex + 1; i <= endColumnIndex; i++) { + const endRowIndex = rowIndex + (cell.options.rowSpan - 1); + for (let i = rowIndex + 1; i <= endRowIndex; i++) { rows[i].addCellToIndex( new TableCell({ children: [], verticalMerge: VerticalMergeType.CONTINUE, }), - i, + cellIndex, ); } } }); - } + }); if (float) { this.properties.setTableFloatProperties(float); From 3977c8ab3bdea6d7b83b09723c71ad9c6ee47013 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sat, 20 Jun 2020 20:20:22 +0800 Subject: [PATCH 086/260] :fix: `rowSpan` continue cell should has the same border to the first row cell --- demo/32-merge-and-shade-table-cells.ts | 39 +++++++++++++++++++++----- src/file/table/table.ts | 1 + 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index 14667ffd78..615f97c46b 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -2,7 +2,7 @@ // Also includes an example on how to center tables // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, Document, HeadingLevel, Packer, Paragraph, ShadingType, Table, TableCell, TableRow, WidthType } from "../build"; +import { AlignmentType, BorderStyle, Document, HeadingLevel, Packer, Paragraph, ShadingType, Table, TableCell, TableRow, WidthType } from "../build"; const doc = new Document(); @@ -209,14 +209,40 @@ const table5 = new Table({ }, }); +const borders = { + top: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + bottom: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + left: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + right: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, +}; + const table6 = new Table({ rows: [ new TableRow({ children: [ new TableCell({ - children: [new Paragraph("11")], + borders, + children: [new Paragraph("11"), new Paragraph("21")], + rowSpan: 2, }), new TableCell({ + borders, children: [new Paragraph("12")], }), ], @@ -224,18 +250,17 @@ const table6 = new Table({ new TableRow({ children: [ new TableCell({ - children: [new Paragraph("21"), new Paragraph("31")], + borders, + children: [new Paragraph("22"), new Paragraph("32")], rowSpan: 2, }), - new TableCell({ - children: [new Paragraph("22")], - }), ], }), new TableRow({ children: [ new TableCell({ - children: [new Paragraph("32")], + borders, + children: [new Paragraph("31")], }), ], }), diff --git a/src/file/table/table.ts b/src/file/table/table.ts index 2cc408dc64..2422f50161 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -87,6 +87,7 @@ export class Table extends XmlComponent { for (let i = rowIndex + 1; i <= endRowIndex; i++) { rows[i].addCellToIndex( new TableCell({ + borders: cell.options.borders, children: [], verticalMerge: VerticalMergeType.CONTINUE, }), From fa7cb0bef1d998fab185f5a57c96d00b53ad589a Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sat, 20 Jun 2020 21:01:23 +0800 Subject: [PATCH 087/260] :test: add test case for `columnSpan` and `rowSpan` --- src/file/table/table.spec.ts | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/file/table/table.spec.ts b/src/file/table/table.spec.ts index d2098fb1e4..49eb7a3f46 100644 --- a/src/file/table/table.spec.ts +++ b/src/file/table/table.spec.ts @@ -188,6 +188,72 @@ describe("Table", () => { }); }); + it("creates a table with the correct columnSpan and rowSpan", () => { + const table = new Table({ + rows: [ + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("hello")], + columnSpan: 2, + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("hello")], + rowSpan: 2, + }), + new TableCell({ + children: [new Paragraph("hello")], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("hello")], + }), + ], + }), + ], + }); + const tree = new Formatter().format(table); + const cellP = { "w:p": [{ "w:r": [{ "w:t": [{ _attr: { "xml:space": "preserve" } }, "hello"] }] }] }; + expect(tree).to.deep.equal({ + "w:tbl": [ + { "w:tblPr": [DEFAULT_TABLE_PROPERTIES, BORDERS, WIDTHS] }, + { + "w:tblGrid": [{ "w:gridCol": { _attr: { "w:w": 100 } } }, { "w:gridCol": { _attr: { "w:w": 100 } } }], + }, + { + "w:tr": [ + { + "w:tc": [{ "w:tcPr": [{ "w:gridSpan": { _attr: { "w:val": 2 } } }] }, cellP], + }, + ], + }, + { + "w:tr": [ + { + "w:tc": [{ "w:tcPr": [{ "w:vMerge": { _attr: { "w:val": "restart" } } }] }, cellP], + }, + { "w:tc": [cellP] }, + ], + }, + { + "w:tr": [ + { + "w:tc": [{ "w:tcPr": [{ "w:vMerge": { _attr: { "w:val": "continue" } } }] }, { "w:p": {} }], + }, + { "w:tc": [cellP] }, + ], + }, + ], + }); + }); + it("sets the table to fixed width layout", () => { const table = new Table({ rows: [ From 11e54b3e2cb5ea5721a8f1e4546e29edff35d2c1 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sat, 20 Jun 2020 21:36:35 +0800 Subject: [PATCH 088/260] :fix: handle cell that has both `columnSpan` and `rowSpan` --- src/file/table/table.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/file/table/table.ts b/src/file/table/table.ts index 2422f50161..888f91dca1 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -87,6 +87,7 @@ export class Table extends XmlComponent { for (let i = rowIndex + 1; i <= endRowIndex; i++) { rows[i].addCellToIndex( new TableCell({ + columnSpan: cell.options.columnSpan, borders: cell.options.borders, children: [], verticalMerge: VerticalMergeType.CONTINUE, From 8c9b61b37aa3d4acaa43d1e1a03741a88fa6bd4a Mon Sep 17 00:00:00 2001 From: wangfengming Date: Mon, 22 Jun 2020 12:25:51 +0800 Subject: [PATCH 089/260] :fix: handle `rowSpan` by convert between the virtual column index and the root index --- demo/32-merge-and-shade-table-cells.ts | 87 +++++++++++++++++++--- src/file/table/table-row/table-row.spec.ts | 87 ++++++++++++++++++++++ src/file/table/table-row/table-row.ts | 40 ++++++++++ src/file/table/table.ts | 8 +- 4 files changed, 209 insertions(+), 13 deletions(-) diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index 615f97c46b..6fc7f867ec 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -184,7 +184,7 @@ const table5 = new Table({ new TableRow({ children: [ new TableCell({ - children: [], + children: [new Paragraph("1,0")], }), new TableCell({ children: [new Paragraph("1,2")], @@ -195,10 +195,10 @@ const table5 = new Table({ new TableRow({ children: [ new TableCell({ - children: [], + children: [new Paragraph("2,0")], }), new TableCell({ - children: [], + children: [new Paragraph("2,1")], }), ], }), @@ -238,12 +238,12 @@ const table6 = new Table({ children: [ new TableCell({ borders, - children: [new Paragraph("11"), new Paragraph("21")], + children: [new Paragraph("0,0")], rowSpan: 2, }), new TableCell({ borders, - children: [new Paragraph("12")], + children: [new Paragraph("0,1")], }), ], }), @@ -251,7 +251,7 @@ const table6 = new Table({ children: [ new TableCell({ borders, - children: [new Paragraph("22"), new Paragraph("32")], + children: [new Paragraph("1,1")], rowSpan: 2, }), ], @@ -260,7 +260,72 @@ const table6 = new Table({ children: [ new TableCell({ borders, - children: [new Paragraph("31")], + children: [new Paragraph("2,0")], + }), + ], + }), + ], + width: { + size: 100, + type: WidthType.PERCENTAGE, + }, +}); + +const table7 = new Table({ + rows: [ + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("0,0")], + }), + new TableCell({ + children: [new Paragraph("0,1")], + }), + new TableCell({ + children: [new Paragraph("0,2")], + rowSpan: 2, + }), + new TableCell({ + children: [new Paragraph("0,3")], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("1,0")], + columnSpan: 2, + }), + new TableCell({ + children: [new Paragraph("1,3")], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("2,0")], + columnSpan: 2, + }), + new TableCell({ + children: [new Paragraph("2,2")], + rowSpan: 2, + }), + new TableCell({ + children: [new Paragraph("2,3")], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("3,0")], + }), + new TableCell({ + children: [new Paragraph("3,1")], + }), + new TableCell({ + children: [new Paragraph("3,3")], }), ], }), @@ -284,12 +349,14 @@ doc.addSection({ heading: HeadingLevel.HEADING_2, }), table3, - new Paragraph("Merging columns"), + new Paragraph("Merging columns 1"), table4, - new Paragraph("More Merging columns"), + new Paragraph("Merging columns 2"), table5, - new Paragraph("Another Merging columns"), + new Paragraph("Merging columns 3"), table6, + new Paragraph("Merging columns 4"), + table7, ], }); diff --git a/src/file/table/table-row/table-row.spec.ts b/src/file/table/table-row/table-row.spec.ts index e013153cd8..0cdb0196b8 100644 --- a/src/file/table/table-row/table-row.spec.ts +++ b/src/file/table/table-row/table-row.spec.ts @@ -182,4 +182,91 @@ describe("TableRow", () => { }); }); }); + + describe("#rootIndexToColumnIndex", () => { + it("should get the correct virtual column index by root index", () => { + const tableRow = new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("test")], + columnSpan: 3, + }), + new TableCell({ + children: [new Paragraph("test")], + }), + new TableCell({ + children: [new Paragraph("test")], + }), + new TableCell({ + children: [new Paragraph("test")], + columnSpan: 3, + }), + ], + }); + + expect(tableRow.rootIndexToColumnIndex(1)).to.equal(0); + expect(tableRow.rootIndexToColumnIndex(2)).to.equal(3); + expect(tableRow.rootIndexToColumnIndex(3)).to.equal(4); + expect(tableRow.rootIndexToColumnIndex(4)).to.equal(5); + }); + }); + + describe("#columnIndexToRootIndex", () => { + it("should get the correct root index by virtual column index", () => { + const tableRow = new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("test")], + columnSpan: 3, + }), + new TableCell({ + children: [new Paragraph("test")], + }), + new TableCell({ + children: [new Paragraph("test")], + }), + new TableCell({ + children: [new Paragraph("test")], + columnSpan: 3, + }), + ], + }); + + expect(tableRow.columnIndexToRootIndex(0)).to.equal(1); + expect(tableRow.columnIndexToRootIndex(1)).to.equal(1); + expect(tableRow.columnIndexToRootIndex(2)).to.equal(1); + + expect(tableRow.columnIndexToRootIndex(3)).to.equal(2); + expect(tableRow.columnIndexToRootIndex(4)).to.equal(3); + + expect(tableRow.columnIndexToRootIndex(5)).to.equal(4); + expect(tableRow.columnIndexToRootIndex(6)).to.equal(4); + expect(tableRow.columnIndexToRootIndex(7)).to.equal(4); + }); + + it("should allow end new cell index", () => { + const tableRow = new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("test")], + columnSpan: 3, + }), + new TableCell({ + children: [new Paragraph("test")], + }), + new TableCell({ + children: [new Paragraph("test")], + }), + new TableCell({ + children: [new Paragraph("test")], + columnSpan: 3, + }), + ], + }); + + expect(() => tableRow.columnIndexToRootIndex(8)).to.throw(`cell 'columnIndex' should not great than 7`); + expect(tableRow.columnIndexToRootIndex(8, true)).to.equal(5); + expect(() => tableRow.columnIndexToRootIndex(9, true)).to.throw(`cell 'columnIndex' should not great than 8`); + }); + }); }); diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 2a655a535d..320616e809 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -54,4 +54,44 @@ export class TableRow extends XmlComponent { // Offset because properties is also in root. this.root.splice(index + 1, 0, cell); } + + public addCellToColumnIndex(cell: TableCell, columnIndex: number): void { + const rootIndex = this.columnIndexToRootIndex(columnIndex, true); + this.addCellToIndex(cell, rootIndex - 1); + } + + public rootIndexToColumnIndex(rootIndex: number): number { + // convert the root index to the virtual column index + if (rootIndex < 1 || rootIndex >= this.root.length) { + throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length - 1}`); + } + let colIdx = 0; + // Offset because properties is also in root. + for (let rootIdx = 1; rootIdx < rootIndex; rootIdx++) { + const cell = this.root[rootIdx] as TableCell; + colIdx += cell.options.columnSpan || 1; + } + return colIdx; + } + + public columnIndexToRootIndex(columnIndex: number, allowEndNewCell: boolean = false): number { + // convert the virtual column index to the root index + // `allowEndNewCell` for get index to inert new cell + if (columnIndex < 0) { + throw new Error(`cell 'columnIndex' should not less than zero`); + } + let colIdx = 0; + // Offset because properties is also in root. + let rootIdx = 1; + const endRootIndex = allowEndNewCell ? this.root.length : this.root.length - 1; + while (colIdx <= columnIndex) { + if (rootIdx > endRootIndex) { + throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`); + } + const cell = this.root[rootIdx] as TableCell; + rootIdx += 1; + colIdx += (cell && cell.options.columnSpan) || 1; + } + return rootIdx - 1; + } } diff --git a/src/file/table/table.ts b/src/file/table/table.ts index 888f91dca1..f99b6fc9b1 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -83,16 +83,18 @@ export class Table extends XmlComponent { // Row Span has to be added in this method and not the constructor because it needs to know information about the column which happens after Table Cell construction // Row Span of 1 will crash word as it will add RESTART and not a corresponding CONTINUE if (cell.options.rowSpan && cell.options.rowSpan > 1) { + const columnIndex = row.rootIndexToColumnIndex(cellIndex + 1); + const startRowIndex = rowIndex + 1; const endRowIndex = rowIndex + (cell.options.rowSpan - 1); - for (let i = rowIndex + 1; i <= endRowIndex; i++) { - rows[i].addCellToIndex( + for (let i = startRowIndex; i <= endRowIndex; i++) { + rows[i].addCellToColumnIndex( new TableCell({ columnSpan: cell.options.columnSpan, borders: cell.options.borders, children: [], verticalMerge: VerticalMergeType.CONTINUE, }), - cellIndex, + columnIndex, ); } } From 057f41e35558bd687d8751d4439f69da3047c1ca Mon Sep 17 00:00:00 2001 From: wangfengming Date: Mon, 22 Jun 2020 12:34:08 +0800 Subject: [PATCH 090/260] :test: more test cases --- src/file/table/table-row/table-row.spec.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/file/table/table-row/table-row.spec.ts b/src/file/table/table-row/table-row.spec.ts index 0cdb0196b8..03b8b2862e 100644 --- a/src/file/table/table-row/table-row.spec.ts +++ b/src/file/table/table-row/table-row.spec.ts @@ -208,6 +208,9 @@ describe("TableRow", () => { expect(tableRow.rootIndexToColumnIndex(2)).to.equal(3); expect(tableRow.rootIndexToColumnIndex(3)).to.equal(4); expect(tableRow.rootIndexToColumnIndex(4)).to.equal(5); + + expect(() => tableRow.rootIndexToColumnIndex(0)).to.throw(`cell 'rootIndex' should between 1 to 4`); + expect(() => tableRow.rootIndexToColumnIndex(5)).to.throw(`cell 'rootIndex' should between 1 to 4`); }); }); @@ -242,6 +245,9 @@ describe("TableRow", () => { expect(tableRow.columnIndexToRootIndex(5)).to.equal(4); expect(tableRow.columnIndexToRootIndex(6)).to.equal(4); expect(tableRow.columnIndexToRootIndex(7)).to.equal(4); + + expect(() => tableRow.columnIndexToRootIndex(-1)).to.throw(`cell 'columnIndex' should not less than zero`); + expect(() => tableRow.columnIndexToRootIndex(8)).to.throw(`cell 'columnIndex' should not great than 7`); }); it("should allow end new cell index", () => { @@ -264,7 +270,6 @@ describe("TableRow", () => { ], }); - expect(() => tableRow.columnIndexToRootIndex(8)).to.throw(`cell 'columnIndex' should not great than 7`); expect(tableRow.columnIndexToRootIndex(8, true)).to.equal(5); expect(() => tableRow.columnIndexToRootIndex(9, true)).to.throw(`cell 'columnIndex' should not great than 8`); }); From ba3d551c9fb9357adc64770684fd9ab6ef514969 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 29 Jun 2020 01:17:13 +0100 Subject: [PATCH 091/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09b272cb5b..4e1157e9d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.2.0", + "version": "5.2.1", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From 80bab95f6c6f3149bf2f7f0ad572bcc9b8f75218 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 8 Jul 2020 10:55:15 +0800 Subject: [PATCH 092/260] :fix: `rowSpan` can't work when column index out of range --- demo/32-merge-and-shade-table-cells.ts | 7 +------ src/file/table/table-row/table-row.spec.ts | 3 ++- src/file/table/table-row/table-row.ts | 10 +++++++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index 6fc7f867ec..3dca2423d4 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -287,6 +287,7 @@ const table7 = new Table({ }), new TableCell({ children: [new Paragraph("0,3")], + rowSpan: 3, }), ], }), @@ -296,9 +297,6 @@ const table7 = new Table({ children: [new Paragraph("1,0")], columnSpan: 2, }), - new TableCell({ - children: [new Paragraph("1,3")], - }), ], }), new TableRow({ @@ -311,9 +309,6 @@ const table7 = new Table({ children: [new Paragraph("2,2")], rowSpan: 2, }), - new TableCell({ - children: [new Paragraph("2,3")], - }), ], }), new TableRow({ diff --git a/src/file/table/table-row/table-row.spec.ts b/src/file/table/table-row/table-row.spec.ts index 03b8b2862e..e381056c3e 100644 --- a/src/file/table/table-row/table-row.spec.ts +++ b/src/file/table/table-row/table-row.spec.ts @@ -271,7 +271,8 @@ describe("TableRow", () => { }); expect(tableRow.columnIndexToRootIndex(8, true)).to.equal(5); - expect(() => tableRow.columnIndexToRootIndex(9, true)).to.throw(`cell 'columnIndex' should not great than 8`); + // for column 10, just place the new cell at the end of cell + expect(tableRow.columnIndexToRootIndex(10, true)).to.equal(5); }); }); }); diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 320616e809..05ba1264a5 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -83,10 +83,14 @@ export class TableRow extends XmlComponent { let colIdx = 0; // Offset because properties is also in root. let rootIdx = 1; - const endRootIndex = allowEndNewCell ? this.root.length : this.root.length - 1; while (colIdx <= columnIndex) { - if (rootIdx > endRootIndex) { - throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`); + if (rootIdx >= this.root.length) { + if (allowEndNewCell) { + // for insert verticalMerge CONTINUE at row end + return this.root.length; + } else { + throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`); + } } const cell = this.root[rootIdx] as TableCell; rootIdx += 1; From 0de302d19209f283a05e35287404985fa070fc51 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 8 Jul 2020 11:26:24 +0800 Subject: [PATCH 093/260] :typo: update comments --- src/file/table/table-row/table-row.spec.ts | 2 +- src/file/table/table-row/table-row.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file/table/table-row/table-row.spec.ts b/src/file/table/table-row/table-row.spec.ts index e381056c3e..90f6ad4937 100644 --- a/src/file/table/table-row/table-row.spec.ts +++ b/src/file/table/table-row/table-row.spec.ts @@ -271,7 +271,7 @@ describe("TableRow", () => { }); expect(tableRow.columnIndexToRootIndex(8, true)).to.equal(5); - // for column 10, just place the new cell at the end of cell + // for column 10, just place the new cell at the end of row expect(tableRow.columnIndexToRootIndex(10, true)).to.equal(5); }); }); diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 05ba1264a5..11ea0bb2e2 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -86,7 +86,7 @@ export class TableRow extends XmlComponent { while (colIdx <= columnIndex) { if (rootIdx >= this.root.length) { if (allowEndNewCell) { - // for insert verticalMerge CONTINUE at row end + // for inserting verticalMerge CONTINUE cell at end of row return this.root.length; } else { throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`); From 40dc90e585a75307ae4b0c6b9929b4de8fbf90be Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 8 Jul 2020 12:32:01 +0800 Subject: [PATCH 094/260] :fix: insert the continue cell properly --- demo/32-merge-and-shade-table-cells.ts | 37 +++++++++++++++++++++++++ src/file/table/table-cell/table-cell.ts | 7 ++--- src/file/table/table.ts | 31 +++++++++++---------- 3 files changed, 56 insertions(+), 19 deletions(-) diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index 3dca2423d4..f12350988e 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -331,6 +331,41 @@ const table7 = new Table({ }, }); +const table8 = new Table({ + rows: [ + new TableRow({ + children: [ + new TableCell({ children: [new Paragraph("1,1")] }), + new TableCell({ children: [new Paragraph("1,2")] }), + new TableCell({ children: [new Paragraph("1,3")] }), + new TableCell({ children: [new Paragraph("1,4")], rowSpan: 4, borders }), + ], + }), + new TableRow({ + children: [ + new TableCell({ children: [new Paragraph("2,1")] }), + new TableCell({ children: [new Paragraph("2,2")] }), + new TableCell({ children: [new Paragraph("2,3")], rowSpan: 3 }), + ], + }), + new TableRow({ + children: [ + new TableCell({ children: [new Paragraph("3,1")] }), + new TableCell({ children: [new Paragraph("3,2")], rowSpan: 2 }), + ], + }), + new TableRow({ + children: [ + new TableCell({ children: [new Paragraph("4,1")] }), + ], + }), + ], + width: { + size: 100, + type: WidthType.PERCENTAGE, + }, +}); + doc.addSection({ children: [ table, @@ -352,6 +387,8 @@ doc.addSection({ table6, new Paragraph("Merging columns 4"), table7, + new Paragraph("Merging columns 5"), + table8, ], }); diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index c809c157ad..babd0031ff 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -70,6 +70,9 @@ export class TableCell extends XmlComponent { if (options.verticalMerge) { this.properties.addVerticalMerge(options.verticalMerge); + } else if (options.rowSpan && options.rowSpan > 1) { + // if cell already have a `verticalMerge`, don't handle `rowSpan` + this.properties.addVerticalMerge(VerticalMergeType.RESTART); } if (options.margins) { @@ -84,10 +87,6 @@ export class TableCell extends XmlComponent { this.properties.addGridSpan(options.columnSpan); } - if (options.rowSpan && options.rowSpan > 1) { - this.properties.addVerticalMerge(VerticalMergeType.RESTART); - } - if (options.width) { this.properties.setWidth(options.width.size, options.width.type); } diff --git a/src/file/table/table.ts b/src/file/table/table.ts index f99b6fc9b1..69b3c0f775 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -79,25 +79,26 @@ export class Table extends XmlComponent { } rows.forEach((row, rowIndex) => { - row.cells.forEach((cell, cellIndex) => { + if (rowIndex === rows.length - 1) { + // don't process the end row + return; + } + let columnIndex = 0; + row.cells.forEach((cell) => { // Row Span has to be added in this method and not the constructor because it needs to know information about the column which happens after Table Cell construction // Row Span of 1 will crash word as it will add RESTART and not a corresponding CONTINUE if (cell.options.rowSpan && cell.options.rowSpan > 1) { - const columnIndex = row.rootIndexToColumnIndex(cellIndex + 1); - const startRowIndex = rowIndex + 1; - const endRowIndex = rowIndex + (cell.options.rowSpan - 1); - for (let i = startRowIndex; i <= endRowIndex; i++) { - rows[i].addCellToColumnIndex( - new TableCell({ - columnSpan: cell.options.columnSpan, - borders: cell.options.borders, - children: [], - verticalMerge: VerticalMergeType.CONTINUE, - }), - columnIndex, - ); - } + const continueCell = new TableCell({ + // the inserted CONTINUE cell has rowSpan, and will be handled when process the next row + rowSpan: cell.options.rowSpan - 1, + columnSpan: cell.options.columnSpan, + borders: cell.options.borders, + children: [], + verticalMerge: VerticalMergeType.CONTINUE, + }); + rows[rowIndex + 1].addCellToColumnIndex(continueCell, columnIndex); } + columnIndex += cell.options.columnSpan || 1; }); }); From b8232f7a02c2ef30fbdc890c6f145d8a21037f10 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 11 Jul 2020 19:34:29 +0100 Subject: [PATCH 095/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e1157e9d6..d88a3731f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.2.1", + "version": "5.2.2", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From 437e83ab7849baf134a7d877611aacec3cbc9ccf Mon Sep 17 00:00:00 2001 From: wangfengming Date: Sat, 11 Jul 2020 17:01:32 +0800 Subject: [PATCH 096/260] :feat: refine paragraph/run properties options --- src/file/document/body/body.ts | 2 +- src/file/numbering/abstract-numbering.spec.ts | 5 + src/file/numbering/level.ts | 124 +----------- src/file/paragraph/paragraph.ts | 113 +---------- src/file/paragraph/properties.ts | 123 +++++++++++- src/file/paragraph/run/caps.ts | 13 -- src/file/paragraph/run/formatting.ts | 11 -- src/file/paragraph/run/index.ts | 1 + src/file/paragraph/run/properties.ts | 177 +++++++++++++++++- src/file/paragraph/run/run.spec.ts | 4 +- src/file/paragraph/run/run.ts | 137 +------------- src/file/styles/defaults/index.ts | 15 +- .../styles/defaults/paragraph-properties.ts | 6 +- src/file/styles/defaults/run-properties.ts | 6 +- src/file/styles/index.ts | 2 +- src/file/styles/style-options.ts | 56 ------ src/file/styles/style/character-style.spec.ts | 4 + src/file/styles/style/character-style.ts | 105 +---------- src/file/styles/style/paragraph-style.spec.ts | 4 + src/file/styles/style/paragraph-style.ts | 135 +------------ 20 files changed, 360 insertions(+), 683 deletions(-) delete mode 100644 src/file/paragraph/run/caps.ts delete mode 100644 src/file/styles/style-options.ts diff --git a/src/file/document/body/body.ts b/src/file/document/body/body.ts index a0b7c27a2c..ea0d24a448 100644 --- a/src/file/document/body/body.ts +++ b/src/file/document/body/body.ts @@ -45,7 +45,7 @@ export class Body extends XmlComponent { private createSectionParagraph(section: SectionProperties): Paragraph { const paragraph = new Paragraph({}); const properties = new ParagraphProperties({}); - properties.addChildElement(section); + properties.push(section); paragraph.addChildElement(properties); return paragraph; } diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index 6548a4436d..36173364c0 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -292,6 +292,7 @@ describe("AbstractNumbering", () => { style: { run: { size: 24, + sizeComplexScript: false, }, }, }, @@ -487,6 +488,7 @@ describe("AbstractNumbering", () => { style: { run: { bold: true, + boldComplexScript: false, }, }, }, @@ -506,6 +508,7 @@ describe("AbstractNumbering", () => { style: { run: { italics: true, + italicsComplexScript: false, }, }, }, @@ -525,6 +528,7 @@ describe("AbstractNumbering", () => { style: { run: { highlight: "005599", + highlightComplexScript: false, }, }, }, @@ -548,6 +552,7 @@ describe("AbstractNumbering", () => { fill: "00FFFF", color: "FF0000", }, + shadingComplexScript: false, }, }, }, diff --git a/src/file/numbering/level.ts b/src/file/numbering/level.ts index ddef2b2d78..6a68f0712f 100644 --- a/src/file/numbering/level.ts +++ b/src/file/numbering/level.ts @@ -1,19 +1,7 @@ import { Attributes, XmlAttributeComponent, XmlComponent } from "file/xml-components"; -import { - Alignment, - AlignmentType, - Indent, - KeepLines, - KeepNext, - Spacing, - TabStop, - TabStopType, - ThematicBreak, -} from "../paragraph/formatting"; -import { ParagraphProperties } from "../paragraph/properties"; -import * as formatting from "../paragraph/run/formatting"; -import { RunProperties } from "../paragraph/run/properties"; -import { IParagraphStyleOptions2, IRunStyleOptions } from "../styles/style-options"; +import { AlignmentType } from "../paragraph/formatting"; +import { IParagraphStylePropertiesOptions, ParagraphProperties } from "../paragraph/properties"; +import { IRunStylePropertiesOptions, RunProperties } from "../paragraph/run/properties"; interface ILevelAttributesProperties { readonly ilvl?: number; @@ -85,8 +73,8 @@ export interface ILevelsOptions { readonly start?: number; readonly suffix?: LevelSuffix; readonly style?: { - readonly run?: IRunStyleOptions; - readonly paragraph?: IParagraphStyleOptions2; + readonly run?: IRunStylePropertiesOptions; + readonly paragraph?: IParagraphStylePropertiesOptions; }; } @@ -125,8 +113,8 @@ export class LevelBase extends XmlComponent { this.root.push(new LevelText(text)); } - this.paragraphProperties = new ParagraphProperties({}); - this.runProperties = new RunProperties(); + this.paragraphProperties = new ParagraphProperties(style && style.paragraph); + this.runProperties = new RunProperties(style && style.run); this.root.push(this.paragraphProperties); this.root.push(this.runProperties); @@ -134,104 +122,6 @@ export class LevelBase extends XmlComponent { if (suffix) { this.root.push(new Suffix(suffix)); } - - if (style) { - if (style.run) { - if (style.run.size) { - this.runProperties.push(new formatting.Size(style.run.size)); - } - - if (style.run.bold) { - this.runProperties.push(new formatting.Bold()); - } - - if (style.run.italics) { - this.runProperties.push(new formatting.Italics()); - } - - if (style.run.smallCaps) { - this.runProperties.push(new formatting.SmallCaps()); - } - - if (style.run.allCaps) { - this.runProperties.push(new formatting.Caps()); - } - - if (style.run.strike) { - this.runProperties.push(new formatting.Strike()); - } - - if (style.run.doubleStrike) { - this.runProperties.push(new formatting.DoubleStrike()); - } - - if (style.run.subScript) { - this.runProperties.push(new formatting.SubScript()); - } - - if (style.run.superScript) { - this.runProperties.push(new formatting.SuperScript()); - } - - if (style.run.underline) { - this.runProperties.push(new formatting.Underline(style.run.underline.type, style.run.underline.color)); - } - - if (style.run.emphasisMark) { - this.runProperties.push(new formatting.EmphasisMark(style.run.emphasisMark.type)); - } - - if (style.run.color) { - this.runProperties.push(new formatting.Color(style.run.color)); - } - - if (style.run.font) { - this.runProperties.push(new formatting.RunFonts(style.run.font)); - } - - if (style.run.highlight) { - this.runProperties.push(new formatting.Highlight(style.run.highlight)); - } - - if (style.run.shadow) { - this.runProperties.push(new formatting.Shading(style.run.shadow.type, style.run.shadow.fill, style.run.shadow.color)); - } - } - - if (style.paragraph) { - if (style.paragraph.alignment) { - this.paragraphProperties.push(new Alignment(style.paragraph.alignment)); - } - - if (style.paragraph.thematicBreak) { - this.paragraphProperties.push(new ThematicBreak()); - } - - if (style.paragraph.rightTabStop) { - this.paragraphProperties.push(new TabStop(TabStopType.RIGHT, style.paragraph.rightTabStop)); - } - - if (style.paragraph.leftTabStop) { - this.paragraphProperties.push(new TabStop(TabStopType.LEFT, style.paragraph.leftTabStop)); - } - - if (style.paragraph.indent) { - this.paragraphProperties.push(new Indent(style.paragraph.indent)); - } - - if (style.paragraph.spacing) { - this.paragraphProperties.push(new Spacing(style.paragraph.spacing)); - } - - if (style.paragraph.keepNext) { - this.paragraphProperties.push(new KeepNext()); - } - - if (style.paragraph.keepLines) { - this.paragraphProperties.push(new KeepLines()); - } - } - } } } diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index c97d8d34fd..a593f6f0ab 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -3,48 +3,13 @@ import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run" import { IXmlableObject, XmlComponent } from "file/xml-components"; import { File } from "../file"; -import { Alignment, AlignmentType } from "./formatting/alignment"; -import { Bidirectional } from "./formatting/bidirectional"; -import { IBorderOptions, ThematicBreak } from "./formatting/border"; -import { IIndentAttributesProperties, Indent } from "./formatting/indent"; -import { KeepLines, KeepNext } from "./formatting/keep"; -import { PageBreak, PageBreakBefore } from "./formatting/page-break"; -import { ContextualSpacing, ISpacingProperties, Spacing } from "./formatting/spacing"; -import { HeadingLevel, Style } from "./formatting/style"; -import { LeaderType, TabStop, TabStopPosition, TabStopType } from "./formatting/tab-stop"; -import { NumberProperties } from "./formatting/unordered-list"; -import { Bookmark, HyperlinkRef, OutlineLevel } from "./links"; -import { ParagraphProperties } from "./properties"; +import { PageBreak } from "./formatting/page-break"; +import { Bookmark, HyperlinkRef } from "./links"; +import { IParagraphPropertiesOptions, ParagraphProperties } from "./properties"; import { PictureRun, Run, SequentialIdentifier, SymbolRun, TextRun } from "./run"; -export interface IParagraphOptions { +export interface IParagraphOptions extends IParagraphPropertiesOptions { readonly text?: string; - readonly border?: IBorderOptions; - readonly spacing?: ISpacingProperties; - readonly outlineLevel?: number; - readonly alignment?: AlignmentType; - readonly heading?: HeadingLevel; - readonly bidirectional?: boolean; - readonly thematicBreak?: boolean; - readonly pageBreakBefore?: boolean; - readonly contextualSpacing?: boolean; - readonly indent?: IIndentAttributesProperties; - readonly keepLines?: boolean; - readonly keepNext?: boolean; - readonly tabStops?: Array<{ - readonly position: number | TabStopPosition; - readonly type: TabStopType; - readonly leader?: LeaderType; - }>; - readonly style?: string; - readonly bullet?: { - readonly level: number; - }; - readonly numbering?: { - readonly reference: string; - readonly level: number; - readonly custom?: boolean; - }; readonly children?: Array< TextRun | PictureRun | SymbolRun | Bookmark | PageBreak | SequentialIdentifier | FootnoteReferenceRun | HyperlinkRef >; @@ -70,9 +35,7 @@ export class Paragraph extends XmlComponent { return; } - this.properties = new ParagraphProperties({ - border: options.border, - }); + this.properties = new ParagraphProperties(options); this.root.push(this.properties); @@ -80,72 +43,6 @@ export class Paragraph extends XmlComponent { this.root.push(new TextRun(options.text)); } - if (options.spacing) { - this.properties.push(new Spacing(options.spacing)); - } - - if (options.outlineLevel !== undefined) { - this.properties.push(new OutlineLevel(options.outlineLevel)); - } - - if (options.alignment) { - this.properties.push(new Alignment(options.alignment)); - } - - if (options.heading) { - this.properties.push(new Style(options.heading)); - } - - if (options.bidirectional) { - this.properties.push(new Bidirectional()); - } - - if (options.thematicBreak) { - this.properties.push(new ThematicBreak()); - } - - if (options.pageBreakBefore) { - this.properties.push(new PageBreakBefore()); - } - - if (options.contextualSpacing) { - this.properties.push(new ContextualSpacing(options.contextualSpacing)); - } - - if (options.indent) { - this.properties.push(new Indent(options.indent)); - } - - if (options.keepLines) { - this.properties.push(new KeepLines()); - } - - if (options.keepNext) { - this.properties.push(new KeepNext()); - } - - if (options.tabStops) { - for (const tabStop of options.tabStops) { - this.properties.push(new TabStop(tabStop.type, tabStop.position, tabStop.leader)); - } - } - - if (options.style) { - this.properties.push(new Style(options.style)); - } - - if (options.bullet) { - this.properties.push(new Style("ListParagraph")); - this.properties.push(new NumberProperties(1, options.bullet.level)); - } - - if (options.numbering) { - if (!options.numbering.custom) { - this.properties.push(new Style("ListParagraph")); - } - this.properties.push(new NumberProperties(options.numbering.reference, options.numbering.level)); - } - if (options.children) { for (const child of options.children) { if (child instanceof Bookmark) { diff --git a/src/file/paragraph/properties.ts b/src/file/paragraph/properties.ts index 35836ce30e..52afbd1dd8 100644 --- a/src/file/paragraph/properties.ts +++ b/src/file/paragraph/properties.ts @@ -1,19 +1,136 @@ // http://officeopenxml.com/WPparagraphProperties.php import { IgnoreIfEmptyXmlComponent, XmlComponent } from "file/xml-components"; +import { Alignment, AlignmentType } from "./formatting/alignment"; +import { Bidirectional } from "./formatting/bidirectional"; +import { Border, IBorderOptions, ThematicBreak } from "./formatting/border"; +import { IIndentAttributesProperties, Indent } from "./formatting/indent"; +import { KeepLines, KeepNext } from "./formatting/keep"; +import { PageBreakBefore } from "./formatting/page-break"; +import { ContextualSpacing, ISpacingProperties, Spacing } from "./formatting/spacing"; +import { HeadingLevel, Style } from "./formatting/style"; +import { LeaderType, TabStop, TabStopPosition, TabStopType } from "./formatting/tab-stop"; +import { NumberProperties } from "./formatting/unordered-list"; +import { OutlineLevel } from "./links"; -import { Border, IBorderOptions } from "./formatting/border"; +export interface IParagraphStylePropertiesOptions { + readonly alignment?: AlignmentType; + readonly thematicBreak?: boolean; + readonly contextualSpacing?: boolean; + readonly rightTabStop?: number; + readonly leftTabStop?: number; + readonly indent?: IIndentAttributesProperties; + readonly spacing?: ISpacingProperties; + readonly keepNext?: boolean; + readonly keepLines?: boolean; + readonly outlineLevel?: number; +} -interface IParagraphPropertiesOptions { +export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOptions { readonly border?: IBorderOptions; + readonly heading?: HeadingLevel; + readonly bidirectional?: boolean; + readonly pageBreakBefore?: boolean; + readonly tabStops?: Array<{ + readonly position: number | TabStopPosition; + readonly type: TabStopType; + readonly leader?: LeaderType; + }>; + readonly style?: string; + readonly bullet?: { + readonly level: number; + }; + readonly numbering?: { + readonly reference: string; + readonly level: number; + readonly custom?: boolean; + }; } export class ParagraphProperties extends IgnoreIfEmptyXmlComponent { - constructor(options: IParagraphPropertiesOptions) { + constructor(options?: IParagraphPropertiesOptions) { super("w:pPr"); + if (!options) { + return; + } + if (options.border) { this.push(new Border(options.border)); } + + if (options.spacing) { + this.push(new Spacing(options.spacing)); + } + + if (options.outlineLevel !== undefined) { + this.push(new OutlineLevel(options.outlineLevel)); + } + + if (options.alignment) { + this.push(new Alignment(options.alignment)); + } + + if (options.heading) { + this.push(new Style(options.heading)); + } + + if (options.bidirectional) { + this.push(new Bidirectional()); + } + + if (options.thematicBreak) { + this.push(new ThematicBreak()); + } + + if (options.pageBreakBefore) { + this.push(new PageBreakBefore()); + } + + if (options.contextualSpacing) { + this.push(new ContextualSpacing(options.contextualSpacing)); + } + + if (options.indent) { + this.push(new Indent(options.indent)); + } + + if (options.keepLines) { + this.push(new KeepLines()); + } + + if (options.keepNext) { + this.push(new KeepNext()); + } + + if (options.tabStops) { + for (const tabStop of options.tabStops) { + this.push(new TabStop(tabStop.type, tabStop.position, tabStop.leader)); + } + } + + if (options.style) { + this.push(new Style(options.style)); + } + + if (options.bullet) { + this.push(new Style("ListParagraph")); + this.push(new NumberProperties(1, options.bullet.level)); + } + + if (options.numbering) { + if (!options.numbering.custom) { + this.push(new Style("ListParagraph")); + } + this.push(new NumberProperties(options.numbering.reference, options.numbering.level)); + } + + if (options.rightTabStop) { + this.push(new TabStop(TabStopType.RIGHT, options.rightTabStop)); + } + + if (options.leftTabStop) { + this.push(new TabStop(TabStopType.LEFT, options.leftTabStop)); + } } public push(item: XmlComponent): void { diff --git a/src/file/paragraph/run/caps.ts b/src/file/paragraph/run/caps.ts deleted file mode 100644 index 0b9fb510be..0000000000 --- a/src/file/paragraph/run/caps.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { XmlComponent } from "file/xml-components"; - -export class SmallCaps extends XmlComponent { - constructor() { - super("w:smallCaps"); - } -} - -export class Caps extends XmlComponent { - constructor() { - super("w:caps"); - } -} diff --git a/src/file/paragraph/run/formatting.ts b/src/file/paragraph/run/formatting.ts index 51b14be5cf..3ef041d7d9 100644 --- a/src/file/paragraph/run/formatting.ts +++ b/src/file/paragraph/run/formatting.ts @@ -115,17 +115,6 @@ export class Imprint extends XmlComponent { } } -/* export class Shadow extends XmlComponent { - constructor() { - super("w:shadow"); - this.root.push( - new Attributes({ - val: true, - }), - ); - } -} */ - export class SmallCaps extends XmlComponent { constructor() { super("w:smallCaps"); diff --git a/src/file/paragraph/run/index.ts b/src/file/paragraph/run/index.ts index 745e33ea5a..3bf62d66cf 100644 --- a/src/file/paragraph/run/index.ts +++ b/src/file/paragraph/run/index.ts @@ -1,4 +1,5 @@ export * from "./run"; +export * from "./properties"; export * from "./text-run"; export * from "./symbol-run"; export * from "./picture-run"; diff --git a/src/file/paragraph/run/properties.ts b/src/file/paragraph/run/properties.ts index 903282b5a6..0bd082afc5 100644 --- a/src/file/paragraph/run/properties.ts +++ b/src/file/paragraph/run/properties.ts @@ -1,8 +1,183 @@ +import { ShadingType } from "file/table"; import { IgnoreIfEmptyXmlComponent, XmlComponent } from "file/xml-components"; +import { EmphasisMark, EmphasisMarkType } from "./emphasis-mark"; +import { + Bold, + BoldComplexScript, + Caps, + CharacterSpacing, + Color, + DoubleStrike, + Highlight, + HighlightComplexScript, + Italics, + ItalicsComplexScript, + RightToLeft, + Shading, + ShadowComplexScript, + Size, + SizeComplexScript, + SmallCaps, + Strike, +} from "./formatting"; +import { IFontAttributesProperties, RunFonts } from "./run-fonts"; +import { SubScript, SuperScript } from "./script"; +import { Style } from "./style"; +import { Underline, UnderlineType } from "./underline"; + +interface IFontOptions { + readonly name: string; + readonly hint?: string; +} + +export interface IRunStylePropertiesOptions { + readonly bold?: boolean; + readonly boldComplexScript?: boolean; + readonly italics?: boolean; + readonly italicsComplexScript?: boolean; + readonly underline?: { + readonly color?: string; + readonly type?: UnderlineType; + }; + readonly emphasisMark?: { + readonly type?: EmphasisMarkType; + }; + readonly color?: string; + readonly size?: number; + readonly sizeComplexScript?: boolean | number; + readonly rightToLeft?: boolean; + readonly smallCaps?: boolean; + readonly allCaps?: boolean; + readonly strike?: boolean; + readonly doubleStrike?: boolean; + readonly subScript?: boolean; + readonly superScript?: boolean; + readonly font?: string | IFontOptions | IFontAttributesProperties; + readonly highlight?: string; + readonly highlightComplexScript?: boolean | string; + readonly characterSpacing?: number; + readonly shading?: { + readonly type: ShadingType; + readonly fill: string; + readonly color: string; + }; + readonly shadingComplexScript?: boolean | IRunStylePropertiesOptions["shading"]; + readonly shadow?: IRunStylePropertiesOptions["shading"]; +} + +export interface IRunPropertiesOptions extends IRunStylePropertiesOptions { + readonly style?: string; +} export class RunProperties extends IgnoreIfEmptyXmlComponent { - constructor() { + constructor(options?: IRunPropertiesOptions) { super("w:rPr"); + + if (!options) { + return; + } + + if (options.bold) { + this.push(new Bold()); + } + if ((options.boldComplexScript === undefined && options.bold) || options.boldComplexScript) { + this.push(new BoldComplexScript()); + } + + if (options.italics) { + this.push(new Italics()); + } + if ((options.italicsComplexScript === undefined && options.italics) || options.italicsComplexScript) { + this.push(new ItalicsComplexScript()); + } + + if (options.underline) { + this.push(new Underline(options.underline.type, options.underline.color)); + } + + if (options.emphasisMark) { + this.push(new EmphasisMark(options.emphasisMark.type)); + } + + if (options.color) { + this.push(new Color(options.color)); + } + + if (options.size) { + this.push(new Size(options.size)); + } + const szCs = + options.sizeComplexScript === undefined || options.sizeComplexScript === true ? options.size : options.sizeComplexScript; + if (szCs) { + this.push(new SizeComplexScript(szCs)); + } + + if (options.rightToLeft) { + this.push(new RightToLeft()); + } + + if (options.smallCaps) { + this.push(new SmallCaps()); + } + + if (options.allCaps) { + this.push(new Caps()); + } + + if (options.strike) { + this.push(new Strike()); + } + + if (options.doubleStrike) { + this.push(new DoubleStrike()); + } + + if (options.subScript) { + this.push(new SubScript()); + } + + if (options.superScript) { + this.push(new SuperScript()); + } + + if (options.style) { + this.push(new Style(options.style)); + } + + if (options.font) { + if (typeof options.font === "string") { + this.push(new RunFonts(options.font)); + } else if ("name" in options.font) { + this.push(new RunFonts(options.font.name, options.font.hint)); + } else { + this.push(new RunFonts(options.font)); + } + } + + if (options.highlight) { + this.push(new Highlight(options.highlight)); + } + const highlightCs = + options.highlightComplexScript === undefined || options.highlightComplexScript === true + ? options.highlight + : options.highlightComplexScript; + if (highlightCs) { + this.push(new HighlightComplexScript(highlightCs)); + } + + if (options.characterSpacing) { + this.push(new CharacterSpacing(options.characterSpacing)); + } + + const shading = options.shading || options.shadow; + if (shading) { + this.push(new Shading(shading.type, shading.fill, shading.color)); + } + const shdCs = + options.shadingComplexScript === undefined || options.shadingComplexScript === true ? shading : options.shadingComplexScript; + if (shdCs) { + this.push(new ShadowComplexScript(shdCs.type, shdCs.fill, shdCs.color)); + } } public push(item: XmlComponent): void { diff --git a/src/file/paragraph/run/run.spec.ts b/src/file/paragraph/run/run.spec.ts index 32904327d8..40cc7055cd 100644 --- a/src/file/paragraph/run/run.spec.ts +++ b/src/file/paragraph/run/run.spec.ts @@ -116,7 +116,7 @@ describe("Run", () => { }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ - "w:r": [{ "w:rPr": [{ "w:smallCaps": {} }] }], + "w:r": [{ "w:rPr": [{ "w:smallCaps": { _attr: { "w:val": true } } }] }], }); }); }); @@ -128,7 +128,7 @@ describe("Run", () => { }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ - "w:r": [{ "w:rPr": [{ "w:caps": {} }] }], + "w:r": [{ "w:rPr": [{ "w:caps": { _attr: { "w:val": true } } }] }], }); }); }); diff --git a/src/file/paragraph/run/run.ts b/src/file/paragraph/run/run.ts index 5a26f3352c..8b5fb0ddd3 100644 --- a/src/file/paragraph/run/run.ts +++ b/src/file/paragraph/run/run.ts @@ -1,69 +1,15 @@ // http://officeopenxml.com/WPtext.php -import { ShadingType } from "file/table"; import { XmlComponent } from "file/xml-components"; import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run"; import { FieldInstruction } from "file/table-of-contents/field-instruction"; import { Break } from "./break"; -import { Caps, SmallCaps } from "./caps"; -import { EmphasisMark, EmphasisMarkType } from "./emphasis-mark"; import { Begin, End, Separate } from "./field"; -import { - Bold, - BoldComplexScript, - Color, - DoubleStrike, - Highlight, - HighlightComplexScript, - Italics, - ItalicsComplexScript, - RightToLeft, - Shading, - ShadowComplexScript, - Size, - SizeComplexScript, - Strike, -} from "./formatting"; import { NumberOfPages, NumberOfPagesSection, Page } from "./page-number"; -import { RunProperties } from "./properties"; +import { IRunPropertiesOptions, RunProperties } from "./properties"; import { Text } from "./run-components/text"; -import { IFontAttributesProperties, RunFonts } from "./run-fonts"; -import { SubScript, SuperScript } from "./script"; -import { Style } from "./style"; -import { Underline, UnderlineType } from "./underline"; -interface IFontOptions { - readonly name: string; - readonly hint?: string; -} - -export interface IRunOptions { - readonly bold?: true; - readonly italics?: true; - readonly underline?: { - readonly color?: string; - readonly type?: UnderlineType; - }; - readonly emphasisMark?: { - readonly type?: EmphasisMarkType; - }; - readonly color?: string; - readonly size?: number; - readonly rightToLeft?: boolean; - readonly smallCaps?: boolean; - readonly allCaps?: boolean; - readonly strike?: boolean; - readonly doubleStrike?: boolean; - readonly subScript?: boolean; - readonly superScript?: boolean; - readonly style?: string; - readonly font?: IFontOptions | IFontAttributesProperties; - readonly highlight?: string; - readonly shading?: { - readonly type: ShadingType; - readonly fill: string; - readonly color: string; - }; +export interface IRunOptions extends IRunPropertiesOptions { readonly children?: Array; readonly text?: string; } @@ -79,86 +25,9 @@ export class Run extends XmlComponent { constructor(options: IRunOptions) { super("w:r"); - this.properties = new RunProperties(); + this.properties = new RunProperties(options); this.root.push(this.properties); - if (options.bold) { - this.properties.push(new Bold()); - this.properties.push(new BoldComplexScript()); - } - - if (options.italics) { - this.properties.push(new Italics()); - this.properties.push(new ItalicsComplexScript()); - } - - if (options.underline) { - this.properties.push(new Underline(options.underline.type, options.underline.color)); - } - - if (options.emphasisMark) { - this.properties.push(new EmphasisMark(options.emphasisMark.type)); - } - - if (options.color) { - this.properties.push(new Color(options.color)); - } - - if (options.size) { - this.properties.push(new Size(options.size)); - this.properties.push(new SizeComplexScript(options.size)); - } - - if (options.rightToLeft) { - this.properties.push(new RightToLeft()); - } - - if (options.smallCaps) { - this.properties.push(new SmallCaps()); - } - - if (options.allCaps) { - this.properties.push(new Caps()); - } - - if (options.strike) { - this.properties.push(new Strike()); - } - - if (options.doubleStrike) { - this.properties.push(new DoubleStrike()); - } - - if (options.subScript) { - this.properties.push(new SubScript()); - } - - if (options.superScript) { - this.properties.push(new SuperScript()); - } - - if (options.style) { - this.properties.push(new Style(options.style)); - } - - if (options.font) { - if ("name" in options.font) { - this.properties.push(new RunFonts(options.font.name, options.font.hint)); - } else { - this.properties.push(new RunFonts(options.font)); - } - } - - if (options.highlight) { - this.properties.push(new Highlight(options.highlight)); - this.properties.push(new HighlightComplexScript(options.highlight)); - } - - if (options.shading) { - this.properties.push(new Shading(options.shading.type, options.shading.fill, options.shading.color)); - this.properties.push(new ShadowComplexScript(options.shading.type, options.shading.fill, options.shading.color)); - } - if (options.children) { for (const child of options.children) { if (typeof child === "string") { diff --git a/src/file/styles/defaults/index.ts b/src/file/styles/defaults/index.ts index 2b6c49e299..1f97bb2b07 100644 --- a/src/file/styles/defaults/index.ts +++ b/src/file/styles/defaults/index.ts @@ -1,15 +1,24 @@ +import { IParagraphStylePropertiesOptions } from "file/paragraph/properties"; +import { IRunStylePropertiesOptions } from "file/paragraph/run/properties"; import { XmlComponent } from "file/xml-components"; import { ParagraphPropertiesDefaults } from "./paragraph-properties"; import { RunPropertiesDefaults } from "./run-properties"; +export interface IDocumentDefaultsOptions { + readonly paragraph?: IParagraphStylePropertiesOptions; + readonly run?: IRunStylePropertiesOptions; +} + export class DocumentDefaults extends XmlComponent { private readonly runPropertiesDefaults: RunPropertiesDefaults; private readonly paragraphPropertiesDefaults: ParagraphPropertiesDefaults; - constructor() { + constructor(options?: IDocumentDefaultsOptions) { super("w:docDefaults"); - this.runPropertiesDefaults = new RunPropertiesDefaults(); - this.paragraphPropertiesDefaults = new ParagraphPropertiesDefaults(); + + this.runPropertiesDefaults = new RunPropertiesDefaults(options && options.run); + this.paragraphPropertiesDefaults = new ParagraphPropertiesDefaults(options && options.paragraph); + this.root.push(this.runPropertiesDefaults); this.root.push(this.paragraphPropertiesDefaults); } diff --git a/src/file/styles/defaults/paragraph-properties.ts b/src/file/styles/defaults/paragraph-properties.ts index c5f2bee86c..cac92575a4 100644 --- a/src/file/styles/defaults/paragraph-properties.ts +++ b/src/file/styles/defaults/paragraph-properties.ts @@ -1,9 +1,9 @@ -import { ParagraphProperties } from "file/paragraph/properties"; +import { IParagraphStylePropertiesOptions, ParagraphProperties } from "file/paragraph/properties"; import { XmlComponent } from "file/xml-components"; export class ParagraphPropertiesDefaults extends XmlComponent { - constructor() { + constructor(options?: IParagraphStylePropertiesOptions) { super("w:pPrDefault"); - this.root.push(new ParagraphProperties({})); + this.root.push(new ParagraphProperties(options)); } } diff --git a/src/file/styles/defaults/run-properties.ts b/src/file/styles/defaults/run-properties.ts index 2228f84de6..7852306faa 100644 --- a/src/file/styles/defaults/run-properties.ts +++ b/src/file/styles/defaults/run-properties.ts @@ -1,14 +1,14 @@ import { Size, SizeComplexScript } from "file/paragraph/run/formatting"; -import { RunProperties } from "file/paragraph/run/properties"; +import { IRunStylePropertiesOptions, RunProperties } from "file/paragraph/run/properties"; import { IFontAttributesProperties, RunFonts } from "file/paragraph/run/run-fonts"; import { XmlComponent } from "file/xml-components"; export class RunPropertiesDefaults extends XmlComponent { private readonly properties: RunProperties; - constructor() { + constructor(options?: IRunStylePropertiesOptions) { super("w:rPrDefault"); - this.properties = new RunProperties(); + this.properties = new RunProperties(options); this.root.push(this.properties); } diff --git a/src/file/styles/index.ts b/src/file/styles/index.ts index 01ddf2d84e..e18813fbb8 100644 --- a/src/file/styles/index.ts +++ b/src/file/styles/index.ts @@ -1,4 +1,4 @@ export * from "./styles"; export * from "./style/character-style"; export * from "./style/paragraph-style"; -export * from "./style-options"; +export * from "./defaults"; diff --git a/src/file/styles/style-options.ts b/src/file/styles/style-options.ts deleted file mode 100644 index 8ce1e6460b..0000000000 --- a/src/file/styles/style-options.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { - AlignmentType, - EmphasisMarkType, - IFontAttributesProperties, - IIndentAttributesProperties, - ISpacingProperties, - UnderlineType, -} from "../paragraph"; -import { ShadingType } from "../table"; - -export interface IRunStyleOptions { - readonly size?: number; - readonly bold?: boolean; - readonly italics?: boolean; - readonly smallCaps?: boolean; - readonly allCaps?: boolean; - readonly strike?: boolean; - readonly doubleStrike?: boolean; - readonly subScript?: boolean; - readonly superScript?: boolean; - readonly underline?: { - readonly type?: UnderlineType; - readonly color?: string; - }; - readonly emphasisMark?: { - readonly type?: EmphasisMarkType; - }; - readonly color?: string; - readonly font?: string | IFontAttributesProperties; - readonly characterSpacing?: number; - readonly highlight?: string; - readonly shadow?: { - readonly type: ShadingType; - readonly fill: string; - readonly color: string; - }; -} - -export interface IParagraphStyleOptions2 { - readonly alignment?: AlignmentType; - readonly thematicBreak?: boolean; - readonly contextualSpacing?: boolean; - readonly rightTabStop?: number; - readonly leftTabStop?: number; - readonly indent?: IIndentAttributesProperties; - readonly spacing?: ISpacingProperties; - readonly keepNext?: boolean; - readonly keepLines?: boolean; - readonly outlineLevel?: number; -} - -// Needed because of: https://github.com/s-panferov/awesome-typescript-loader/issues/432 -/** - * @ignore - */ -export const WORKAROUND4 = ""; diff --git a/src/file/styles/style/character-style.spec.ts b/src/file/styles/style/character-style.spec.ts index 64c866a8c8..70d52c802b 100644 --- a/src/file/styles/style/character-style.spec.ts +++ b/src/file/styles/style/character-style.spec.ts @@ -582,6 +582,7 @@ describe("CharacterStyle", () => { id: "myStyleId", run: { bold: true, + boldComplexScript: false, }, }); const tree = new Formatter().format(style); @@ -610,6 +611,7 @@ describe("CharacterStyle", () => { id: "myStyleId", run: { italics: true, + italicsComplexScript: false, }, }); const tree = new Formatter().format(style); @@ -678,6 +680,7 @@ describe("CharacterStyle", () => { id: "myStyleId", run: { highlight: "005599", + highlightComplexScript: false, }, }); const tree = new Formatter().format(style); @@ -710,6 +713,7 @@ describe("CharacterStyle", () => { fill: "00FFFF", color: "FF0000", }, + shadingComplexScript: false, }, }); const tree = new Formatter().format(style); diff --git a/src/file/styles/style/character-style.ts b/src/file/styles/style/character-style.ts index f0d6c24639..0191a0460e 100644 --- a/src/file/styles/style/character-style.ts +++ b/src/file/styles/style/character-style.ts @@ -1,8 +1,4 @@ -import { EmphasisMarkType } from "file/paragraph/run/emphasis-mark"; -import * as formatting from "file/paragraph/run/formatting"; -import { RunProperties } from "file/paragraph/run/properties"; -import { IFontAttributesProperties } from "file/paragraph/run/run-fonts"; -import { UnderlineType } from "file/paragraph/run/underline"; +import { IRunStylePropertiesOptions, RunProperties } from "file/paragraph/run/properties"; import { BasedOn, Link, SemiHidden, UiPriority, UnhideWhenUsed } from "./components"; import { Style } from "./style"; @@ -11,33 +7,7 @@ export interface IBaseCharacterStyleOptions { readonly basedOn?: string; readonly link?: string; readonly semiHidden?: boolean; - readonly run?: { - readonly size?: number; - readonly bold?: boolean; - readonly italics?: boolean; - readonly smallCaps?: boolean; - readonly allCaps?: boolean; - readonly strike?: boolean; - readonly doubleStrike?: boolean; - readonly subScript?: boolean; - readonly superScript?: boolean; - readonly underline?: { - readonly type?: UnderlineType; - readonly color?: string; - }; - readonly emphasisMark?: { - readonly type?: EmphasisMarkType; - }; - readonly color?: string; - readonly font?: string | IFontAttributesProperties; - readonly characterSpacing?: number; - readonly highlight?: string; - readonly shadow?: { - readonly type: string; - readonly fill: string; - readonly color: string; - }; - }; + readonly run?: IRunStylePropertiesOptions; } export interface ICharacterStyleOptions extends IBaseCharacterStyleOptions { @@ -50,7 +20,9 @@ export class CharacterStyle extends Style { constructor(options: ICharacterStyleOptions) { super({ type: "character", styleId: options.id }, options.name); - this.runProperties = new RunProperties(); + + this.runProperties = new RunProperties(options.run); + this.root.push(this.runProperties); this.root.push(new UiPriority(99)); this.root.push(new UnhideWhenUsed()); @@ -66,72 +38,5 @@ export class CharacterStyle extends Style { if (options.semiHidden) { this.root.push(new SemiHidden()); } - - if (options.run) { - if (options.run.size) { - this.runProperties.push(new formatting.Size(options.run.size)); - this.runProperties.push(new formatting.SizeComplexScript(options.run.size)); - } - - if (options.run.bold) { - this.runProperties.push(new formatting.Bold()); - } - - if (options.run.italics) { - this.runProperties.push(new formatting.Italics()); - } - - if (options.run.smallCaps) { - this.runProperties.push(new formatting.SmallCaps()); - } - - if (options.run.allCaps) { - this.runProperties.push(new formatting.Caps()); - } - - if (options.run.strike) { - this.runProperties.push(new formatting.Strike()); - } - - if (options.run.doubleStrike) { - this.runProperties.push(new formatting.DoubleStrike()); - } - - if (options.run.subScript) { - this.runProperties.push(new formatting.SubScript()); - } - - if (options.run.superScript) { - this.runProperties.push(new formatting.SuperScript()); - } - - if (options.run.underline) { - this.runProperties.push(new formatting.Underline(options.run.underline.type, options.run.underline.color)); - } - - if (options.run.emphasisMark) { - this.runProperties.push(new formatting.EmphasisMark(options.run.emphasisMark.type)); - } - - if (options.run.color) { - this.runProperties.push(new formatting.Color(options.run.color)); - } - - if (options.run.font) { - this.runProperties.push(new formatting.RunFonts(options.run.font)); - } - - if (options.run.characterSpacing) { - this.runProperties.push(new formatting.CharacterSpacing(options.run.characterSpacing)); - } - - if (options.run.highlight) { - this.runProperties.push(new formatting.Highlight(options.run.highlight)); - } - - if (options.run.shadow) { - this.runProperties.push(new formatting.Shading(options.run.shadow.type, options.run.shadow.fill, options.run.shadow.color)); - } - } } } diff --git a/src/file/styles/style/paragraph-style.spec.ts b/src/file/styles/style/paragraph-style.spec.ts index 7d01ef87e7..79e4f20cc7 100644 --- a/src/file/styles/style/paragraph-style.spec.ts +++ b/src/file/styles/style/paragraph-style.spec.ts @@ -548,6 +548,7 @@ describe("ParagraphStyle", () => { id: "myStyleId", run: { bold: true, + boldComplexScript: false, }, }); const tree = new Formatter().format(style); @@ -566,6 +567,7 @@ describe("ParagraphStyle", () => { id: "myStyleId", run: { italics: true, + italicsComplexScript: false, }, }); const tree = new Formatter().format(style); @@ -584,6 +586,7 @@ describe("ParagraphStyle", () => { id: "myStyleId", run: { highlight: "005599", + highlightComplexScript: false, }, }); const tree = new Formatter().format(style); @@ -606,6 +609,7 @@ describe("ParagraphStyle", () => { fill: "00FFFF", color: "FF0000", }, + shadingComplexScript: false, }, }); const tree = new Formatter().format(style); diff --git a/src/file/styles/style/paragraph-style.ts b/src/file/styles/style/paragraph-style.ts index 0a53c9251a..635e7b7e2f 100644 --- a/src/file/styles/style/paragraph-style.ts +++ b/src/file/styles/style/paragraph-style.ts @@ -1,19 +1,6 @@ -import { - Alignment, - ContextualSpacing, - Indent, - KeepLines, - KeepNext, - OutlineLevel, - ParagraphProperties, - Spacing, - ThematicBreak, -} from "file/paragraph"; -import { TabStop, TabStopType } from "file/paragraph/formatting"; -import * as formatting from "file/paragraph/run/formatting"; +import { IParagraphStylePropertiesOptions, IRunStylePropertiesOptions, ParagraphProperties } from "file/paragraph"; import { RunProperties } from "file/paragraph/run/properties"; -import { IParagraphStyleOptions2, IRunStyleOptions } from "../style-options"; import { BasedOn, Link, Next, QuickFormat, SemiHidden, UiPriority, UnhideWhenUsed } from "./components"; import { Style } from "./style"; @@ -25,22 +12,25 @@ export interface IBaseParagraphStyleOptions { readonly semiHidden?: boolean; readonly uiPriority?: number; readonly unhideWhenUsed?: boolean; - readonly run?: IRunStyleOptions; - readonly paragraph?: IParagraphStyleOptions2; + readonly paragraph?: IParagraphStylePropertiesOptions; + readonly run?: IRunStylePropertiesOptions; } export interface IParagraphStyleOptions extends IBaseParagraphStyleOptions { readonly id: string; readonly name?: string; } + export class ParagraphStyle extends Style { private readonly paragraphProperties: ParagraphProperties; private readonly runProperties: RunProperties; constructor(options: IParagraphStyleOptions) { super({ type: "paragraph", styleId: options.id }, options.name); - this.paragraphProperties = new ParagraphProperties({}); - this.runProperties = new RunProperties(); + + this.paragraphProperties = new ParagraphProperties(options.paragraph); + this.runProperties = new RunProperties(options.run); + this.root.push(this.paragraphProperties); this.root.push(this.runProperties); @@ -71,114 +61,5 @@ export class ParagraphStyle extends Style { if (options.unhideWhenUsed) { this.root.push(new UnhideWhenUsed()); } - - if (options.run) { - if (options.run.size) { - this.runProperties.push(new formatting.Size(options.run.size)); - this.runProperties.push(new formatting.SizeComplexScript(options.run.size)); - } - - if (options.run.bold) { - this.runProperties.push(new formatting.Bold()); - } - - if (options.run.italics) { - this.runProperties.push(new formatting.Italics()); - } - - if (options.run.smallCaps) { - this.runProperties.push(new formatting.SmallCaps()); - } - - if (options.run.allCaps) { - this.runProperties.push(new formatting.Caps()); - } - - if (options.run.strike) { - this.runProperties.push(new formatting.Strike()); - } - - if (options.run.doubleStrike) { - this.runProperties.push(new formatting.DoubleStrike()); - } - - if (options.run.subScript) { - this.runProperties.push(new formatting.SubScript()); - } - - if (options.run.superScript) { - this.runProperties.push(new formatting.SuperScript()); - } - - if (options.run.underline) { - this.runProperties.push(new formatting.Underline(options.run.underline.type, options.run.underline.color)); - } - - if (options.run.emphasisMark) { - this.runProperties.push(new formatting.EmphasisMark(options.run.emphasisMark.type)); - } - - if (options.run.color) { - this.runProperties.push(new formatting.Color(options.run.color)); - } - - if (options.run.font) { - this.runProperties.push(new formatting.RunFonts(options.run.font)); - } - - if (options.run.characterSpacing) { - this.runProperties.push(new formatting.CharacterSpacing(options.run.characterSpacing)); - } - - if (options.run.highlight) { - this.runProperties.push(new formatting.Highlight(options.run.highlight)); - } - - if (options.run.shadow) { - this.runProperties.push(new formatting.Shading(options.run.shadow.type, options.run.shadow.fill, options.run.shadow.color)); - } - } - - if (options.paragraph) { - if (options.paragraph.alignment) { - this.paragraphProperties.push(new Alignment(options.paragraph.alignment)); - } - - if (options.paragraph.thematicBreak) { - this.paragraphProperties.push(new ThematicBreak()); - } - - if (options.paragraph.contextualSpacing) { - this.paragraphProperties.push(new ContextualSpacing(options.paragraph.contextualSpacing)); - } - - if (options.paragraph.rightTabStop) { - this.paragraphProperties.push(new TabStop(TabStopType.RIGHT, options.paragraph.rightTabStop)); - } - - if (options.paragraph.leftTabStop) { - this.paragraphProperties.push(new TabStop(TabStopType.LEFT, options.paragraph.leftTabStop)); - } - - if (options.paragraph.indent) { - this.paragraphProperties.push(new Indent(options.paragraph.indent)); - } - - if (options.paragraph.spacing) { - this.paragraphProperties.push(new Spacing(options.paragraph.spacing)); - } - - if (options.paragraph.keepNext) { - this.paragraphProperties.push(new KeepNext()); - } - - if (options.paragraph.keepLines) { - this.paragraphProperties.push(new KeepLines()); - } - - if (options.paragraph.outlineLevel) { - this.paragraphProperties.push(new OutlineLevel(options.paragraph.outlineLevel)); - } - } } } From 75a03f157679411bf9ccfc7a4506f55b8283d203 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 15 Jul 2020 12:46:46 +0800 Subject: [PATCH 097/260] :test: update test for complex script --- src/file/numbering/abstract-numbering.spec.ts | 274 +++++++++---- src/file/styles/style/character-style.spec.ts | 379 ++++++++++++------ src/file/styles/style/paragraph-style.spec.ts | 274 ++++++++----- 3 files changed, 626 insertions(+), 301 deletions(-) diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index 36173364c0..49eae73577 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -283,23 +283,41 @@ describe("AbstractNumbering", () => { }); describe("formatting methods: run properties", () => { - it("#size", () => { - const abstractNumbering = new AbstractNumbering(1, [ - { - level: 0, - format: "lowerRoman", - text: "%0.", - style: { - run: { - size: 24, - sizeComplexScript: false, + const sizeTests = [ + { + size: 24, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: true, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: false, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: 26, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 26 } } }], + }, + ]; + sizeTests.forEach(({ size, sizeComplexScript, expected }) => { + it(`#size ${size} cs ${sizeComplexScript}`, () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { size, sizeComplexScript }, }, }, - }, - ]); - const tree = new Formatter().format(abstractNumbering); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ - "w:rPr": [{ "w:sz": { _attr: { "w:val": 24 } } }], + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:rPr": expected }); }); }); @@ -479,87 +497,185 @@ describe("AbstractNumbering", () => { }); }); - it("#bold", () => { - const abstractNumbering = new AbstractNumbering(1, [ - { - level: 0, - format: "lowerRoman", - text: "%0.", - style: { - run: { - bold: true, - boldComplexScript: false, + const boldTests = [ + { + bold: true, + expected: [{ "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true } } }], + }, + { + bold: true, + boldComplexScript: true, + expected: [{ "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true } } }], + }, + { + bold: true, + boldComplexScript: false, + expected: [{ "w:b": { _attr: { "w:val": true } } }], + }, + ]; + boldTests.forEach(({ bold, boldComplexScript, expected }) => { + it(`#bold ${bold} cs ${boldComplexScript}`, () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { bold, boldComplexScript }, }, }, - }, - ]); - const tree = new Formatter().format(abstractNumbering); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ - "w:rPr": [{ "w:b": { _attr: { "w:val": true } } }], + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:rPr": expected }); }); }); - it("#italics", () => { - const abstractNumbering = new AbstractNumbering(1, [ - { - level: 0, - format: "lowerRoman", - text: "%0.", - style: { - run: { - italics: true, - italicsComplexScript: false, + const italicsTests = [ + { + italics: true, + expected: [{ "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }], + }, + { + italics: true, + italicsComplexScript: true, + expected: [{ "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }], + }, + { + italics: true, + italicsComplexScript: false, + expected: [{ "w:i": { _attr: { "w:val": true } } }], + }, + ]; + italicsTests.forEach(({ italics, italicsComplexScript, expected }) => { + it(`#italics ${italics} cs ${italicsComplexScript}`, () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { italics, italicsComplexScript }, }, }, - }, - ]); - const tree = new Formatter().format(abstractNumbering); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ - "w:rPr": [{ "w:i": { _attr: { "w:val": true } } }], + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:rPr": expected }); }); }); - it("#highlight", () => { - const abstractNumbering = new AbstractNumbering(1, [ - { - level: 0, - format: "lowerRoman", - text: "%0.", - style: { - run: { - highlight: "005599", - highlightComplexScript: false, + const highlightTests = [ + { + highlight: "005599", + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: true, + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: false, + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: "550099", + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "550099" } } }], + }, + ]; + highlightTests.forEach(({ highlight, highlightComplexScript, expected }) => { + it(`#highlight ${highlight} cs ${highlightComplexScript}`, () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { highlight, highlightComplexScript }, }, }, - }, - ]); - const tree = new Formatter().format(abstractNumbering); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ - "w:rPr": [{ "w:highlight": { _attr: { "w:val": "005599" } } }], + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:rPr": expected }); }); }); - it("#shadow", () => { - const abstractNumbering = new AbstractNumbering(1, [ - { - level: 0, - format: "lowerRoman", - text: "%0.", - style: { - run: { - shadow: { - type: ShadingType.PERCENT_10, - fill: "00FFFF", - color: "FF0000", - }, - shadingComplexScript: false, + const shadingTests = [ + { + shadow: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: true, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: false, + expected: [{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "00FF00", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "00FF00" } } }, + ], + }, + ]; + shadingTests.forEach(({ shadow, shading, shadingComplexScript, expected }) => { + it("#shadow correctly", () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 0, + format: "lowerRoman", + text: "%0.", + style: { + run: { shadow, shading, shadingComplexScript }, }, }, - }, - ]); - const tree = new Formatter().format(abstractNumbering); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ - "w:rPr": [{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }], + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:rPr": expected }); }); }); diff --git a/src/file/styles/style/character-style.spec.ts b/src/file/styles/style/character-style.spec.ts index 70d52c802b..2fddce1c1b 100644 --- a/src/file/styles/style/character-style.spec.ts +++ b/src/file/styles/style/character-style.spec.ts @@ -334,31 +334,52 @@ describe("CharacterStyle", () => { }); describe("formatting methods: run properties", () => { - it("#size", () => { - const style = new CharacterStyle({ - id: "myStyleId", - run: { - size: 24, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], - }, - { - "w:uiPriority": { - _attr: { - "w:val": 99, + const sizeTests = [ + { + size: 24, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: true, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: false, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: 26, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 26 } } }], + }, + ]; + sizeTests.forEach(({ size, sizeComplexScript, expected }) => { + it(`#size ${size} cs ${sizeComplexScript}`, () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { size, sizeComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": expected, + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, }, }, - }, - { - "w:unhideWhenUsed": EMPTY_OBJECT, - }, - ], + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); }); }); @@ -577,61 +598,91 @@ describe("CharacterStyle", () => { }); }); - it("#bold", () => { - const style = new CharacterStyle({ - id: "myStyleId", - run: { - bold: true, - boldComplexScript: false, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:b": { _attr: { "w:val": true } } }], - }, - { - "w:uiPriority": { - _attr: { - "w:val": 99, + const boldTests = [ + { + bold: true, + expected: [{ "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true } } }], + }, + { + bold: true, + boldComplexScript: true, + expected: [{ "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true } } }], + }, + { + bold: true, + boldComplexScript: false, + expected: [{ "w:b": { _attr: { "w:val": true } } }], + }, + ]; + boldTests.forEach(({ bold, boldComplexScript, expected }) => { + it(`#bold ${bold} cs ${boldComplexScript}`, () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { bold, boldComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": expected, + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, }, }, - }, - { - "w:unhideWhenUsed": EMPTY_OBJECT, - }, - ], + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); }); }); - it("#italics", () => { - const style = new CharacterStyle({ - id: "myStyleId", - run: { - italics: true, - italicsComplexScript: false, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:i": { _attr: { "w:val": true } } }], - }, - { - "w:uiPriority": { - _attr: { - "w:val": 99, + const italicsTests = [ + { + italics: true, + expected: [{ "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }], + }, + { + italics: true, + italicsComplexScript: true, + expected: [{ "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }], + }, + { + italics: true, + italicsComplexScript: false, + expected: [{ "w:i": { _attr: { "w:val": true } } }], + }, + ]; + italicsTests.forEach(({ italics, italicsComplexScript, expected }) => { + it(`#italics ${italics} cs ${italicsComplexScript}`, () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { italics, italicsComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": expected, + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, }, }, - }, - { - "w:unhideWhenUsed": EMPTY_OBJECT, - }, - ], + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); }); }); @@ -675,75 +726,141 @@ describe("CharacterStyle", () => { }); }); - it("#highlight", () => { - const style = new CharacterStyle({ - id: "myStyleId", - run: { - highlight: "005599", - highlightComplexScript: false, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:highlight": { _attr: { "w:val": "005599" } } }], - }, - { - "w:uiPriority": { - _attr: { - "w:val": 99, + const highlightTests = [ + { + highlight: "005599", + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: true, + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: false, + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: "550099", + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "550099" } } }], + }, + ]; + highlightTests.forEach(({ highlight, highlightComplexScript, expected }) => { + it(`#highlight ${highlight} cs ${highlightComplexScript}`, () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { highlight, highlightComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": expected, + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, + }, }, }, - }, - { - "w:unhideWhenUsed": EMPTY_OBJECT, - }, - ], + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); }); }); - it("#shadow", () => { - const style = new CharacterStyle({ - id: "myStyleId", - run: { - shadow: { - type: ShadingType.PERCENT_10, - fill: "00FFFF", - color: "FF0000", - }, - shadingComplexScript: false, + const shadingTests = [ + { + shadow: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, - { - "w:rPr": [ - { - "w:shd": { - _attr: { - "w:val": "pct10", - "w:fill": "00FFFF", - "w:color": "FF0000", - }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: true, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: false, + expected: [{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "00FF00", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "00FF00" } } }, + ], + }, + ]; + shadingTests.forEach(({ shadow, shading, shadingComplexScript, expected }) => { + it("#shadow correctly", () => { + const style = new CharacterStyle({ + id: "myStyleId", + run: { shadow, shading, shadingComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "character", "w:styleId": "myStyleId" } }, + { + "w:rPr": expected, + }, + { + "w:uiPriority": { + _attr: { + "w:val": 99, }, }, - ], - }, - { - "w:uiPriority": { - _attr: { - "w:val": 99, - }, }, - }, - { - "w:unhideWhenUsed": EMPTY_OBJECT, - }, - ], + { + "w:unhideWhenUsed": EMPTY_OBJECT, + }, + ], + }); }); }); }); diff --git a/src/file/styles/style/paragraph-style.spec.ts b/src/file/styles/style/paragraph-style.spec.ts index 79e4f20cc7..92b798f862 100644 --- a/src/file/styles/style/paragraph-style.spec.ts +++ b/src/file/styles/style/paragraph-style.spec.ts @@ -358,21 +358,37 @@ describe("ParagraphStyle", () => { }); describe("formatting methods: run properties", () => { - it("#size", () => { - const style = new ParagraphStyle({ - id: "myStyleId", - run: { - size: 24, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], - }, - ], + const sizeTests = [ + { + size: 24, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: true, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: false, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }], + }, + { + size: 24, + sizeComplexScript: 26, + expected: [{ "w:sz": { _attr: { "w:val": 24 } } }, { "w:szCs": { _attr: { "w:val": 26 } } }], + }, + ]; + sizeTests.forEach(({ size, sizeComplexScript, expected }) => { + it(`#size ${size} cs ${sizeComplexScript}`, () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { size, sizeComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:rPr": expected }], + }); }); }); @@ -543,93 +559,169 @@ describe("ParagraphStyle", () => { }); }); - it("#bold", () => { - const style = new ParagraphStyle({ - id: "myStyleId", - run: { - bold: true, - boldComplexScript: false, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:b": { _attr: { "w:val": true } } }], - }, - ], + const boldTests = [ + { + bold: true, + expected: [{ "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true } } }], + }, + { + bold: true, + boldComplexScript: true, + expected: [{ "w:b": { _attr: { "w:val": true } } }, { "w:bCs": { _attr: { "w:val": true } } }], + }, + { + bold: true, + boldComplexScript: false, + expected: [{ "w:b": { _attr: { "w:val": true } } }], + }, + ]; + boldTests.forEach(({ bold, boldComplexScript, expected }) => { + it(`#bold ${bold} cs ${boldComplexScript}`, () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { bold, boldComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:rPr": expected }], + }); }); }); - it("#italics", () => { - const style = new ParagraphStyle({ - id: "myStyleId", - run: { - italics: true, - italicsComplexScript: false, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:i": { _attr: { "w:val": true } } }], - }, - ], + const italicsTests = [ + { + italics: true, + expected: [{ "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }], + }, + { + italics: true, + italicsComplexScript: true, + expected: [{ "w:i": { _attr: { "w:val": true } } }, { "w:iCs": { _attr: { "w:val": true } } }], + }, + { + italics: true, + italicsComplexScript: false, + expected: [{ "w:i": { _attr: { "w:val": true } } }], + }, + ]; + italicsTests.forEach(({ italics, italicsComplexScript, expected }) => { + it(`#italics ${italics} cs ${italicsComplexScript}`, () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { italics, italicsComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:rPr": expected }], + }); }); }); - it("#highlight", () => { - const style = new ParagraphStyle({ - id: "myStyleId", - run: { - highlight: "005599", - highlightComplexScript: false, - }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, - { - "w:rPr": [{ "w:highlight": { _attr: { "w:val": "005599" } } }], - }, - ], + const highlightTests = [ + { + highlight: "005599", + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: true, + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: false, + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }], + }, + { + highlight: "005599", + highlightComplexScript: "550099", + expected: [{ "w:highlight": { _attr: { "w:val": "005599" } } }, { "w:highlightCs": { _attr: { "w:val": "550099" } } }], + }, + ]; + highlightTests.forEach(({ highlight, highlightComplexScript, expected }) => { + it(`#highlight ${highlight} cs ${highlightComplexScript}`, () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { highlight, highlightComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:rPr": expected }], + }); }); }); - it("#shadow", () => { - const style = new ParagraphStyle({ - id: "myStyleId", - run: { - shadow: { - type: ShadingType.PERCENT_10, - fill: "00FFFF", - color: "FF0000", - }, - shadingComplexScript: false, + const shadingTests = [ + { + shadow: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", }, - }); - const tree = new Formatter().format(style); - expect(tree).to.deep.equal({ - "w:style": [ - { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, - { - "w:rPr": [ - { - "w:shd": { - _attr: { - "w:val": "pct10", - "w:fill": "00FFFF", - "w:color": "FF0000", - }, - }, - }, - ], - }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: true, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + ], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: false, + expected: [{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }], + }, + { + shading: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "FF0000", + }, + shadingComplexScript: { + type: ShadingType.PERCENT_10, + fill: "00FFFF", + color: "00FF00", + }, + expected: [ + { "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } }, + { "w:shdCs": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "00FF00" } } }, + ], + }, + ]; + shadingTests.forEach(({ shadow, shading, shadingComplexScript, expected }) => { + it("#shadow correctly", () => { + const style = new ParagraphStyle({ + id: "myStyleId", + run: { shadow, shading, shadingComplexScript }, + }); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, { "w:rPr": expected }], + }); }); }); From 36e1c5fe6a72d8b4d41e07923201f70970a1137d Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 15 Jul 2020 14:10:37 +0800 Subject: [PATCH 098/260] :feat: refined defaults --- src/file/styles/defaults/document-defaults.ts | 25 +++++++++++++++++ src/file/styles/defaults/index.ts | 28 ++----------------- src/file/styles/defaults/run-properties.ts | 13 --------- 3 files changed, 28 insertions(+), 38 deletions(-) create mode 100644 src/file/styles/defaults/document-defaults.ts diff --git a/src/file/styles/defaults/document-defaults.ts b/src/file/styles/defaults/document-defaults.ts new file mode 100644 index 0000000000..1f97bb2b07 --- /dev/null +++ b/src/file/styles/defaults/document-defaults.ts @@ -0,0 +1,25 @@ +import { IParagraphStylePropertiesOptions } from "file/paragraph/properties"; +import { IRunStylePropertiesOptions } from "file/paragraph/run/properties"; +import { XmlComponent } from "file/xml-components"; +import { ParagraphPropertiesDefaults } from "./paragraph-properties"; +import { RunPropertiesDefaults } from "./run-properties"; + +export interface IDocumentDefaultsOptions { + readonly paragraph?: IParagraphStylePropertiesOptions; + readonly run?: IRunStylePropertiesOptions; +} + +export class DocumentDefaults extends XmlComponent { + private readonly runPropertiesDefaults: RunPropertiesDefaults; + private readonly paragraphPropertiesDefaults: ParagraphPropertiesDefaults; + + constructor(options?: IDocumentDefaultsOptions) { + super("w:docDefaults"); + + this.runPropertiesDefaults = new RunPropertiesDefaults(options && options.run); + this.paragraphPropertiesDefaults = new ParagraphPropertiesDefaults(options && options.paragraph); + + this.root.push(this.runPropertiesDefaults); + this.root.push(this.paragraphPropertiesDefaults); + } +} diff --git a/src/file/styles/defaults/index.ts b/src/file/styles/defaults/index.ts index 1f97bb2b07..986aa6194d 100644 --- a/src/file/styles/defaults/index.ts +++ b/src/file/styles/defaults/index.ts @@ -1,25 +1,3 @@ -import { IParagraphStylePropertiesOptions } from "file/paragraph/properties"; -import { IRunStylePropertiesOptions } from "file/paragraph/run/properties"; -import { XmlComponent } from "file/xml-components"; -import { ParagraphPropertiesDefaults } from "./paragraph-properties"; -import { RunPropertiesDefaults } from "./run-properties"; - -export interface IDocumentDefaultsOptions { - readonly paragraph?: IParagraphStylePropertiesOptions; - readonly run?: IRunStylePropertiesOptions; -} - -export class DocumentDefaults extends XmlComponent { - private readonly runPropertiesDefaults: RunPropertiesDefaults; - private readonly paragraphPropertiesDefaults: ParagraphPropertiesDefaults; - - constructor(options?: IDocumentDefaultsOptions) { - super("w:docDefaults"); - - this.runPropertiesDefaults = new RunPropertiesDefaults(options && options.run); - this.paragraphPropertiesDefaults = new ParagraphPropertiesDefaults(options && options.paragraph); - - this.root.push(this.runPropertiesDefaults); - this.root.push(this.paragraphPropertiesDefaults); - } -} +export * from "./paragraph-properties"; +export * from "./run-properties"; +export * from "./document-defaults"; diff --git a/src/file/styles/defaults/run-properties.ts b/src/file/styles/defaults/run-properties.ts index 7852306faa..f4e594ab99 100644 --- a/src/file/styles/defaults/run-properties.ts +++ b/src/file/styles/defaults/run-properties.ts @@ -1,6 +1,4 @@ -import { Size, SizeComplexScript } from "file/paragraph/run/formatting"; import { IRunStylePropertiesOptions, RunProperties } from "file/paragraph/run/properties"; -import { IFontAttributesProperties, RunFonts } from "file/paragraph/run/run-fonts"; import { XmlComponent } from "file/xml-components"; export class RunPropertiesDefaults extends XmlComponent { @@ -11,15 +9,4 @@ export class RunPropertiesDefaults extends XmlComponent { this.properties = new RunProperties(options); this.root.push(this.properties); } - - public size(size: number): RunPropertiesDefaults { - this.properties.push(new Size(size)); - this.properties.push(new SizeComplexScript(size)); - return this; - } - - public font(font: string | IFontAttributesProperties): RunPropertiesDefaults { - this.properties.push(new RunFonts(font)); - return this; - } } From 3f7ca6bbffdffe631ea3348591d04570b20905a4 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 15 Jul 2020 14:11:26 +0800 Subject: [PATCH 099/260] :test: document defaults & numbering suffix --- src/file/numbering/abstract-numbering.spec.ts | 15 +++++++ .../styles/defaults/document-defaults.spec.ts | 45 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 src/file/styles/defaults/document-defaults.spec.ts diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index 49eae73577..ef1df0de4c 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -7,6 +7,7 @@ import { AlignmentType, EmphasisMarkType, TabStopPosition } from "../paragraph"; import { UnderlineType } from "../paragraph/run/underline"; import { ShadingType } from "../table"; import { AbstractNumbering } from "./abstract-numbering"; +import { LevelSuffix } from "./level"; describe("AbstractNumbering", () => { it("stores its ID at its .id property", () => { @@ -48,6 +49,20 @@ describe("AbstractNumbering", () => { expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:lvlText": { _attr: { "w:val": "%1)" } } }); }); + it("has suffix", () => { + const abstractNumbering = new AbstractNumbering(1, [ + { + level: 3, + format: "lowerLetter", + text: "%1)", + alignment: AlignmentType.END, + suffix: LevelSuffix.SPACE, + }, + ]); + const tree = new Formatter().format(abstractNumbering); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:suff": { _attr: { "w:val": "space" } } }); + }); + describe("formatting methods: paragraph properties", () => { it("#indent", () => { const abstractNumbering = new AbstractNumbering(1, [ diff --git a/src/file/styles/defaults/document-defaults.spec.ts b/src/file/styles/defaults/document-defaults.spec.ts new file mode 100644 index 0000000000..79ca9cccf7 --- /dev/null +++ b/src/file/styles/defaults/document-defaults.spec.ts @@ -0,0 +1,45 @@ +import { expect } from "chai"; + +import { DocumentDefaults } from "./document-defaults"; + +import { Formatter } from "export/formatter"; + +describe("DocumentDefaults", () => { + it("#constructor", () => { + const defaults = new DocumentDefaults({ + paragraph: { spacing: { line: 240 } }, + run: { color: "808080" }, + }); + const tree = new Formatter().format(defaults); + expect(tree).to.deep.equal({ + "w:docDefaults": [ + { + "w:rPrDefault": [ + { + "w:rPr": [ + { + "w:color": { _attr: { "w:val": "808080" } }, + }, + ], + }, + ], + }, + { + "w:pPrDefault": [ + { + "w:pPr": [ + { + "w:spacing": { + _attr: { + "w:line": 240, + }, + }, + }, + ], + }, + ], + }, + ], + }); + }); +}); From 7baa696a763c9133b42b3fd3b842231bfd367860 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Wed, 15 Jul 2020 14:11:59 +0800 Subject: [PATCH 100/260] :feat: coverage ignore file `src/import-dotx/import-dotx.ts` --- .nycrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.nycrc b/.nycrc index 41a461385e..2c14e11a79 100644 --- a/.nycrc +++ b/.nycrc @@ -8,7 +8,8 @@ "src/**/*.ts" ], "exclude": [ - "src/**/*.spec.ts" + "src/**/*.spec.ts", + "src/import-dotx/import-dotx.ts" ], "reporter": [ "lcov", From 445a2896d25f59c89818e14b38cb90db55f764d0 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 16 Jul 2020 12:35:47 +0100 Subject: [PATCH 101/260] Add React example --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index be6eca6898..894cd2c7d2 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ Here is an example of `docx` working in `Angular`: * https://stackblitz.com/edit/angular-afvxtz +Here is an example of `docx` working in `React`: + +* https://stackblitz.com/edit/react-ts-qq25sp + ## Node Press `endpoint` on the `RunKit` website: From 6b3d1d55795d099e7b28f1ad2954ea74b8c54942 Mon Sep 17 00:00:00 2001 From: SoapyD Date: Thu, 16 Jul 2020 12:37:24 +0000 Subject: [PATCH 102/260] modifications make to table-row files to correct table-row height property. Code was previously using height.height ini setHeight but should instead be using value. --- src/file/table/table-row/table-row-height.ts | 6 +++--- src/file/table/table-row/table-row-properties.ts | 4 ++-- src/file/table/table-row/table-row.spec.ts | 2 +- src/file/table/table-row/table-row.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/file/table/table-row/table-row-height.ts b/src/file/table/table-row/table-row-height.ts index 71e2c36aa1..79e4266201 100644 --- a/src/file/table/table-row/table-row-height.ts +++ b/src/file/table/table-row/table-row-height.ts @@ -10,12 +10,12 @@ export enum HeightRule { } interface ITableRowHeight { - readonly height: number; + readonly value: number; readonly rule: HeightRule; } export class TableRowHeightAttributes extends XmlAttributeComponent { - protected readonly xmlKeys = { height: "w:val", rule: "w:hRule" }; + protected readonly xmlKeys = { value: "w:val", rule: "w:hRule" }; } export class TableRowHeight extends XmlComponent { @@ -24,7 +24,7 @@ export class TableRowHeight extends XmlComponent { this.root.push( new TableRowHeightAttributes({ - height: value, + value: value, rule: rule, }), ); diff --git a/src/file/table/table-row/table-row-properties.ts b/src/file/table/table-row/table-row-properties.ts index c9b60c13f4..041fb2b640 100644 --- a/src/file/table/table-row/table-row-properties.ts +++ b/src/file/table/table-row/table-row-properties.ts @@ -18,8 +18,8 @@ export class TableRowProperties extends IgnoreIfEmptyXmlComponent { return this; } - public setHeight(height: number, rule: HeightRule): TableRowProperties { - this.root.push(new TableRowHeight(height, rule)); + public setHeight(value: number, rule: HeightRule): TableRowProperties { + this.root.push(new TableRowHeight(value, rule)); return this; } diff --git a/src/file/table/table-row/table-row.spec.ts b/src/file/table/table-row/table-row.spec.ts index 90f6ad4937..16a08e10ae 100644 --- a/src/file/table/table-row/table-row.spec.ts +++ b/src/file/table/table-row/table-row.spec.ts @@ -92,7 +92,7 @@ describe("TableRow", () => { const tableRow = new TableRow({ children: [], height: { - height: 100, + value: 100, rule: HeightRule.EXACT, }, }); diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 11ea0bb2e2..5f2e03105a 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -7,7 +7,7 @@ export interface ITableRowOptions { readonly cantSplit?: boolean; readonly tableHeader?: boolean; readonly height?: { - readonly height: number; + readonly value: number; readonly rule: HeightRule; }; readonly children: TableCell[]; @@ -34,7 +34,7 @@ export class TableRow extends XmlComponent { } if (options.height) { - this.properties.setHeight(options.height.height, options.height.rule); + this.properties.setHeight(options.height.value, options.height.rule); } } From 04619075337a9a6caaed5eff5aefa0ba57afc050 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 16 Jul 2020 14:13:55 +0100 Subject: [PATCH 103/260] Add VueJS example --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 894cd2c7d2..5773bff3b7 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ Here is an example of `docx` working in `React`: * https://stackblitz.com/edit/react-ts-qq25sp +Here is an example of `docx` working in `VueJS`: + +* https://stackblitz.com/edit/vuejs-docx + ## Node Press `endpoint` on the `RunKit` website: From 9202524d838fb263e41a68fdd96b4c5bd4ce433f Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 16 Jul 2020 14:15:47 +0100 Subject: [PATCH 104/260] Fix Vue.js stylistics --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5773bff3b7..2c4d10ab3e 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Here is an example of `docx` working in `React`: * https://stackblitz.com/edit/react-ts-qq25sp -Here is an example of `docx` working in `VueJS`: +Here is an example of `docx` working in `Vue.js`: * https://stackblitz.com/edit/vuejs-docx From edec2eca7a8e0935e2e8fd300800ba0c105f784e Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 16 Jul 2020 16:08:50 +0100 Subject: [PATCH 105/260] Add another React example --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2c4d10ab3e..c366a1f922 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Here is an example of `docx` working in `Angular`: Here is an example of `docx` working in `React`: * https://stackblitz.com/edit/react-ts-qq25sp +* https://stackblitz.com/edit/react-ts-qdqu7z (adding images to Word Document) Here is an example of `docx` working in `Vue.js`: From 96f08482dacc1f5a575a2b9d52b974aab8306822 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2020 20:24:56 +0000 Subject: [PATCH 106/260] Bump @types/node from 14.0.5 to 14.0.23 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.5 to 14.0.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..06072e7b89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -319,9 +319,9 @@ "dev": true }, "@types/node": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", - "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==" + "version": "14.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", + "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==" }, "@types/request": { "version": "2.48.1", @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2586,7 +2586,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4351,7 +4351,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4483,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4812,7 +4812,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5518,7 +5518,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5695,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5766,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7034,7 +7034,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7482,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7586,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8015,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8231,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8257,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8391,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8435,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From 437de27ed8d293dab42d9703fcf1e09c8a970cb1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2020 20:25:17 +0000 Subject: [PATCH 107/260] [Security] Bump handlebars from 4.5.3 to 4.7.6 Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.5.3 to 4.7.6. **This update includes a security fix.** - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.5.3...v4.7.6) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 93 +++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..d62783f526 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2586,7 +2586,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -3573,15 +3573,30 @@ "dev": true }, "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "dev": true, "requires": { + "minimist": "^1.2.5", "neo-async": "^2.6.0", - "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } } }, "har-schema": { @@ -4351,7 +4366,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4498,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4812,7 +4827,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5474,24 +5489,6 @@ "pinkie-promise": "^2.0.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, "options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", @@ -5518,7 +5515,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5692,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5763,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7034,7 +7031,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7479,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7583,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8012,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8228,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8249,15 +8246,9 @@ } } }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8382,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8426,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From 1834cd86da738a056ef47f69048d18d24440fc44 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2020 20:25:38 +0000 Subject: [PATCH 108/260] Bump jszip from 3.2.2 to 3.5.0 Bumps [jszip](https://github.com/Stuk/jszip) from 3.2.2 to 3.5.0. - [Release notes](https://github.com/Stuk/jszip/releases) - [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md) - [Commits](https://github.com/Stuk/jszip/compare/v3.2.2...v3.5.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 81 +++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..59569e5fe1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -1612,7 +1612,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cp-file": { "version": "4.2.0", @@ -2586,7 +2587,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -3785,7 +3786,8 @@ "immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true }, "import-lazy": { "version": "2.1.0", @@ -3812,7 +3814,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ini": { "version": "1.3.5", @@ -4160,7 +4163,8 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isexe": { "version": "2.0.0", @@ -4351,7 +4355,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4416,9 +4420,10 @@ } }, "jszip": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", - "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", + "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", + "dev": true, "requires": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -4466,6 +4471,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, "requires": { "immediate": "~3.0.5" } @@ -4483,7 +4489,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4812,7 +4818,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5518,7 +5524,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5606,7 +5612,8 @@ "pako": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "dev": true }, "parent-require": { "version": "1.0.0", @@ -5695,7 +5702,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5773,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -5864,7 +5871,8 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "progress": { "version": "2.0.3", @@ -6042,6 +6050,7 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -6463,7 +6472,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safe-regex": { "version": "1.1.0", @@ -6572,7 +6582,8 @@ "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true }, "set-value": { "version": "2.0.1", @@ -7028,13 +7039,14 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7494,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7598,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -7775,7 +7787,8 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "utile": { "version": "0.3.0", @@ -8015,7 +8028,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8244,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8270,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8404,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8448,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From a8993f14d690b88a6d0b2d6696f3ce47efeb12ac Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2020 20:26:36 +0000 Subject: [PATCH 109/260] Bump @types/mocha from 2.2.48 to 8.0.0 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 2.2.48 to 8.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 50 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..6445565caa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -313,9 +313,9 @@ "dev": true }, "@types/mocha": { - "version": "2.2.48", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", - "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.0.tgz", + "integrity": "sha512-jWeYcTo3sCH/rMgsdYXDTO85GNRyTCII5dayMIu/ZO4zbEot1E3iNGaOwpLReLUHjeNQFkgeNNVYlY4dX6azQQ==", "dev": true }, "@types/node": { @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2586,7 +2586,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4351,7 +4351,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4483,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4812,7 +4812,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5518,7 +5518,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5695,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5766,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7034,7 +7034,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7482,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7586,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8015,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8231,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8257,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8391,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8435,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { diff --git a/package.json b/package.json index d88a3731f6..62e810a418 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "homepage": "https://github.com/dolanmiu/docx#readme", "devDependencies": { "@types/chai": "^3.4.35", - "@types/mocha": "^2.2.39", + "@types/mocha": "^8.0.0", "@types/request-promise": "^4.1.42", "@types/shortid": "0.0.29", "@types/sinon": "^4.3.1", From 25a0212f4eabc6af5c424befb9257a35c9ed147b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2020 08:41:22 +0000 Subject: [PATCH 110/260] [Security] Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. **This update includes a security fix.** - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..ab2d218959 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2586,7 +2586,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4351,7 +4351,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4483,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4530,9 +4530,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "lodash.assign": { @@ -4812,7 +4812,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5518,7 +5518,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5695,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5766,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7034,7 +7034,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7482,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7586,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8015,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8231,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8257,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8391,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8435,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From ab12ff12570c0de4849df8f070e1879332e09378 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2020 08:42:58 +0000 Subject: [PATCH 111/260] Bump @types/sinon from 4.3.3 to 9.0.4 Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 4.3.3 to 9.0.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 59 +++++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..ddd613ca1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -362,9 +362,18 @@ "dev": true }, "@types/sinon": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-4.3.3.tgz", - "integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.4.tgz", + "integrity": "sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", + "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", "dev": true }, "@types/tapable": { @@ -702,7 +711,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +740,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +808,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1516,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2586,7 +2595,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4351,7 +4360,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4492,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4812,7 +4821,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5518,7 +5527,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5704,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5775,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7034,7 +7043,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7491,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7595,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8024,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8240,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8266,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8400,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8444,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { diff --git a/package.json b/package.json index d88a3731f6..c05703c591 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@types/mocha": "^2.2.39", "@types/request-promise": "^4.1.42", "@types/shortid": "0.0.29", - "@types/sinon": "^4.3.1", + "@types/sinon": "^9.0.4", "@types/webpack": "^4.4.24", "awesome-typescript-loader": "^3.4.1", "chai": "^3.5.0", From e2d60978198e1d3ed7df01613148463612fe563e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2020 08:43:39 +0000 Subject: [PATCH 112/260] Bump glob from 7.1.4 to 7.1.6 Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.4 to 7.1.6. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v7.1.4...v7.1.6) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78bcd81aee..064553ba69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.1.1", + "version": "5.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -191,7 +191,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -702,7 +702,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -731,7 +731,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -799,7 +799,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1507,7 +1507,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2586,7 +2586,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -3425,9 +3425,9 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -4351,7 +4351,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4483,7 +4483,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4812,7 +4812,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5518,7 +5518,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5695,7 +5695,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5766,7 +5766,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7034,7 +7034,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7482,7 +7482,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true } @@ -7586,7 +7586,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8015,7 +8015,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8231,13 +8231,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8257,7 +8257,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8391,7 +8391,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8435,7 +8435,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From 1e8ca123b0efc52e56ecbf9097ad16379fc6ce7b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 08:57:50 +0000 Subject: [PATCH 113/260] Bump request-promise from 4.2.4 to 4.2.6 Bumps [request-promise](https://github.com/request/request-promise) from 4.2.4 to 4.2.6. - [Release notes](https://github.com/request/request-promise/releases) - [Commits](https://github.com/request/request-promise/compare/v4.2.4...v4.2.6) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 53 ++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c8abe74ab..e04475323c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1026,9 +1026,9 @@ "dev": true }, "bluebird": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", - "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, "bn.js": { @@ -1621,8 +1621,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cp-file": { "version": "4.2.0", @@ -3810,8 +3809,7 @@ "immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" }, "import-lazy": { "version": "2.1.0", @@ -3838,8 +3836,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.5", @@ -4187,8 +4184,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", @@ -4447,7 +4443,6 @@ "version": "3.5.0", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", - "dev": true, "requires": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -4495,7 +4490,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, "requires": { "immediate": "~3.0.5" } @@ -5618,8 +5612,7 @@ "pako": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "dev": true + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" }, "parent-require": { "version": "1.0.0", @@ -5877,8 +5870,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "progress": { "version": "2.0.3", @@ -6056,7 +6048,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -6351,24 +6342,24 @@ } }, "request-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.4.tgz", - "integrity": "sha512-8wgMrvE546PzbR5WbYxUQogUnUDfM0S7QIFZMID+J73vdFARkFy+HElj4T+MWYhpXwlLp0EQ8Zoj8xUA0he4Vg==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", + "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", "dev": true, "requires": { "bluebird": "^3.5.0", - "request-promise-core": "1.1.2", + "request-promise-core": "1.1.4", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" } }, "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.19" } }, "require-directory": { @@ -6478,8 +6469,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -6588,8 +6578,7 @@ "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, "set-value": { "version": "2.0.1", @@ -7045,7 +7034,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -7793,8 +7781,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "utile": { "version": "0.3.0", From 84919c0cc07d5301995afba4fee85384320ec71e Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 27 Jul 2020 09:56:30 +0100 Subject: [PATCH 114/260] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c366a1f922..9dd52e1a94 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Press `endpoint` on the `RunKit` website: * https://runkit.com/dolanmiu/docx-demo8 - Header and Footer * https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx** -More [here](https://docx.js.org/#/examples) and [here](https://github.com/dolanmiu/docx/tree/master/demo) +More [here](https://github.com/dolanmiu/docx/tree/master/demo) # How to use & Documentation From 901f10c38753b5d8c364f0daf58e23520a34a1cf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:10:49 +0000 Subject: [PATCH 115/260] Bump request from 2.88.0 to 2.88.2 Bumps [request](https://github.com/request/request) from 2.88.0 to 2.88.2. - [Release notes](https://github.com/request/request/releases) - [Changelog](https://github.com/request/request/blob/master/CHANGELOG.md) - [Commits](https://github.com/request/request/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 56 ++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index e04475323c..14a6a3d0d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -784,9 +784,9 @@ "dev": true }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", "dev": true }, "babel-code-frame": { @@ -3625,21 +3625,21 @@ }, "dependencies": { "ajv": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.1.tgz", - "integrity": "sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==", + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "json-schema-traverse": { @@ -4766,18 +4766,18 @@ "dev": true }, "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "dev": true }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "dev": true, "requires": { - "mime-db": "1.40.0" + "mime-db": "1.44.0" } }, "mimic-fn": { @@ -6314,9 +6314,9 @@ } }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -6326,7 +6326,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -6336,9 +6336,21 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } } }, "request-promise": { From 5238c55bc243388fc1fbf533279b13b439e245d1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:10:52 +0000 Subject: [PATCH 116/260] Bump docsify-cli from 4.3.0 to 4.4.1 Bumps [docsify-cli](https://github.com/QingWei-Li/docsify-cli) from 4.3.0 to 4.4.1. - [Release notes](https://github.com/QingWei-Li/docsify-cli/releases) - [Changelog](https://github.com/docsifyjs/docsify-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/QingWei-Li/docsify-cli/compare/v4.3.0...v4.4.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 1196 +++++++++++++++++++++++++-------------------- 1 file changed, 673 insertions(+), 523 deletions(-) diff --git a/package-lock.json b/package-lock.json index e04475323c..0a07af73f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -172,6 +172,12 @@ } } }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, "@sinonjs/commons": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", @@ -215,6 +221,15 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@types/anymatch": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz", @@ -474,20 +489,42 @@ } }, "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", "dev": true, "requires": { - "string-width": "^2.0.0" + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -750,6 +787,12 @@ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -860,17 +903,6 @@ "babel-runtime": "^6.22.0" } }, - "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -1038,25 +1070,52 @@ "dev": true }, "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", + "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", "dev": true, "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^2.4.2", + "cli-boxes": "^2.2.0", + "string-width": "^3.0.0", "term-size": "^1.2.0", + "type-fest": "^0.3.0", "widest-line": "^2.0.0" }, "dependencies": { - "camelcase": { + "ansi-regex": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } } } }, @@ -1234,6 +1293,38 @@ "unset-value": "^1.0.0" } }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, "caching-transform": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", @@ -1270,12 +1361,6 @@ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, - "capture-stack-trace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1314,12 +1399,6 @@ "supports-color": "^5.3.0" } }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", @@ -1358,9 +1437,9 @@ } }, "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, "cipher-base": { @@ -1397,30 +1476,15 @@ } }, "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", "dev": true }, "clipboard": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", + "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", "dev": true, "optional": true, "requires": { @@ -1462,6 +1526,15 @@ } } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1551,9 +1624,9 @@ } }, "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", + "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", "dev": true, "requires": { "dot-prop": "^4.1.0", @@ -1562,6 +1635,23 @@ "unique-string": "^1.0.0", "write-file-atomic": "^2.0.0", "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "connect": { @@ -1624,16 +1714,15 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cp-file": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-4.2.0.tgz", - "integrity": "sha1-cVNhZjtx7eC23dvDyA4roC5yXsM=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-7.0.0.tgz", + "integrity": "sha512-0Cbj7gyvFVApzpK/uhCtQ/9kE9UnYpxMzaq5nQQC/Dh4iaj5fxp7iEFIullrYwzj8nf0qnsI1Qsx34hAeAebvw==", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", + "make-dir": "^3.0.0", "nested-error-stacks": "^2.0.0", - "pify": "^2.3.0", - "safe-buffer": "^5.0.1" + "p-event": "^4.1.0" } }, "create-ecdh": { @@ -1646,15 +1735,6 @@ "elliptic": "^6.0.0" } }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, "create-hash": { "version": "1.2.0", "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", @@ -1770,6 +1850,15 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "deep-eql": { "version": "0.1.3", "resolved": "http://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", @@ -1816,6 +1905,12 @@ } } }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -1919,168 +2014,215 @@ } }, "docsify": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.9.4.tgz", - "integrity": "sha512-Xtm6sfrNU7cqOViWMewDhscn0cySF60q2KTKok9OaPmzt6nRkTAIvYU4dj916IT21o/b336Or3vO2hsvmaQzxg==", + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.11.4.tgz", + "integrity": "sha512-Qwt98y6ddM2Wb46gRH/zQpEAvw70AlIpzVlB9Wi2u2T2REg9O+bXMpJ27F5TaRTn2bD6SF1VyZYNUfimpihZwQ==", "dev": true, "requires": { - "marked": "^0.5.1", - "medium-zoom": "^0.4.0", - "opencollective": "^1.0.3", - "prismjs": "^1.15.0", + "dompurify": "^2.0.8", + "marked": "^0.7.0", + "medium-zoom": "^1.0.5", + "opencollective-postinstall": "^2.0.2", + "prismjs": "^1.19.0", + "strip-indent": "^3.0.0", "tinydate": "^1.0.0", "tweezer.js": "^1.4.0" } }, "docsify-cli": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/docsify-cli/-/docsify-cli-4.3.0.tgz", - "integrity": "sha512-88O1sMeoZv4lb5GPSJzDtOAv2KzBjpQaSqVlVqY+6hGJfb2wpz9PvlUhvlgPq54zu4kPDeCCyUYgqa/llhKg3w==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/docsify-cli/-/docsify-cli-4.4.1.tgz", + "integrity": "sha512-M5VU/8UCILz87D519KnURH3LA+A3RAAqj7ifDv4xOUf4c32QDkWSETS3yLmXlTNdxhATVi5P1fVklnvVW4uOyw==", "dev": true, "requires": { - "chalk": "^1.1.3", + "chalk": "^2.4.2", "connect": "^3.6.0", "connect-livereload": "^0.6.0", - "cp-file": "^4.1.1", - "docsify": ">=3", + "cp-file": "^7.0.0", + "docsify": "^4.10.2", "docsify-server-renderer": ">=4", - "fs-extra": "^2.1.2", - "livereload": "^0.7.0", - "lru-cache": "^4.1.1", - "opn": "^5.3.0", + "fs-extra": "^8.1.0", + "get-port": "^5.0.0", + "livereload": "^0.9.1", + "lru-cache": "^5.1.1", + "open": "^6.4.0", "serve-static": "^1.12.1", - "update-notifier": "^2.1.0", - "y18n": "^3.2.1", + "update-notifier": "^3.0.1", "yargonaut": "^1.1.2", - "yargs": "^7.0.2" + "yargs": "^14.2.0" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" } }, "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "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 + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "yallist": "^3.0.2" } }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "supports-color": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } }, "docsify-server-renderer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.9.1.tgz", - "integrity": "sha512-JERMD3yEJq38nSim/o1VGBoyqxsRo1VRscafpkx3mT7g07orOg5UARUgztKQNmv+0xnkWsmu+BMr9nsurXmBMQ==", + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.11.4.tgz", + "integrity": "sha512-TxOxqX/fwBFLHz788PtB0OeVis1EDWCVK8CEE/fvxTzQqsgZNTw2UO1wEg1qt/uuldJps3G+DPv/FN9xIeQgcg==", "dev": true, "requires": { - "debug": "^2.6.8", - "docsify": "^4.8.0", - "node-fetch": "^1.7.0", - "resolve-pathname": "^2.1.0" + "debug": "^4.1.1", + "docsify": "^4.11.2", + "dompurify": "^2.0.8", + "node-fetch": "^2.6.0", + "resolve-pathname": "^3.0.0" }, "dependencies": { - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, @@ -2090,6 +2232,12 @@ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, + "dompurify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz", + "integrity": "sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg==", + "dev": true + }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -2154,15 +2302,6 @@ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", "dev": true }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, - "requires": { - "iconv-lite": "~0.4.13" - } - }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -2505,17 +2644,6 @@ } } }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -2606,20 +2734,11 @@ "dev": true }, "figlet": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.2.3.tgz", - "integrity": "sha512-+F5zdvZ66j77b8x2KCPvWUHC0UCKUMWrewxmewgPlagp3wmDpcrHMbyv/ygq/6xoxBPGQA+UJU3SMoBzKoROQQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.0.tgz", + "integrity": "sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww==", "dev": true }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -3409,6 +3528,12 @@ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, + "get-port": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -3543,30 +3668,22 @@ } }, "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, "requires": { - "create-error-class": "^3.0.0", + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" } }, "graceful-fs": { @@ -3697,6 +3814,12 @@ } } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", @@ -3755,6 +3878,12 @@ "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-errors": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", @@ -3791,15 +3920,6 @@ "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=", "dev": true }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -3844,54 +3964,6 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, - "inquirer": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", - "integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=", - "dev": true, - "requires": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.1", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^2.0.0", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", @@ -3955,12 +4027,12 @@ "dev": true }, "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "ci-info": "^1.5.0" + "ci-info": "^2.0.0" } }, "is-data-descriptor": { @@ -4072,9 +4144,9 @@ } }, "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", + "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", "dev": true }, "is-number": { @@ -4133,24 +4205,6 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -4181,6 +4235,12 @@ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", "dev": true }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4379,6 +4439,12 @@ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-loader": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", @@ -4456,6 +4522,15 @@ "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", "dev": true }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -4463,12 +4538,12 @@ "dev": true }, "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "requires": { - "package-json": "^4.0.0" + "package-json": "^6.3.0" } }, "lazy-cache": { @@ -4495,16 +4570,130 @@ } }, "livereload": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.7.0.tgz", - "integrity": "sha512-PHnIGczQEvmCctDvRTWylA+1wSwE0/eFm+LkNhlmlAFus/aCRlVE97UOLOf6TUGLmZyfg7z7twG37ZiOgNJAyQ==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.1.tgz", + "integrity": "sha512-9g7sua11kkyZNo2hLRCG3LuZZwqexoyEyecSlV8cAsfAVVCZqLzVir6XDqmH0r+Vzgnd5LrdHDMyjtFnJQLAYw==", "dev": true, "requires": { - "chokidar": "^1.7.0", + "chokidar": "^3.3.0", + "livereload-js": "^3.1.0", "opts": ">= 1.2.0", - "ws": "^1.1.5" + "ws": "^6.2.1" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.1.tgz", + "integrity": "sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } } }, + "livereload-js": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.2.4.tgz", + "integrity": "sha512-kgTCrrYAfwnb5469+7bB2hxIct8Giq0RemDnxOESIzyRwRqYGGMZh5VIveYqJiDvpglH0dpd074BU1zJj4NaNw==", + "dev": true + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -4615,18 +4804,18 @@ } }, "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { - "pify": "^3.0.0" + "semver": "^6.0.0" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -4662,9 +4851,9 @@ } }, "marked": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.5.2.tgz", - "integrity": "sha512-fdZvBa7/vSQIZCi4uuwo2N3q+7jJURpMVCcbaX0S1Mg65WZ5ilXvC67MviJAsdjqqgD+CEq4RKo5AYGgINkVAA==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true }, "math-random": { @@ -4685,9 +4874,9 @@ } }, "medium-zoom": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-0.4.0.tgz", - "integrity": "sha512-0z7yMfd6I1BTCAa8QaR4cp5AqDkQD571GzhHIbbfefKEssGLSvs+4Xai/itOAncm4FBlF5gUoMQ22yW9/f8Sig==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-1.0.6.tgz", + "integrity": "sha512-UdiUWfvz9fZMg1pzf4dcuqA0W079o0mpqbTnOz5ip4VGYX96QjmbM+OgOU/0uOzAytxC0Ny4z+VcYQnhdifimg==", "dev": true }, "mem": { @@ -4786,6 +4975,18 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -5051,14 +5252,10 @@ } }, "node-fetch": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", - "integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "dev": true }, "node-libs-browser": { "version": "2.2.1", @@ -5126,6 +5323,12 @@ "remove-trailing-separator": "^1.0.1" } }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -5438,76 +5641,25 @@ "wrappy": "1" } }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "open": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", + "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "is-wsl": "^1.1.0" } }, - "opencollective": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", - "integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=", - "dev": true, - "requires": { - "babel-polyfill": "6.23.0", - "chalk": "1.1.3", - "inquirer": "3.0.6", - "minimist": "1.2.0", - "node-fetch": "1.6.3", - "opn": "4.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", "dev": true }, "opts": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.6.tgz", - "integrity": "sha1-0YXAQlz9652h0YKQi2W1wCOP67M=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.0.tgz", + "integrity": "sha512-rPleeyX48sBEc4aj7rAok5dCbvRdYpdbIdSRR4gnIK98a7Rvd4l3wlv4YHQr2mwPQTpKQiw8uipi/WoyItDINg==", "dev": true }, "os-browserify": { @@ -5537,10 +5689,10 @@ "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", "dev": true }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true }, "p-defer": { @@ -5549,6 +5701,15 @@ "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", "dev": true }, + "p-event": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", + "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "dev": true, + "requires": { + "p-timeout": "^3.1.0" + } + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -5579,6 +5740,15 @@ "p-limit": "^2.0.0" } }, + "p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -5598,15 +5768,23 @@ } }, "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "pako": { @@ -5770,6 +5948,12 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -5835,9 +6019,9 @@ } }, "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, "preserve": { @@ -5853,9 +6037,9 @@ "dev": true }, "prismjs": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.16.0.tgz", - "integrity": "sha512-OA4MKxjFZHSvZcisLGe14THYsug/nF6O1f0pAJc0KN0wTyAcLqmsbE+lTGKSpyh+9pEW57+k6pg2AfYR+coyHA==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.20.0.tgz", + "integrity": "sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ==", "dev": true, "requires": { "clipboard": "^2.0.0" @@ -6078,12 +6262,6 @@ "resolve": "^1.1.6" } }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", - "dev": true - }, "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", @@ -6104,22 +6282,21 @@ } }, "registry-auth-token": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", + "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", "dev": true, "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "rc": "^1.2.8" } }, "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "requires": { - "rc": "^1.0.1" + "rc": "^1.2.8" } }, "release-zalgo": { @@ -6390,9 +6567,9 @@ "dev": true }, "resolve-pathname": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", - "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", "dev": true }, "resolve-url": { @@ -6401,14 +6578,13 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "lowercase-keys": "^1.0.0" } }, "ret": { @@ -6451,21 +6627,6 @@ "inherits": "^2.0.1" } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", - "dev": true - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -7062,6 +7223,15 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -7208,18 +7378,6 @@ } } }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -7237,20 +7395,11 @@ "optional": true }, "tinydate": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.1.0.tgz", - "integrity": "sha512-YF6YTOyBRHX4b3EtEI0W/mROcv82Gt6VccmVuSAkRV3FNORug2457wSGvT2cThbfuctQvVSmC5GobGheScxtIw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz", + "integrity": "sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==", "dev": true }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -7283,6 +7432,12 @@ } } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -7438,6 +7593,12 @@ "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", "dev": true }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -7604,12 +7765,6 @@ } } }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", - "dev": true - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -7683,12 +7838,6 @@ } } }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, "upath": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", @@ -7696,19 +7845,21 @@ "dev": true }, "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", + "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", "dev": true, "requires": { - "boxen": "^1.2.1", + "boxen": "^3.0.0", "chalk": "^2.0.1", - "configstore": "^3.0.0", + "configstore": "^4.0.0", + "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", + "is-ci": "^2.0.0", "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", + "is-npm": "^3.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", "semver-diff": "^2.0.0", "xdg-basedir": "^3.0.0" } @@ -7747,12 +7898,12 @@ } }, "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "^2.0.0" } }, "use": { @@ -8305,13 +8456,12 @@ } }, "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", "dev": true, "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" + "async-limiter": "~1.0.0" } }, "xdg-basedir": { From 1b9bc8eb1d25fa0bedc2f54ae951b2a750d45ecf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2020 08:43:10 +0000 Subject: [PATCH 117/260] Bump typedoc from 0.11.1 to 0.16.11 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.11.1 to 0.16.11. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.11.1...v0.16.11) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 163 ++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 66 insertions(+), 99 deletions(-) diff --git a/package-lock.json b/package-lock.json index 523ed9ecd4..f5e5a9c315 100644 --- a/package-lock.json +++ b/package-lock.json @@ -254,12 +254,6 @@ "integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4=", "dev": true }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true - }, "@types/form-data": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", @@ -269,38 +263,6 @@ "@types/node": "*" } }, - "@types/fs-extra": { - "version": "5.0.1", - "resolved": "http://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.1.tgz", - "integrity": "sha512-h3wnflb+jMTipvbbZnClgA2BexrT4w0GcfoCz5qyxd0IRsbqhLSyesM6mqZTAnhbVmhyTm5tuxfRu9R+8l+lGw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", - "dev": true, - "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/handlebars": { - "version": "4.0.36", - "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.0.36.tgz", - "integrity": "sha512-LjNiTX7TY7wtuC6y3QwC93hKMuqYhgV9A1uXBKNvZtVC8ZvyWAjZkJ5BvT0K7RKqORRYRLMrqCxpw5RgS+MdrQ==", - "dev": true - }, - "@types/highlight.js": { - "version": "9.12.2", - "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.2.tgz", - "integrity": "sha512-y5x0XD/WXDaGSyiTaTcKS4FurULJtSiYbGTeQd0m2LYZGBcZZ/7fM6t5H/DzeUF+kv8y6UfmF6yJABQsHcp9VQ==", - "dev": true - }, "@types/jszip": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.6.tgz", @@ -309,18 +271,6 @@ "@types/node": "*" } }, - "@types/lodash": { - "version": "4.14.104", - "resolved": "http://registry.npmjs.org/@types/lodash/-/lodash-4.14.104.tgz", - "integrity": "sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ==", - "dev": true - }, - "@types/marked": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.3.0.tgz", - "integrity": "sha512-CSf9YWJdX1DkTNu9zcNtdCcn6hkRtB5ILjbhRId4ZOQqx30fXmdecuaXhugQL6eyrhuXtaHJ7PHI+Vm7k9ZJjg==", - "dev": true - }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -360,16 +310,6 @@ "@types/request": "*" } }, - "@types/shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha512-M2giRw93PxKS7YjU6GZjtdV9HASdB7TWqizBXe4Ju7AqbKlWvTr0gNO92XH56D/gMxqD/jNHLNfC5hA34yGqrQ==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, "@types/shortid": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/shortid/-/shortid-0.0.29.tgz", @@ -969,6 +909,15 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, + "backbone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", + "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", + "dev": true, + "requires": { + "underscore": ">=1.8.3" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -2892,12 +2841,12 @@ "dev": true }, "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", + "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } @@ -3856,9 +3805,9 @@ "dev": true }, "highlight.js": { - "version": "9.15.8", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.8.tgz", - "integrity": "sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA==", + "version": "9.18.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", + "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", "dev": true }, "hmac-drbg": { @@ -4411,6 +4360,12 @@ "handlebars": "^4.1.2" } }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", + "dev": true + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -4803,6 +4758,12 @@ "yallist": "^2.1.2" } }, + "lunr": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", + "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", + "dev": true + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -7618,40 +7579,34 @@ "dev": true }, "typedoc": { - "version": "0.11.1", - "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.11.1.tgz", - "integrity": "sha512-jdNIoHm5wkZqxQTe/g9AQ3LKnZyrzHXqu6A/c9GUOeJyBWLxNr7/Dm3rwFvLksuxRNwTvY/0HRDU9sJTa9WQSg==", + "version": "0.16.11", + "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", "dev": true, "requires": { - "@types/fs-extra": "5.0.1", - "@types/handlebars": "4.0.36", - "@types/highlight.js": "9.12.2", - "@types/lodash": "4.14.104", - "@types/marked": "0.3.0", "@types/minimatch": "3.0.3", - "@types/shelljs": "0.7.8", - "fs-extra": "^5.0.0", - "handlebars": "^4.0.6", - "highlight.js": "^9.0.0", - "lodash": "^4.17.5", - "marked": "^0.3.17", + "fs-extra": "^8.1.0", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", + "lodash": "^4.17.15", + "marked": "^0.8.0", "minimatch": "^3.0.0", - "progress": "^2.0.0", - "shelljs": "^0.8.1", - "typedoc-default-themes": "^0.5.0", - "typescript": "2.7.2" + "progress": "^2.0.3", + "shelljs": "^0.8.3", + "typedoc-default-themes": "^0.7.2", + "typescript": "3.7.x" }, "dependencies": { "marked": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", - "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", "dev": true }, "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", "dev": true, "requires": { "glob": "^7.0.0", @@ -7660,18 +7615,24 @@ } }, "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", "dev": true } } }, "typedoc-default-themes": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz", - "integrity": "sha1-bcJDPnjti+qOiHo6zeLzF4W9Yic=", - "dev": true + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", + "dev": true, + "requires": { + "backbone": "^1.4.0", + "jquery": "^3.4.1", + "lunr": "^2.3.8", + "underscore": "^1.9.1" + } }, "typescript": { "version": "2.9.2", @@ -7777,6 +7738,12 @@ } } }, + "underscore": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", + "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", + "dev": true + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", diff --git a/package.json b/package.json index ddb25e9ceb..1a10150b60 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "ts-node": "^7.0.1", "tslint": "^5.11.0", "tslint-immutable": "^4.9.0", - "typedoc": "^0.11.1", + "typedoc": "^0.16.11", "typescript": "2.9.2", "webpack": "^3.10.0" }, From 3213c4838defec26d5be2462663d728a9b5ddb30 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2020 08:43:57 +0000 Subject: [PATCH 118/260] Bump shelljs from 0.7.8 to 0.8.4 Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.7.8 to 0.8.4. - [Release notes](https://github.com/shelljs/shelljs/releases) - [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md) - [Commits](https://github.com/shelljs/shelljs/compare/v0.7.8...v0.8.4) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 523ed9ecd4..227b7190e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6814,9 +6814,9 @@ "dev": true }, "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", "dev": true, "requires": { "glob": "^7.0.0", diff --git a/package.json b/package.json index ddb25e9ceb..1ddb90bbea 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "request": "^2.88.0", "request-promise": "^4.2.2", "rimraf": "^2.5.2", - "shelljs": "^0.7.7", + "shelljs": "^0.8.4", "sinon": "^5.0.7", "ts-node": "^7.0.1", "tslint": "^5.11.0", From 784de3e430393472eecd8cc44b7d43934d8ac5dd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2020 21:32:19 +0000 Subject: [PATCH 119/260] [Security] Bump elliptic from 6.5.0 to 6.5.3 Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.0 to 6.5.3. **This update includes a security fix.** - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 523ed9ecd4..5566080ec4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2270,9 +2270,9 @@ "dev": true }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", From 21d53c41d0cbc3f0370b18c46d6e53a9138e3e87 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2020 01:44:26 +0000 Subject: [PATCH 120/260] Bump @types/request-promise from 4.1.44 to 4.1.46 Bumps [@types/request-promise](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/request-promise) from 4.1.44 to 4.1.46. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/request-promise) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 50 +++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 701119df79..404d511acb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -237,9 +237,9 @@ "dev": true }, "@types/bluebird": { - "version": "3.5.27", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.27.tgz", - "integrity": "sha512-6BmYWSBea18+tSjjSC3QIyV93ZKAeNWGM7R6aYt1ryTZXrlHF+QLV0G2yV0viEGVyRkyQsWfMoJ0k/YghBX5sQ==", + "version": "3.5.32", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.32.tgz", + "integrity": "sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g==", "dev": true }, "@types/caseless": { @@ -254,15 +254,6 @@ "integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4=", "dev": true }, - "@types/form-data": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", - "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/jszip": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.6.tgz", @@ -289,21 +280,34 @@ "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==" }, "@types/request": { - "version": "2.48.1", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.1.tgz", - "integrity": "sha512-ZgEZ1TiD+KGA9LiAAPPJL68Id2UWfeSO62ijSXZjFJArVV+2pKcsVHmrcu+1oiE3q6eDGiFiSolRc4JHoerBBg==", + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", "dev": true, "requires": { "@types/caseless": "*", - "@types/form-data": "*", "@types/node": "*", - "@types/tough-cookie": "*" + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + }, + "dependencies": { + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } } }, "@types/request-promise": { - "version": "4.1.44", - "resolved": "https://registry.npmjs.org/@types/request-promise/-/request-promise-4.1.44.tgz", - "integrity": "sha512-RId7eFsUKxfal1LirDDIcOp9u3MM3NXFDBcC3sqIMcmu7f4U6DsCEMD8RbLZtnPrQlN5Jc79di/WPsIEDO4keg==", + "version": "4.1.46", + "resolved": "https://registry.npmjs.org/@types/request-promise/-/request-promise-4.1.46.tgz", + "integrity": "sha512-3Thpj2Va5m0ji3spaCk8YKrjkZyZc6RqUVOphA0n/Xet66AW/AiOAs5vfXhQIL5NmkaO7Jnun7Nl9NEjJ2zBaw==", "dev": true, "requires": { "@types/bluebird": "*", @@ -338,9 +342,9 @@ "dev": true }, "@types/tough-cookie": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.5.tgz", - "integrity": "sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", "dev": true }, "@types/uglify-js": { From b2280f64a109cc77d4650a0770a378e1c8fb56a0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2020 08:48:47 +0000 Subject: [PATCH 121/260] Bump @types/jszip from 3.1.6 to 3.4.1 Bumps [@types/jszip](https://github.com/Stuk/jszip) from 3.1.6 to 3.4.1. - [Release notes](https://github.com/Stuk/jszip/releases) - [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md) - [Commits](https://github.com/Stuk/jszip/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 701119df79..801d8aaac1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -264,11 +264,11 @@ } }, "@types/jszip": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.6.tgz", - "integrity": "sha512-m8uFcI+O2EupCfbEVQWsBM/4nhbegjOHL7cQgBpM95FeF98kdFJXzy9/8yhx4b3lCRl/gMBhcvyh30Qt3X+XPQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.4.1.tgz", + "integrity": "sha512-TezXjmf3lj+zQ651r6hPqvSScqBLvyPI9FxdXBqpEwBijNGQ2NXpaFW/7joGzveYkKQUil7iiDHLo6LV71Pc0A==", "requires": { - "@types/node": "*" + "jszip": "*" } }, "@types/minimatch": { From fff62445973d7a0d34428d46f6a4844ca28b30fc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2020 08:49:24 +0000 Subject: [PATCH 122/260] Bump @types/node from 14.0.23 to 14.0.27 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.23 to 14.0.27. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 701119df79..ea51a0a4dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -284,9 +284,9 @@ "dev": true }, "@types/node": { - "version": "14.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", - "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==" + "version": "14.0.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz", + "integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g==" }, "@types/request": { "version": "2.48.1", From 839661e5f87d793d6fecb4c547b96c606cd68ee0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2020 08:50:39 +0000 Subject: [PATCH 123/260] Bump @types/webpack from 4.4.34 to 4.41.21 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.4.34 to 4.41.21. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 701119df79..32b835a8bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -331,10 +331,16 @@ "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", "dev": true }, + "@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", + "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", + "dev": true + }, "@types/tapable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", - "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.6.tgz", + "integrity": "sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA==", "dev": true }, "@types/tough-cookie": { @@ -344,27 +350,47 @@ "dev": true }, "@types/uglify-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz", - "integrity": "sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==", + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.9.3.tgz", + "integrity": "sha512-KswB5C7Kwduwjj04Ykz+AjvPcfgv/37Za24O2EDzYNbwyzOo8+ydtvzUfZ5UMguiVu29Gx44l1A6VsPPcmYu9w==", "dev": true, "requires": { "source-map": "^0.6.1" } }, "@types/webpack": { - "version": "4.4.34", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.34.tgz", - "integrity": "sha512-GnEBgjHsfO1M7DIQ0dAupSofcmDItE3Zsu3reK8SQpl/6N0rtUQxUmQzVFAS5ou/FGjsYKjXAWfItLZ0kNFTfQ==", + "version": "4.41.21", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.21.tgz", + "integrity": "sha512-2j9WVnNrr/8PLAB5csW44xzQSJwS26aOnICsP3pSGCEdsu6KYtfQ6QJsVUKHWRnm1bL7HziJsfh5fHqth87yKA==", "dev": true, "requires": { "@types/anymatch": "*", "@types/node": "*", "@types/tapable": "*", "@types/uglify-js": "*", + "@types/webpack-sources": "*", "source-map": "^0.6.0" } }, + "@types/webpack-sources": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-1.4.2.tgz", + "integrity": "sha512-77T++JyKow4BQB/m9O96n9d/UUHWLQHlcqXb9Vsf4F1+wKNrrlWNFPDLKNT92RJnCSL6CieTc+NDXtCVZswdTw==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, "acorn": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", From 41acb475a9da9ff0f5619446fe4197abcb42e708 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 30 Jul 2020 11:42:55 +0100 Subject: [PATCH 124/260] Update documentation --- docs/README.md | 16 --- docs/_coverpage.md | 10 ++ docs/_sidebar.md | 2 +- docs/contribution-guidelines.md | 137 ++++++-------------- docs/examples.md | 219 -------------------------------- docs/index.html | 68 +++++----- docs/usage/packers.md | 120 +---------------- package-lock.json | 40 +++--- 8 files changed, 105 insertions(+), 507 deletions(-) create mode 100644 docs/_coverpage.md delete mode 100644 docs/examples.md diff --git a/docs/README.md b/docs/README.md index dae964d87a..28781012fe 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,13 +1,3 @@ -

- clippy the assistant -

- -

- Easily generate .docx files with JS/TS. Works for Node and on the Browser. :100: -

- ---- - # Welcome ## Installation @@ -66,12 +56,6 @@ Packer.toBuffer(doc).then((buffer) => { // Done! A file called 'My First Document.docx' will be in your file system. ``` -## Honoured Mentions - -[@felipeochoa](https://github.com/felipeochoa) - -[@h4buli](https://github.com/h4buli) -

clippy the assistant

diff --git a/docs/_coverpage.md b/docs/_coverpage.md new file mode 100644 index 0000000000..adfd37471e --- /dev/null +++ b/docs/_coverpage.md @@ -0,0 +1,10 @@ +drawing + +> Easily generate .docx files with JS/TS. Works for Node and on the Browser. :100: + +- Simple, declarative API +- 50+ usage examples +- Battle tested, mature, 95%+ coverage + +[GitHub](https://github.com/dolanmiu/docx) +[Get Started](#Welcome) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9e329b6448..a63970dff9 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,6 +1,6 @@ * [Getting Started](/) -* [Examples](examples.md) +* [Examples](https://github.com/dolanmiu/docx/tree/master/demo) * API diff --git a/docs/contribution-guidelines.md b/docs/contribution-guidelines.md index 1305c4c4bd..f9963bd644 100644 --- a/docs/contribution-guidelines.md +++ b/docs/contribution-guidelines.md @@ -1,25 +1,23 @@ # Contribution Guidelines -* Include documentation reference(s) at the top of each file: +- Include documentation reference(s) at the top of each file: ```ts // http://officeopenxml.com/WPdocument.php ``` -* Follow Prettier standards, and consider using the [Prettier VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) plugin. +- Follow Prettier standards, and consider using the [Prettier VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) plugin. -* Follow the `TSLint` rules +- Follow the `TSLint` rules ## Always think about the user -The number one pillar for contribution to `docx` is to **ALWAYS** think about how the user will use `docx`. - Put yourself in their position, and imagine how they would feel about your feature you wrote. 1. Is it easy to use? 2. Has it been documented well? 3. Is it intuitive? -4. Is it consistent with the rest of the API? +4. Is it declarative? 5. Is it fun to use? ## Good Commit Names @@ -27,6 +25,7 @@ Put yourself in their position, and imagine how they would feel about your featu Please write good commit messages when making a commit: https://chris.beams.io/posts/git-commit/ **Do not:** + ``` c // What? rtl // Adding acryonyms without explaining anything else is not helpful @@ -35,34 +34,6 @@ demo updated // Getting better, but capitalize the first letter Unesesary coment removed // Make sure to use correct spelling ``` -## No leaky components in API interface - -> This mainly applies to the API the end user will consume. - -Try to make method parameters of the outside API accept primitives, or `json` objects, so that child components are created **inside** the component, rather than being **injected** in. - -This is so that: - -1. Imports are much cleaner for the end user, no need for: - ```ts - import { ChildComponent } from "./my-feature/sub-component/deeper/.../my-deep.component"; - ``` - -2. This is what I consider "leakage". The code is aware of the underlying implementation of the component. -3. It means the end user does not need to import and create the child component to be injected. - -**Do not** - -`TableFloatProperties` is a class. The outside world would have to `new` up the object, and inject it in like so: - -```ts - public float(tableFloatProperties: TableFloatProperties): Table -``` - -```ts - table.float(new TableFloatProperties(...)); -``` - **Do** `ITableFloatOptions` is an interface for a JSON of primitives. The end user would need to pass in a json object and not need to worry about the internals: @@ -71,31 +42,29 @@ This is so that: public float(tableFloatOptions: ITableFloatOptions): Table ``` +## Delcariative API + +Make sure the API is declarative, so no _method calling_ or _mutation_. This is a design decision, consistent with the rest of the project. There are benefits to delcariative code over other styles of code, explained here: https://dzone.com/articles/why-declarative-coding-makes-you-a-better-programm + +**Do not:** + ```ts - table.float({...}); +const paragraph = doc.createParagraph(); +const text = paragraph.createText(); +text.contents = "Hello World"; ``` -## Add vs Create +**Do** -This is just a guideline, and the rules can sometimes be broken. - -* Use `create` if the method `new`'s up an element inside: - - ```ts - public createParagraph() { - const paragraph = new Paragraph(); - this.root.push(paragraph); - } - ``` - -* Use `add` if you add the element into the method as a parameter. - *Note:* This may look like its breaking the previous guideline, but it has semantically different meanings. The previous one is using data to construct an object, whereas this one is simply adding elements into the document: - - ```ts - public add(paragraph: Paragraph) { - this.root.push(paragraph); - } - ``` +```ts +doc.addSection({ + children: [ + new Paragraph({ + children: [new TextRun("Hello World")], + }), + ], +}); +``` ## Getters and Setters @@ -107,7 +76,7 @@ public get Level() { } ``` -There is no performance advantage by doing this. It means we don't need to prefix all private variables with the ugly `_`: +This is the convention of this project. There is no performance advantage by doing this. It means we don't need to prefix all private variables with `_`: **Do not:** @@ -121,30 +90,6 @@ private get _level: string; private get level: string; ``` -## Temporal Methods - -Some methods are `non-temporal`, which means regardless of when you call the method, it will have the same affect on the document. For example, setting the width of a table at the end of the document will have the same effect as setting the width at the start: - -```ts -table.setWidth(1000); // now removed as of version 5.0.0 -``` - -Whereas some methods are `temporal`, which means depending on the time-frame they are called, it would produce a difference result. For example, moving `createParagraph()` around your code will physically alter the document. - -```ts -doc.createParagraph("hello"); -``` - -If a method is `non-temporal`, put it in the objects `constructor`. For example: - -```ts -const table = new Table(width: number); -``` - -`Non-temporal` methods are usually methods which can only be used one time and one time only. For example, `.float()`. It does not make sense to call `.float()` again if its already floating. - -I am not sure what the real term is, but this will do. - ## Interfaces over type alias Do not use `type`, but rather use `Interfaces`. `type` cannot be extended, and a class cannot implement it. @@ -152,14 +97,14 @@ Do not use `type`, but rather use `Interfaces`. `type` cannot be extended, and a > "In general, use what you want ( type alias / interface ) just be consistent" > "always use interface for public API's definition when authoring a library or 3rd party ambient type definitions" > -> * https://medium.com/@martin_hotell/interface-vs-type-alias-in-typescript-2-7-2a8f1777af4c +> - https://medium.com/@martin_hotell/interface-vs-type-alias-in-typescript-2-7-2a8f1777af4c `Interface` is generally preferred over `type`: https://stackoverflow.com/questions/37233735/typescript-interfaces-vs-types **Do not:** ```ts -type RelationshipFileInfo = { id: number, target: string }; +type RelationshipFileInfo = { id: number; target: string }; ``` **Do:** @@ -193,26 +138,26 @@ enum WeaponType = { ## Spell correctly, in full and in American English -I am not sure where these habits in software development come from, but I do not believe it is beneficial: - **Do not:** + ```ts -readdy // misspelling -perm // abbreviation -conf // abbreviation -cnty // abbreviation -relationFile // abbreviation -colour // U.K. English +readdy; // misspelling +perm; // abbreviation +conf; // abbreviation +cnty; // abbreviation +relationFile; // abbreviation +colour; // U.K. English ``` **Do:** + ```ts -ready -permission -config -country -relationshipFile -color +ready; +permission; +config; +country; +relationshipFile; +color; ``` ## Keep files small (within reason) diff --git a/docs/examples.md b/docs/examples.md deleted file mode 100644 index f638e1aa25..0000000000 --- a/docs/examples.md +++ /dev/null @@ -1,219 +0,0 @@ -# Examples - -> All examples can run independently and can be found in the `/demo` folder of the project - -All the examples below can be ran locally, to do so, run the following command: - -```sh -npm run demo -``` - -This command will run the `demo selector app` in the `/demo` folder. It will prompt you to select a demo number, which will run a demo from that folder. - -## Simple - -A simple hello world of the `docx` library: - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo1.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo1.ts_ - -## Styles - -### Styling with JS - -This example shows how to customise the look and feel of a document using JS configuration - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo2.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo2.ts_ - -### Styling with XML - -This example shows how to customise the look and feel of a document using XML configuration - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo13.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo13.ts_ - -## Numbering - -This example shows many levels of numbering - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo3.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo3.ts_ - -## Table - -Example of simple table - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo4.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo4.ts_ - -### Styling table borders - -Styling the borders of a table - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo20.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo20.ts_ - -## Images - -### Add image to the document - -Importing Images from file system path - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo5.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo5.ts_ - -### Add images to header and footer - -Example showing how to add image to headers and footers - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo9.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo9.ts_ - -### Scaling images - -Example showing how to scale images - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo12.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo12.ts_ - -### Add Image to media before adding to document - -This is the best way to add an image to a document because you can add the same image in two locations without increasing document size by re-using the same image - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo23.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo23.ts_ - -### Add image to table - -As before, to add an image to a table, you would need to add it to the `Media` object first - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo24.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo24.ts_ - -### Images using Base64 URI - -If you want to use a Base64 image instead - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo18.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo18.ts_ - -## Margins - -Example showing how to set custom margins - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo6.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo6.ts_ - -## Orientation - -Example showing how to set the document to `landscape` or `portrait` - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo7.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo7.ts_ - -## Headers & Footers - -Example showing how to add headers and footers - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo8.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo8.ts_ - -## Multiple headers and footers - -Check out `Sections` for this feature - -## Page Breaks - -### Normal page breaks - -Example showing how to page break - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo14.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo14.ts_ - -### Page break before - -Example showing how to page break before like in Word - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo15.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo15.ts_ - -## Sections - -Example of how sections work. Sections allow multiple headers and footers, and `landscape`/`portrait` inside the same document. -Also you can have different page number formats and starts for different sections. - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo16.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo16.ts_ - -## Footnotes - -Example of how to add footnotes. Good for references - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo17.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo17.ts_ - -## Packers - -## Buffer output - -Example showing how to use the Buffer packer and then write that buffer to the file system - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo19.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo19.ts_ - - -## Bookmarks - -Example showing how to make bookmarks to make internal hyperlinks within the document - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo21.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo21.ts_ - -## Bidirectional text - -Example showing how to use bidirectional text for certain languages such as Hebrew - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo22.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo22.ts_ - -## Showcase - -### My CV - -Example showing how to add headers and footers - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo10.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo10.ts_ - -### Style and Images - -This example shows how to customise the look and feel of a document and add images - -[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo11.ts ':include') - -_Source: https://github.com/dolanmiu/docx/blob/master/demo/demo11.ts_ diff --git a/docs/index.html b/docs/index.html index 29ab70ff59..13c52ae6da 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,40 +1,36 @@ + + + docx - Generate .docx documents with JavaScript + + + + + - - - docx - Generate .docx documents with JavaScript - - - - - - - -
- - - - - - - - - + +
+ + + + + + + + diff --git a/docs/usage/packers.md b/docs/usage/packers.md index e9b3626015..236494bf96 100644 --- a/docs/usage/packers.md +++ b/docs/usage/packers.md @@ -2,11 +2,7 @@ > Packers are the way in which `docx` turns your code into `.docx` format. It is completely decoupled from the `docx.Document`. -Packers in `version 4` and above are now one single `Packer`. It works in both a node and browser environment (Angular etc). Now, the packer returns a `Buffer`, `Blob` or `base64 string`. It is up to you to take that and persist it with node's `fs`, send it down as a downloadable file, or anything else you wish. As of version 4, this library will not have options to export to PDF. - -## Version 5 - -Packers in `version 5` and above are now static methods on `Packer`. +Packers works in both a node and browser environment (Angular etc). Now, the packer returns a `Buffer`, `Blob` or `base64 string`. It is up to you to take that and persist it with node's `fs`, send it down as a downloadable file, or anything else you wish. As of `version 4+`, this library will not have options to export to PDF. ### Export as Buffer @@ -36,117 +32,3 @@ Packer.toBlob(doc).then((blob) => { saveAs(blob, "example.docx"); }); ``` - -## Version 4 - -The `Packer` in `version 4` requires an instance of `Packer`, so be sure to `new` it. - -### Export as Buffer - -This will return a NodeJS `Buffer`. If this is used in the browser, it will return a `UInt8Array` instead. - -```ts -const packer = new docx.Packer(); - -packer.toBuffer(doc).then((buffer) => { - fs.writeFileSync("My Document.docx", buffer); -}); -``` - -### Export as a `base64` string - -```ts -const packer = new docx.Packer(); - -packer.toBase64String(doc).then((string) => { - console.log(string); -}); -``` - -### Export as Blob - -This is useful if you want to send it as an downloadable in a browser environment. - -```ts -const packer = new docx.Packer(); - -packer.toBlob(doc).then((blob) => { - // saveAs from FileSaver will download the file - saveAs(blob, "example.docx"); -}); -``` - -## Version 3 and below - -### File System Packer - -```ts -const docx = require("docx"); - -const doc = new docx.Document(); -const exporter = new docx.LocalPacker(doc); -exporter.pack("My Document"); -// Word Document is in file system -``` - -### Buffer Packer - -```ts -const docx = require("docx"); - -const doc = new docx.Document(); -const exporter = new docx.BufferPacker(doc); -const buffer = exporter.pack(); -``` - -### Stream Packer - -Creates a `node` `Readable` stream - -```ts -const docx = require("docx"); - -const doc = new docx.Document(); -const exporter = new docx.StreamPacker(doc); -const stream = exporter.pack(); -``` - -### Express Packer - -The old express packer is now deprecated and may disappear soon, so you should upgrade. - -The reason for this is because it means this project needs to know about and use `express`, which for a Word document generator, does not sound right. Seperation of concerns. - -It will still be usable (for now), but it is ill advised. - -I used the express exporter in my [website](http://www.dolan.bio). - -The recommended way is to use the `StreamPacker` and handle the `express` magic outside of the library: - -```ts -const docx = require("docx"); - -const doc = new docx.Document(); -const exporter = new docx.StreamPacker(doc); - -const stream = exporter.pack(); - -// Express' response object -res.attachment("yourfile.xlsx"); -stream.pipe(res); -``` - -where `res` is the response object obtained through the Express router. It is that simple. The file will begin downloading in the browser. - -### PDF Exporting - -You can export your word document as a PDF file like so: - -```ts -const exporter = new docx.LocalPacker(doc); -exporter.packPdf("My Document"); - -// Express -const exporter = new docx.ExpressPacker(doc, res); -exporter.packPdf("My Document"); -``` diff --git a/package-lock.json b/package-lock.json index 9f5915a5b7..c148694cb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -197,7 +197,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -718,7 +718,7 @@ }, "util": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -747,7 +747,7 @@ }, "async": { "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -821,7 +821,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1568,7 +1568,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2702,7 +2702,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4420,7 +4420,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4681,7 +4681,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -5028,7 +5028,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5667,7 +5667,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5870,7 +5870,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5947,7 +5947,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7204,7 +7204,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7756,7 +7756,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8181,7 +8181,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8397,13 +8397,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8417,7 +8417,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8550,7 +8550,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8594,7 +8594,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From 01e34c1b28e14415ab391258bbd6ae4dc0aeff25 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2020 10:48:07 +0000 Subject: [PATCH 125/260] Bump sinon from 5.1.1 to 9.0.2 Bumps [sinon](https://github.com/sinonjs/sinon) from 5.1.1 to 9.0.2. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v5.1.1...v9.0.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 185 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 92 insertions(+), 95 deletions(-) diff --git a/package-lock.json b/package-lock.json index c148694cb5..644d69b255 100644 --- a/package-lock.json +++ b/package-lock.json @@ -179,9 +179,9 @@ "dev": true }, "@sinonjs/commons": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", - "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", + "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -195,24 +195,42 @@ } } }, - "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", "dev": true, "requires": { - "samsam": "1.3.0" + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/formatio": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" } }, "@sinonjs/samsam": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.2.tgz", - "integrity": "sha512-ILO/rR8LfAb60Y1Yfp9vxfYAASK43NFC2mLzpvLUbCQY/Qu8YwReboseu8aheCEkyElZF2L2T9mHcR2bgdvZyA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", + "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", "dev": true, "requires": { - "@sinonjs/commons": "^1.0.2", - "array-from": "^2.1.1", - "lodash": "^4.17.11" + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + }, + "dependencies": { + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } } }, "@sinonjs/text-encoding": { @@ -647,12 +665,6 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, - "array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", - "dev": true - }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -718,7 +730,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -747,7 +759,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -821,7 +833,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1568,7 +1580,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -2702,7 +2714,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4420,7 +4432,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4502,9 +4514,9 @@ } }, "just-extend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", - "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", + "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", "dev": true }, "keyv": { @@ -4681,7 +4693,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4751,12 +4763,6 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lolex": { - "version": "2.7.5", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", - "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", - "dev": true - }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -5028,7 +5034,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5212,34 +5218,16 @@ "dev": true }, "nise": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.0.tgz", - "integrity": "sha512-Z3sfYEkLFzFmL8KY6xnSJLRxwQwYBjOXi/24lb62ZnZiGA0JUzGGTI6TBIgfCSMIDl9Jlu8SRmHNACLTemDHww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", + "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", "dev": true, "requires": { - "@sinonjs/formatio": "^3.1.0", + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", - "lolex": "^4.1.0", "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "@sinonjs/formatio": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", - "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^3.1.0" - } - }, - "lolex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.1.0.tgz", - "integrity": "sha512-BYxIEXiVq5lGIXeVHnsFzqa1TxN5acnKnPCdlZSpzm8viNEOhiigupA4vTQ9HEFQ6nLTQ9wQOgBknJgzUYQ9Aw==", - "dev": true - } } }, "node-fetch": { @@ -5667,7 +5655,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5870,7 +5858,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5893,9 +5881,9 @@ "dev": true }, "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "dev": true, "requires": { "isarray": "0.0.1" @@ -5947,7 +5935,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -6650,12 +6638,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -6830,25 +6812,40 @@ "dev": true }, "sinon": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-5.1.1.tgz", - "integrity": "sha512-h/3uHscbt5pQNxkf7Y/Lb9/OM44YNCicHakcq73ncbrIS8lXg+ZGOZbtuU+/km4YnyiCYfQQEwANaReJz7KDfw==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", + "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.5.0", - "lodash.get": "^4.4.2", - "lolex": "^2.4.2", - "nise": "^1.3.3", - "supports-color": "^5.4.0", - "type-detect": "^4.0.8" + "@sinonjs/commons": "^1.7.2", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/formatio": "^5.0.1", + "@sinonjs/samsam": "^5.0.3", + "diff": "^4.0.2", + "nise": "^4.0.1", + "supports-color": "^7.1.0" }, "dependencies": { - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "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==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -7204,7 +7201,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7756,7 +7753,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8181,7 +8178,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8397,13 +8394,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8417,7 +8414,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8550,7 +8547,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -8594,7 +8591,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { diff --git a/package.json b/package.json index 8c225c60a0..7de0a6d25f 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "request-promise": "^4.2.2", "rimraf": "^2.5.2", "shelljs": "^0.8.4", - "sinon": "^5.0.7", + "sinon": "^9.0.2", "ts-node": "^7.0.1", "tslint": "^5.11.0", "tslint-immutable": "^4.9.0", From 858af64dc3afb0f3b99a47d822138a2d1c6aa46e Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 30 Jul 2020 13:07:48 +0100 Subject: [PATCH 126/260] Improve coverage threshold --- .nycrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.nycrc b/.nycrc index 2c14e11a79..25c38c14ad 100644 --- a/.nycrc +++ b/.nycrc @@ -1,9 +1,9 @@ { "check-coverage": true, - "lines": 93.53, - "functions": 89.63, - "branches": 88.57, - "statements": 93.34, + "lines": 96.81, + "functions": 93.80, + "branches": 92.63, + "statements": 96.80, "include": [ "src/**/*.ts" ], From f0ad1e91948fbc55b943cdf94ed7ca4fab17854c Mon Sep 17 00:00:00 2001 From: "haruyama.makoto" Date: Fri, 31 Jul 2020 16:36:56 +0900 Subject: [PATCH 127/260] feat: Add decimalFullWidth numbering type --- .../document/body/section-properties/page-number/page-number.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/file/document/body/section-properties/page-number/page-number.ts b/src/file/document/body/section-properties/page-number/page-number.ts index d876c265af..b6bd5a6e86 100644 --- a/src/file/document/body/section-properties/page-number/page-number.ts +++ b/src/file/document/body/section-properties/page-number/page-number.ts @@ -14,6 +14,7 @@ export enum PageNumberFormat { ORDINAL_TEXT = "ordinalText", UPPER_LETTER = "upperLetter", UPPER_ROMAN = "upperRoman", + DECIMAL_FULL_WIDTH = "decimalFullWidth", } export interface IPageNumberTypeAttributes { From 61cbee829deea91be4cf6cc837b4997e362f6cf2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2020 09:06:34 +0000 Subject: [PATCH 128/260] build(deps-dev): bump ts-node from 7.0.1 to 8.10.2 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 7.0.1 to 8.10.2. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v7.0.1...v8.10.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 59 +++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 644d69b255..9337f6788f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -638,6 +638,12 @@ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -686,12 +692,6 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -4818,9 +4818,9 @@ } }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "map-age-cleaner": { @@ -7497,19 +7497,34 @@ "dev": true }, "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", "dev": true, "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", + "arg": "^4.1.0", + "diff": "^4.0.1", "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } } }, "tslib": { @@ -8600,9 +8615,9 @@ } }, "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true } } diff --git a/package.json b/package.json index 7de0a6d25f..adec66a7b5 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "rimraf": "^2.5.2", "shelljs": "^0.8.4", "sinon": "^9.0.2", - "ts-node": "^7.0.1", + "ts-node": "^8.10.2", "tslint": "^5.11.0", "tslint-immutable": "^4.9.0", "typedoc": "^0.16.11", From 827c46cf4708659c2dfd101027a886810f3770fd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2020 09:08:10 +0000 Subject: [PATCH 129/260] build(deps-dev): bump nyc from 14.1.1 to 15.1.0 Bumps [nyc](https://github.com/istanbuljs/nyc) from 14.1.1 to 15.1.0. - [Release notes](https://github.com/istanbuljs/nyc/releases) - [Changelog](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md) - [Commits](https://github.com/istanbuljs/nyc/compare/v14.1.1...v15.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 1275 ++++++++++++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 852 insertions(+), 425 deletions(-) diff --git a/package-lock.json b/package-lock.json index 644d69b255..53ff79d986 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,15 +13,111 @@ "@babel/highlight": "^7.0.0" } }, - "@babel/generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", - "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "@babel/core": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.0.tgz", + "integrity": "sha512-mkLq8nwaXmDtFmRkQ8ED/eA2CnVw4zr7dCztKalZXBvdK5EeNUAesrrwUqjQEzFgomJssayzB0aqlOsP1vGLqg==", "dev": true, "requires": { - "@babel/types": "^7.6.3", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.11.0", + "@babel/helper-module-transforms": "^7.11.0", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.11.0", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.11.0", + "@babel/types": "^7.11.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz", + "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" }, "dependencies": { @@ -40,32 +136,113 @@ } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", + "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", + "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-module-transforms": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", + "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/template": "^7.10.4", + "@babel/types": "^7.11.0", + "lodash": "^4.17.19" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-replace-supers": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", + "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", + "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.11.0" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", + "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/highlight": { @@ -88,46 +265,85 @@ } }, "@babel/parser": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", - "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.0.tgz", + "integrity": "sha512-qvRvi4oI8xii8NllyEc4MDJjuZiNaRzyb7Y7lup1NqJV8TZHF4O27CcP+72WPn/k1zkgJ6WJfnIbk4jTsVAZHw==", "dev": true }, "@babel/template": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.0" - } - }, - "@babel/traverse": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", - "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.3", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.6.3", - "@babel/types": "^7.6.3", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" }, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } + } + }, + "@babel/traverse": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz", + "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.11.0", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.11.0", + "@babel/types": "^7.11.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" } }, "debug": { @@ -145,6 +361,12 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -154,13 +376,13 @@ } }, "@babel/types": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", - "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", + "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" }, "dependencies": { @@ -172,6 +394,67 @@ } } }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true + }, "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -272,6 +555,12 @@ "integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4=", "dev": true }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "@types/jszip": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.4.1.tgz", @@ -436,6 +725,16 @@ } } }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -624,12 +923,12 @@ } }, "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, "requires": { - "default-require-extensions": "^2.0.0" + "default-require-extensions": "^3.0.0" } }, "archy": { @@ -1317,32 +1616,28 @@ } }, "caching-transform": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", - "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, "requires": { - "hasha": "^3.0.0", - "make-dir": "^2.0.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.4.2" + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" }, "dependencies": { - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true } } }, @@ -1466,6 +1761,12 @@ } } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, "cli-boxes": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", @@ -1880,18 +2181,18 @@ "dev": true }, "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", "dev": true, "requires": { - "strip-bom": "^3.0.0" + "strip-bom": "^4.0.0" }, "dependencies": { "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true } } @@ -2775,32 +3076,14 @@ } }, "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - } + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" } }, "find-up": { @@ -2829,23 +3112,54 @@ } }, "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" }, "dependencies": { "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" } } } @@ -2882,6 +3196,12 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", "dev": true }, + "fromentries": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", + "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", + "dev": true + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -3513,12 +3833,24 @@ } } }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, "get-port": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", @@ -3832,12 +4164,27 @@ } }, "hasha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", - "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", + "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", "dev": true, "requires": { - "is-stream": "^1.0.1" + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } } }, "he": { @@ -3869,6 +4216,12 @@ "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -3934,6 +4287,12 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4274,12 +4633,12 @@ "dev": true }, "istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, "requires": { - "append-transform": "^1.0.0" + "append-transform": "^2.0.0" } }, "istanbul-lib-instrument": { @@ -4297,60 +4656,127 @@ "semver": "^5.3.0" } }, - "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, "requires": { "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", + "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" }, "dependencies": { @@ -4364,42 +4790,27 @@ } }, "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true } } }, "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", "dev": true, "requires": { - "handlebars": "^4.1.2" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" } }, "jquery": { @@ -4448,12 +4859,6 @@ "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", "dev": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -4905,15 +5310,6 @@ "readable-stream": "^2.0.1" } }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - } - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -5275,6 +5671,15 @@ } } }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "requires": { + "process-on-spawn": "^1.0.0" + } + }, "nodent-runtime": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz", @@ -5324,44 +5729,56 @@ "dev": true }, "nyc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", - "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, "requires": { - "archy": "^1.0.0", - "caching-transform": "^3.0.2", - "convert-source-map": "^1.6.0", - "cp-file": "^6.2.0", - "find-cache-dir": "^2.1.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.2.3", - "uuid": "^3.3.2", - "yargs": "^13.2.2", - "yargs-parser": "^13.0.0" + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -5369,36 +5786,54 @@ "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "cp-file": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", - "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "make-dir": "^2.0.0", - "nested-error-stacks": "^2.0.0", - "pify": "^4.0.1", - "safe-buffer": "^5.0.1" + "color-name": "~1.1.4" } }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "get-caller-file": { @@ -5407,49 +5842,52 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" } }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "p-locate": "^4.1.0" } }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "require-main-filename": { @@ -5458,24 +5896,39 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "glob": "^7.1.3" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } }, "which-module": { @@ -5485,14 +5938,14 @@ "dev": true }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "y18n": { @@ -5502,27 +5955,28 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^18.1.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -5647,12 +6101,6 @@ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", "dev": true }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -5719,6 +6167,15 @@ "p-limit": "^2.0.0" } }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, "p-timeout": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", @@ -5735,13 +6192,13 @@ "dev": true }, "package-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", - "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, "requires": { "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", + "hasha": "^5.0.0", "lodash.flattendeep": "^4.4.0", "release-zalgo": "^1.0.0" } @@ -5955,22 +6412,47 @@ } }, "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "find-up": "^3.0.0" + "find-up": "^4.0.0" }, "dependencies": { "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true } } }, @@ -6035,6 +6517,15 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "requires": { + "fromentries": "^1.2.0" + } + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -6552,9 +7043,9 @@ } }, "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, "resolve-pathname": { @@ -7014,23 +7505,32 @@ } }, "spawn-wrap": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", - "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", "signal-exit": "^3.0.2", - "which": "^1.3.0" + "which": "^2.0.1" }, "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -7286,96 +7786,14 @@ } }, "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" } }, "timers-browserify": { @@ -7605,6 +8023,15 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "typedoc": { "version": "0.16.11", "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", diff --git a/package.json b/package.json index 7de0a6d25f..6eff0f5b9a 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "jszip": "^3.1.5", "mocha": "^5.2.0", "mocha-webpack": "^1.0.1", - "nyc": "^14.1.1", + "nyc": "^15.1.0", "pre-commit": "^1.2.2", "prettier": "^1.15.2", "prompt": "^1.0.0", From f955a189361f724f6387f23c50098ecea6a1d3ce Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 Aug 2020 01:59:37 +0000 Subject: [PATCH 130/260] build(deps-dev): bump rimraf from 2.6.3 to 3.0.2 Bumps [rimraf](https://github.com/isaacs/rimraf) from 2.6.3 to 3.0.2. - [Release notes](https://github.com/isaacs/rimraf/releases) - [Changelog](https://github.com/isaacs/rimraf/blob/master/CHANGELOG.md) - [Commits](https://github.com/isaacs/rimraf/compare/v2.6.3...v3.0.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 17 ++++++++++++++--- package.json | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 53ff79d986..2f74bf000b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7091,9 +7091,9 @@ } }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -8379,6 +8379,17 @@ "mkdirp": "0.x.x", "ncp": "1.0.x", "rimraf": "2.x.x" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "utils-merge": { diff --git a/package.json b/package.json index 6eff0f5b9a..834d10093d 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "replace-in-file": "^3.1.0", "request": "^2.88.0", "request-promise": "^4.2.2", - "rimraf": "^2.5.2", + "rimraf": "^3.0.2", "shelljs": "^0.8.4", "sinon": "^9.0.2", "ts-node": "^7.0.1", From 8b78f2d2006ba1fe82b33cd663bc27f670e55a89 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 1 Aug 2020 17:28:11 +0100 Subject: [PATCH 131/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be4f711bfb..a772332568 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.2.2", + "version": "5.3.0", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From 4f6a9f734c6f9f0c1e9a53756bb5bcdcc0fbb416 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 1 Aug 2020 17:40:57 +0100 Subject: [PATCH 132/260] Update prettier --- package-lock.json | 46 ++++++++++++------------- package.json | 2 +- src/export/packer/next-compiler.spec.ts | 4 +-- src/export/packer/packer.spec.ts | 4 +-- src/file/media/media.ts | 9 +---- src/file/paragraph/paragraph.spec.ts | 40 +++++---------------- src/file/table/table.spec.ts | 28 ++++----------- 7 files changed, 43 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0cf0860d28..878af22c12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.2.2", + "version": "5.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1029,7 +1029,7 @@ }, "util": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -1058,7 +1058,7 @@ }, "async": { "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -1132,7 +1132,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1881,7 +1881,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -3015,7 +3015,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4843,7 +4843,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -5098,7 +5098,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -5430,7 +5430,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -6103,7 +6103,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -6315,7 +6315,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -6392,7 +6392,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -6492,9 +6492,9 @@ "dev": true }, "prettier": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", - "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", + "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", "dev": true }, "prismjs": { @@ -7701,7 +7701,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -8195,7 +8195,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8620,7 +8620,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8836,13 +8836,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8856,7 +8856,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -8989,7 +8989,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -9033,7 +9033,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { diff --git a/package.json b/package.json index a772332568..f00c621bad 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "mocha-webpack": "^1.0.1", "nyc": "^15.1.0", "pre-commit": "^1.2.2", - "prettier": "^1.15.2", + "prettier": "^2.0.5", "prompt": "^1.0.0", "replace-in-file": "^3.1.0", "request": "^2.88.0", diff --git a/src/export/packer/next-compiler.spec.ts b/src/export/packer/next-compiler.spec.ts index 7c48569793..7c9bcda904 100644 --- a/src/export/packer/next-compiler.spec.ts +++ b/src/export/packer/next-compiler.spec.ts @@ -16,7 +16,7 @@ describe("Compiler", () => { }); describe("#compile()", () => { - it("should pack all the content", async function() { + it("should pack all the content", async function () { this.timeout(99999999); const zipFile = compiler.compile(file); const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); @@ -35,7 +35,7 @@ describe("Compiler", () => { expect(fileNames).to.include("_rels/.rels"); }); - it("should pack all additional headers and footers", async function() { + it("should pack all additional headers and footers", async function () { file.addSection({ headers: { default: new Header(), diff --git a/src/export/packer/packer.spec.ts b/src/export/packer/packer.spec.ts index 8235649f15..18ae459b49 100644 --- a/src/export/packer/packer.spec.ts +++ b/src/export/packer/packer.spec.ts @@ -36,7 +36,7 @@ describe("Packer", () => { }); describe("#toBuffer()", () => { - it("should create a standard docx file", async function() { + it("should create a standard docx file", async function () { this.timeout(99999999); const buffer = await Packer.toBuffer(file); @@ -61,7 +61,7 @@ describe("Packer", () => { }); describe("#toBase64String()", () => { - it("should create a standard docx file", async function() { + it("should create a standard docx file", async function () { this.timeout(99999999); const str = await Packer.toBase64String(file); diff --git a/src/file/media/media.ts b/src/file/media/media.ts index 0d062c6d64..71e7c6f60e 100644 --- a/src/file/media/media.ts +++ b/src/file/media/media.ts @@ -21,14 +21,7 @@ export class Media { private static generateId(): string { // https://gist.github.com/6174/6062387 - return ( - Math.random() - .toString(36) - .substring(2, 15) + - Math.random() - .toString(36) - .substring(2, 15) - ); + return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); } private readonly map: Map; diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index cdbe99c7d8..04cc8af8e4 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -542,14 +542,8 @@ describe("Paragraph", () => { }, }); const tree = new Formatter().format(paragraph); - expect(tree) - .to.have.property("w:p") - .which.is.an("array") - .which.has.length.at.least(1); - expect(tree["w:p"][0]) - .to.have.property("w:pPr") - .which.is.an("array") - .which.has.length.at.least(1); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(1); expect(tree["w:p"][0]["w:pPr"][0]).to.deep.equal({ "w:pStyle": { _attr: { "w:val": "ListParagraph" } }, }); @@ -562,14 +556,8 @@ describe("Paragraph", () => { }, }); const tree = new Formatter().format(paragraph); - expect(tree) - .to.have.property("w:p") - .which.is.an("array") - .which.has.length.at.least(1); - expect(tree["w:p"][0]) - .to.have.property("w:pPr") - .which.is.an("array") - .which.has.length.at.least(1); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(1); expect(tree["w:p"][0]["w:pPr"][0]).to.deep.equal({ "w:pStyle": { _attr: { "w:val": "ListParagraph" } }, }); @@ -582,14 +570,8 @@ describe("Paragraph", () => { }, }); const tree = new Formatter().format(paragraph); - expect(tree) - .to.have.property("w:p") - .which.is.an("array") - .which.has.length.at.least(1); - expect(tree["w:p"][0]) - .to.have.property("w:pPr") - .which.is.an("array") - .which.has.length.at.least(2); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(2); expect(tree["w:p"][0]["w:pPr"][1]).to.deep.equal({ "w:numPr": [{ "w:ilvl": { _attr: { "w:val": 1 } } }, { "w:numId": { _attr: { "w:val": 1 } } }], }); @@ -605,14 +587,8 @@ describe("Paragraph", () => { }, }); const tree = new Formatter().format(paragraph); - expect(tree) - .to.have.property("w:p") - .which.is.an("array") - .which.has.length.at.least(1); - expect(tree["w:p"][0]) - .to.have.property("w:pPr") - .which.is.an("array") - .which.has.length.at.least(1); + expect(tree).to.have.property("w:p").which.is.an("array").which.has.length.at.least(1); + expect(tree["w:p"][0]).to.have.property("w:pPr").which.is.an("array").which.has.length.at.least(1); expect(tree["w:p"][0]["w:pPr"][0]).to.deep.equal({ "w:pStyle": { _attr: { "w:val": "ListParagraph" } }, }); diff --git a/src/file/table/table.spec.ts b/src/file/table/table.spec.ts index 49eb7a3f46..3165330047 100644 --- a/src/file/table/table.spec.ts +++ b/src/file/table/table.spec.ts @@ -268,10 +268,7 @@ describe("Table", () => { layout: TableLayoutType.FIXED, }); const tree = new Formatter().format(table); - expect(tree) - .to.have.property("w:tbl") - .which.is.an("array") - .with.has.length.at.least(1); + expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1); expect(tree["w:tbl"][0]).to.deep.equal({ "w:tblPr": [DEFAULT_TABLE_PROPERTIES, BORDERS, WIDTHS, { "w:tblLayout": { _attr: { "w:type": "fixed" } } }], }); @@ -291,10 +288,7 @@ describe("Table", () => { alignment: AlignmentType.CENTER, }); const tree = new Formatter().format(table); - expect(tree) - .to.have.property("w:tbl") - .which.is.an("array") - .with.has.length.at.least(1); + expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1); expect(tree["w:tbl"][0]).to.deep.equal({ "w:tblPr": [DEFAULT_TABLE_PROPERTIES, BORDERS, WIDTHS, { "w:jc": { _attr: { "w:val": "center" } } }], }); @@ -318,10 +312,7 @@ describe("Table", () => { layout: TableLayoutType.FIXED, }); const tree = new Formatter().format(table); - expect(tree) - .to.have.property("w:tbl") - .which.is.an("array") - .with.has.length.at.least(1); + expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1); expect(tree["w:tbl"][0]).to.deep.equal({ "w:tblPr": [ DEFAULT_TABLE_PROPERTIES, @@ -355,14 +346,10 @@ describe("Table", () => { ], }); const tree = new Formatter().format(table); - expect(tree) - .to.have.property("w:tbl") - .which.is.an("array"); + expect(tree).to.have.property("w:tbl").which.is.an("array"); const row = tree["w:tbl"].find((x) => x["w:tr"]); expect(row).not.to.be.undefined; - expect(row["w:tr"]) - .to.be.an("array") - .which.has.length.at.least(1); + expect(row["w:tr"]).to.be.an("array").which.has.length.at.least(1); expect(row["w:tr"].find((x) => x["w:tc"])).to.deep.equal({ "w:tc": [ { @@ -487,10 +474,7 @@ describe("Table", () => { }, }); const tree = new Formatter().format(table); - expect(tree) - .to.have.property("w:tbl") - .which.is.an("array") - .with.has.length.at.least(1); + expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1); expect(tree["w:tbl"][0]).to.deep.equal({ "w:tblPr": [ DEFAULT_TABLE_PROPERTIES, From 69adbbc1c16565577ac42b0965ca477b2cd228f3 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 1 Aug 2020 17:49:25 +0100 Subject: [PATCH 133/260] Bump node version --- .nvmrc | 2 +- .travis.yml | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.nvmrc b/.nvmrc index 469d080845..e338b86593 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v8 \ No newline at end of file +v10 diff --git a/.travis.yml b/.travis.yml index d27f452f86..3d4166c482 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - 9 + - 10 install: - npm install - npm install -g codecov diff --git a/package.json b/package.json index f00c621bad..9e3756fcd6 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,6 @@ "webpack": "^3.10.0" }, "engines": { - "node": ">=8" + "node": ">=10" } } From d18cfbc26f78d7f6a07f0b3e0e3c27516e66d610 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sat, 1 Aug 2020 17:58:16 +0100 Subject: [PATCH 134/260] Update tslint to v6 --- package-lock.json | 57 +++++++++++++++++------- package.json | 2 +- src/file/file.ts | 2 +- src/file/header.ts | 2 +- src/file/numbering/numbering.ts | 4 +- src/file/paragraph/paragraph.ts | 13 ++++-- src/file/paragraph/properties.ts | 4 +- src/file/paragraph/run/run.ts | 2 +- src/file/styles/styles.ts | 2 +- src/file/table/table-cell/table-cell.ts | 2 +- src/file/xml-components/xml-component.ts | 2 +- src/import-dotx/import-dotx.ts | 8 ++-- 12 files changed, 65 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 878af22c12..942a9ddcf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,12 +5,12 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "@babel/core": { @@ -246,13 +246,13 @@ } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -7946,30 +7946,53 @@ } }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", "dev": true }, "tslint": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", - "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", "commander": "^2.12.1", - "diff": "^3.2.0", + "diff": "^4.0.1", "glob": "^7.1.1", "js-yaml": "^3.13.1", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.8.0", + "tslib": "^1.13.0", "tsutils": "^2.29.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + } } }, "tslint-immutable": { diff --git a/package.json b/package.json index 9e3756fcd6..32f24f72f8 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "shelljs": "^0.8.4", "sinon": "^9.0.2", "ts-node": "^8.10.2", - "tslint": "^5.11.0", + "tslint": "^6.1.3", "tslint-immutable": "^4.9.0", "typedoc": "^0.16.11", "typescript": "2.9.2", diff --git a/src/file/file.ts b/src/file/file.ts index 59af9fa7f7..270714ed17 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -41,7 +41,7 @@ export interface ISectionOptions { readonly size?: IPageSizeAttributes; readonly margins?: IPageMarginAttributes; readonly properties?: SectionPropertiesOptions; - readonly children: Array; + readonly children: (Paragraph | Table | TableOfContents | HyperlinkRef)[]; } export class File { diff --git a/src/file/header.ts b/src/file/header.ts index 05e227d9f8..5f59ae2bec 100644 --- a/src/file/header.ts +++ b/src/file/header.ts @@ -2,7 +2,7 @@ import { Paragraph } from "./paragraph"; import { Table } from "./table"; export interface IHeaderOptions { - readonly children: Array; + readonly children: (Paragraph | Table)[]; } export class Header { diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index b8747991d0..a02caf6bef 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -8,10 +8,10 @@ import { ILevelsOptions } from "./level"; import { ConcreteNumbering } from "./num"; export interface INumberingOptions { - readonly config: Array<{ + readonly config: { readonly levels: ILevelsOptions[]; readonly reference: string; - }>; + }[]; } export class Numbering extends XmlComponent { diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index a593f6f0ab..e1db0ec910 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -10,9 +10,16 @@ import { PictureRun, Run, SequentialIdentifier, SymbolRun, TextRun } from "./run export interface IParagraphOptions extends IParagraphPropertiesOptions { readonly text?: string; - readonly children?: Array< - TextRun | PictureRun | SymbolRun | Bookmark | PageBreak | SequentialIdentifier | FootnoteReferenceRun | HyperlinkRef - >; + readonly children?: ( + | TextRun + | PictureRun + | SymbolRun + | Bookmark + | PageBreak + | SequentialIdentifier + | FootnoteReferenceRun + | HyperlinkRef + )[]; } export class Paragraph extends XmlComponent { diff --git a/src/file/paragraph/properties.ts b/src/file/paragraph/properties.ts index 52afbd1dd8..af97e2c684 100644 --- a/src/file/paragraph/properties.ts +++ b/src/file/paragraph/properties.ts @@ -30,11 +30,11 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp readonly heading?: HeadingLevel; readonly bidirectional?: boolean; readonly pageBreakBefore?: boolean; - readonly tabStops?: Array<{ + readonly tabStops?: { readonly position: number | TabStopPosition; readonly type: TabStopType; readonly leader?: LeaderType; - }>; + }[]; readonly style?: string; readonly bullet?: { readonly level: number; diff --git a/src/file/paragraph/run/run.ts b/src/file/paragraph/run/run.ts index 8b5fb0ddd3..bf7903e35e 100644 --- a/src/file/paragraph/run/run.ts +++ b/src/file/paragraph/run/run.ts @@ -10,7 +10,7 @@ import { IRunPropertiesOptions, RunProperties } from "./properties"; import { Text } from "./run-components/text"; export interface IRunOptions extends IRunPropertiesOptions { - readonly children?: Array; + readonly children?: (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[]; readonly text?: string; } diff --git a/src/file/styles/styles.ts b/src/file/styles/styles.ts index 064411e419..45efe9f784 100644 --- a/src/file/styles/styles.ts +++ b/src/file/styles/styles.ts @@ -9,7 +9,7 @@ export interface IStylesOptions { readonly initialStyles?: BaseXmlComponent; readonly paragraphStyles?: IParagraphStyleOptions[]; readonly characterStyles?: ICharacterStyleOptions[]; - readonly importedStyles?: Array; + readonly importedStyles?: (XmlComponent | ParagraphStyle | CharacterStyle | ImportedXmlComponent)[]; } export class Styles extends XmlComponent { diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index babd0031ff..6fbd748cf5 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -44,7 +44,7 @@ export interface ITableCellOptions { readonly color: string; }; }; - readonly children: Array; + readonly children: (Paragraph | Table)[]; } export class TableCell extends XmlComponent { diff --git a/src/file/xml-components/xml-component.ts b/src/file/xml-components/xml-component.ts index dfe3800b96..b06f73b930 100644 --- a/src/file/xml-components/xml-component.ts +++ b/src/file/xml-components/xml-component.ts @@ -6,7 +6,7 @@ export const EMPTY_OBJECT = Object.seal({}); export abstract class XmlComponent extends BaseXmlComponent { // tslint:disable-next-line:readonly-keyword no-any - protected root: Array; + protected root: (BaseXmlComponent | string | any)[]; constructor(rootKey: string) { super(rootKey); diff --git a/src/import-dotx/import-dotx.ts b/src/import-dotx/import-dotx.ts index 2b1261efe7..d8d5d1190c 100644 --- a/src/import-dotx/import-dotx.ts +++ b/src/import-dotx/import-dotx.ts @@ -17,8 +17,8 @@ const schemeToType = { }; interface IDocumentRefs { - readonly headers: Array<{ readonly id: number; readonly type: HeaderReferenceType }>; - readonly footers: Array<{ readonly id: number; readonly type: FooterReferenceType }>; + readonly headers: { readonly id: number; readonly type: HeaderReferenceType }[]; + readonly footers: { readonly id: number; readonly type: FooterReferenceType }[]; } enum RelationshipType { @@ -99,7 +99,7 @@ export class ImportDotx { return { type: reference.type, footer: wrapper }; }) - .filter((x) => !!x) as Array>; + .filter((x) => !!x) as Promise[]; return Promise.all(result); } @@ -134,7 +134,7 @@ export class ImportDotx { return { type: reference.type, header: wrapper }; }) - .filter((x) => !!x) as Array>; + .filter((x) => !!x) as Promise[]; return Promise.all(result); } From 870c222dd58fbc5d1afa17efc0983455afe69397 Mon Sep 17 00:00:00 2001 From: Max Lay Date: Mon, 3 Aug 2020 14:58:30 +1200 Subject: [PATCH 135/260] Allow custom text properties to be included --- src/export/packer/next-compiler.spec.ts | 7 +- src/export/packer/next-compiler.ts | 5 ++ src/file/content-types/content-types.spec.ts | 22 ++++-- src/file/content-types/content-types.ts | 1 + .../custom-properties-attributes.ts | 13 ++++ .../custom-properties.spec.ts | 67 +++++++++++++++++++ .../custom-properties/custom-properties.ts | 41 ++++++++++++ .../custom-property-attributes.ts | 15 +++++ src/file/custom-properties/custom-property.ts | 26 +++++++ src/file/custom-properties/index.ts | 2 + src/file/file.ts | 13 ++++ .../relationship/relationship.ts | 1 + 12 files changed, 203 insertions(+), 10 deletions(-) create mode 100644 src/file/custom-properties/custom-properties-attributes.ts create mode 100644 src/file/custom-properties/custom-properties.spec.ts create mode 100644 src/file/custom-properties/custom-properties.ts create mode 100644 src/file/custom-properties/custom-property-attributes.ts create mode 100644 src/file/custom-properties/custom-property.ts create mode 100644 src/file/custom-properties/index.ts diff --git a/src/export/packer/next-compiler.spec.ts b/src/export/packer/next-compiler.spec.ts index 7c9bcda904..367f7b1bff 100644 --- a/src/export/packer/next-compiler.spec.ts +++ b/src/export/packer/next-compiler.spec.ts @@ -22,10 +22,11 @@ describe("Compiler", () => { const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); - expect(fileNames).has.length(14); + expect(fileNames).has.length(15); expect(fileNames).to.include("word/document.xml"); expect(fileNames).to.include("word/styles.xml"); expect(fileNames).to.include("docProps/core.xml"); + expect(fileNames).to.include("docProps/custom.xml"); expect(fileNames).to.include("docProps/app.xml"); expect(fileNames).to.include("word/numbering.xml"); expect(fileNames).to.include("word/footnotes.xml"); @@ -62,7 +63,7 @@ describe("Compiler", () => { const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); - expect(fileNames).has.length(22); + expect(fileNames).has.length(23); expect(fileNames).to.include("word/header1.xml"); expect(fileNames).to.include("word/_rels/header1.xml.rels"); @@ -88,7 +89,7 @@ describe("Compiler", () => { const spy = sinon.spy(compiler["formatter"], "format"); compiler.compile(file); - expect(spy.callCount).to.equal(10); + expect(spy.callCount).to.equal(11); }); }); }); diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index a7b5fb617e..637646deb5 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -23,6 +23,7 @@ interface IXmlifyedFileMapping { readonly HeaderRelationships: IXmlifyedFile[]; readonly FooterRelationships: IXmlifyedFile[]; readonly ContentTypes: IXmlifyedFile; + readonly CustomProperties: IXmlifyedFile; readonly AppProperties: IXmlifyedFile; readonly FootNotes: IXmlifyedFile; readonly Settings: IXmlifyedFile; @@ -179,6 +180,10 @@ export class Compiler { data: xml(this.formatter.format(file.ContentTypes, file), prettify), path: "[Content_Types].xml", }, + CustomProperties: { + data: xml(this.formatter.format(file.CustomProperties, file), prettify), + path: "docProps/custom.xml", + }, AppProperties: { data: xml(this.formatter.format(file.AppProperties, file), prettify), path: "docProps/app.xml", diff --git a/src/file/content-types/content-types.spec.ts b/src/file/content-types/content-types.spec.ts index 1d8e008f92..57d992f83d 100644 --- a/src/file/content-types/content-types.spec.ts +++ b/src/file/content-types/content-types.spec.ts @@ -54,6 +54,14 @@ describe("ContentTypes", () => { }, }); expect(tree["Types"][11]).to.deep.equal({ + Override: { + _attr: { + ContentType: "application/vnd.openxmlformats-officedocument.custom-properties+xml", + PartName: "/docProps/custom.xml", + }, + }, + }); + expect(tree["Types"][12]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.extended-properties+xml", @@ -61,7 +69,7 @@ describe("ContentTypes", () => { }, }, }); - expect(tree["Types"][12]).to.deep.equal({ + expect(tree["Types"][13]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml", @@ -69,7 +77,7 @@ describe("ContentTypes", () => { }, }, }); - expect(tree["Types"][13]).to.deep.equal({ + expect(tree["Types"][14]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml", @@ -77,7 +85,7 @@ describe("ContentTypes", () => { }, }, }); - expect(tree["Types"][14]).to.deep.equal({ + expect(tree["Types"][15]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml", @@ -94,7 +102,7 @@ describe("ContentTypes", () => { contentTypes.addFooter(102); const tree = new Formatter().format(contentTypes); - expect(tree["Types"][15]).to.deep.equal({ + expect(tree["Types"][16]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", @@ -103,7 +111,7 @@ describe("ContentTypes", () => { }, }); - expect(tree["Types"][16]).to.deep.equal({ + expect(tree["Types"][17]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", @@ -120,7 +128,7 @@ describe("ContentTypes", () => { contentTypes.addHeader(202); const tree = new Formatter().format(contentTypes); - expect(tree["Types"][15]).to.deep.equal({ + expect(tree["Types"][16]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", @@ -129,7 +137,7 @@ describe("ContentTypes", () => { }, }); - expect(tree["Types"][16]).to.deep.equal({ + expect(tree["Types"][17]).to.deep.equal({ Override: { _attr: { ContentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", diff --git a/src/file/content-types/content-types.ts b/src/file/content-types/content-types.ts index 86307724fc..34e495d3c0 100644 --- a/src/file/content-types/content-types.ts +++ b/src/file/content-types/content-types.ts @@ -27,6 +27,7 @@ export class ContentTypes extends XmlComponent { this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml", "/word/styles.xml")); this.root.push(new Override("application/vnd.openxmlformats-package.core-properties+xml", "/docProps/core.xml")); + this.root.push(new Override("application/vnd.openxmlformats-officedocument.custom-properties+xml", "/docProps/custom.xml")); this.root.push(new Override("application/vnd.openxmlformats-officedocument.extended-properties+xml", "/docProps/app.xml")); this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml", "/word/numbering.xml")); this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml", "/word/footnotes.xml")); diff --git a/src/file/custom-properties/custom-properties-attributes.ts b/src/file/custom-properties/custom-properties-attributes.ts new file mode 100644 index 0000000000..087c9e98a1 --- /dev/null +++ b/src/file/custom-properties/custom-properties-attributes.ts @@ -0,0 +1,13 @@ +import { XmlAttributeComponent } from "file/xml-components"; + +export interface ICustomPropertiesAttributes { + readonly xmlns: string; + readonly vt: string; +} + +export class CustomPropertiesAttributes extends XmlAttributeComponent { + protected readonly xmlKeys = { + xmlns: "xmlns", + vt: "xmlns:vt", + }; +} diff --git a/src/file/custom-properties/custom-properties.spec.ts b/src/file/custom-properties/custom-properties.spec.ts new file mode 100644 index 0000000000..bbe21fa72b --- /dev/null +++ b/src/file/custom-properties/custom-properties.spec.ts @@ -0,0 +1,67 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; +import { CustomProperties } from "./custom-properties"; + +describe("CustomProperties", () => { + describe("#constructor()", () => { + it("sets the appropriate attributes on the top-level", () => { + const properties = new CustomProperties([]); + const tree = new Formatter().format(properties); + expect(tree).to.deep.equal({ + Properties: { + _attr: { + "xmlns": "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", + "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes", + }, + }, + }); + }); + + it("should create custom properties with all the attributes given", () => { + const properties = new CustomProperties([{ name: "Address", value: "123" }, { name: "Author", value: "456" }]); + const tree = new Formatter().format(properties); + expect(tree).to.deep.equal({ + Properties: [ + { + _attr: { + "xmlns": "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", + "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes", + }, + }, + { + property: [ + { + _attr: { + fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", + pid: "2", + name: "Address", + }, + }, + { + "vt:lpwstr": [ + "123", + ], + }, + ], + }, + { + property: [ + { + _attr: { + fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", + pid: "3", + name: "Author", + }, + }, + { + "vt:lpwstr": [ + "456", + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/custom-properties/custom-properties.ts b/src/file/custom-properties/custom-properties.ts new file mode 100644 index 0000000000..0685a38f08 --- /dev/null +++ b/src/file/custom-properties/custom-properties.ts @@ -0,0 +1,41 @@ +import { IXmlableObject, XmlComponent } from "file/xml-components"; +import { CustomPropertiesAttributes } from "./custom-properties-attributes"; +import { CustomProperty, ICustomPropertyOptions } from "./custom-property"; + +export class CustomProperties extends XmlComponent { + // tslint:disable-next-line:readonly-keyword + private nextId: number; + private readonly properties: CustomProperty[] = []; + + constructor(properties: ICustomPropertyOptions[]) { + super("Properties"); + + this.root.push( + new CustomPropertiesAttributes({ + xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", + vt: "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes", + }), + ); + + // I'm not sure why, but every example I have seen starts with 2 + // https://docs.microsoft.com/en-us/office/open-xml/how-to-set-a-custom-property-in-a-word-processing-document + this.nextId = 2; + + for (const property of properties) { + this.addCustomProperty(property); + } + } + + public prepForXml(): IXmlableObject | undefined { + this.properties.forEach((x) => this.root.push(x)); + return super.prepForXml(); + } + + public addCustomProperty(property: ICustomPropertyOptions): void { + this.properties.push(new CustomProperty(this.nextId++, property)); + } + + public get Properties(): CustomProperty[] { + return this.properties; + } +} diff --git a/src/file/custom-properties/custom-property-attributes.ts b/src/file/custom-properties/custom-property-attributes.ts new file mode 100644 index 0000000000..9b2697fe94 --- /dev/null +++ b/src/file/custom-properties/custom-property-attributes.ts @@ -0,0 +1,15 @@ +import { XmlAttributeComponent } from "file/xml-components"; + +export interface ICustomPropertyAttributes { + readonly fmtid: string; + readonly pid: string; + readonly name: string; +} + +export class CustomPropertyAttributes extends XmlAttributeComponent { + protected readonly xmlKeys = { + fmtid: "fmtid", + pid: "pid", + name: "name", + }; +} diff --git a/src/file/custom-properties/custom-property.ts b/src/file/custom-properties/custom-property.ts new file mode 100644 index 0000000000..6804cafb5b --- /dev/null +++ b/src/file/custom-properties/custom-property.ts @@ -0,0 +1,26 @@ +import { XmlComponent } from "file/xml-components"; +import { CustomPropertyAttributes } from "./custom-property-attributes"; + +export interface ICustomPropertyOptions { + readonly name: string; + readonly value: string; +} + +export class CustomProperty extends XmlComponent { + constructor(id: number, properties: ICustomPropertyOptions) { + super("property"); + this.root.push(new CustomPropertyAttributes({ + fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", + pid: id.toString(), + name: properties.name, + })); + this.root.push(new CustomPropertyValue(properties.value)); + } +} + +export class CustomPropertyValue extends XmlComponent { + constructor(value: string) { + super("vt:lpwstr"); + this.root.push(value); + } +} diff --git a/src/file/custom-properties/index.ts b/src/file/custom-properties/index.ts new file mode 100644 index 0000000000..132da63d92 --- /dev/null +++ b/src/file/custom-properties/index.ts @@ -0,0 +1,2 @@ +export * from "./custom-properties"; +export * from "./custom-property"; diff --git a/src/file/file.ts b/src/file/file.ts index 270714ed17..4ecedaab47 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -2,6 +2,7 @@ import * as shortid from "shortid"; import { AppProperties } from "./app-properties/app-properties"; import { ContentTypes } from "./content-types/content-types"; import { CoreProperties, IPropertiesOptions } from "./core-properties"; +import { CustomProperties, ICustomPropertyOptions } from "./custom-properties"; import { Document } from "./document"; import { FooterReferenceType, @@ -59,6 +60,7 @@ export class File { private readonly footNotes: FootNotes; private readonly settings: Settings; private readonly contentTypes: ContentTypes; + private readonly customProperties: CustomProperties; private readonly appProperties: AppProperties; private readonly styles: Styles; private readonly hyperlinkCache: { readonly [key: string]: Hyperlink } = {}; @@ -71,6 +73,7 @@ export class File { }, fileProperties: IFileProperties = {}, sections: ISectionOptions[] = [], + customProperties: ICustomPropertyOptions[] = [], ) { this.coreProperties = new CoreProperties(options); this.numbering = new Numbering( @@ -82,6 +85,7 @@ export class File { ); this.docRelationships = new Relationships(); this.fileRelationships = new Relationships(); + this.customProperties = new CustomProperties(customProperties); this.appProperties = new AppProperties(); this.footNotes = new FootNotes(); this.contentTypes = new ContentTypes(); @@ -289,6 +293,11 @@ export class File { "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", "docProps/app.xml", ); + this.fileRelationships.createRelationship( + 4, + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties", + "docProps/custom.xml", + ); this.docRelationships.createRelationship( this.currentRelationshipId++, @@ -352,6 +361,10 @@ export class File { return this.contentTypes; } + public get CustomProperties(): CustomProperties { + return this.customProperties; + } + public get AppProperties(): AppProperties { return this.appProperties; } diff --git a/src/file/relationships/relationship/relationship.ts b/src/file/relationships/relationship/relationship.ts index 82672644c9..2b928de890 100644 --- a/src/file/relationships/relationship/relationship.ts +++ b/src/file/relationships/relationship/relationship.ts @@ -13,6 +13,7 @@ export type RelationshipType = | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" + | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"; From ee435852107593385ed1a9112d76a594cd8ed94d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2020 09:48:31 +0000 Subject: [PATCH 136/260] build(deps-dev): bump @types/mocha from 8.0.0 to 8.0.1 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5174555098..c727674b25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -576,9 +576,9 @@ "dev": true }, "@types/mocha": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.0.tgz", - "integrity": "sha512-jWeYcTo3sCH/rMgsdYXDTO85GNRyTCII5dayMIu/ZO4zbEot1E3iNGaOwpLReLUHjeNQFkgeNNVYlY4dX6azQQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.1.tgz", + "integrity": "sha512-TBZ6YdX7IZz4U9/mBoB8zCMRN1vXw8QdihRcZxD3I0Cv/r8XF8RggZ8WiXFws4aj5atzRR5hJrYer7g8nXwpnQ==", "dev": true }, "@types/node": { @@ -1029,7 +1029,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -1058,7 +1058,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -1132,7 +1132,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1881,7 +1881,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -3015,7 +3015,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4843,7 +4843,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -5430,7 +5430,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -6103,7 +6103,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -6315,7 +6315,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -6392,7 +6392,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -7701,7 +7701,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -8218,7 +8218,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8870,13 +8870,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8890,7 +8890,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -9023,7 +9023,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -9067,7 +9067,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From ec4c4fb5c427060f46098c20e0e3cd1dc5272a4b Mon Sep 17 00:00:00 2001 From: Max Lay Date: Tue, 4 Aug 2020 08:50:56 +1200 Subject: [PATCH 137/260] Run updated prettier --- .../custom-properties/custom-properties.spec.ts | 17 ++++++++--------- src/file/custom-properties/custom-property.ts | 12 +++++++----- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/file/custom-properties/custom-properties.spec.ts b/src/file/custom-properties/custom-properties.spec.ts index bbe21fa72b..a8bc92b7e4 100644 --- a/src/file/custom-properties/custom-properties.spec.ts +++ b/src/file/custom-properties/custom-properties.spec.ts @@ -10,7 +10,7 @@ describe("CustomProperties", () => { expect(tree).to.deep.equal({ Properties: { _attr: { - "xmlns": "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", + xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes", }, }, @@ -18,13 +18,16 @@ describe("CustomProperties", () => { }); it("should create custom properties with all the attributes given", () => { - const properties = new CustomProperties([{ name: "Address", value: "123" }, { name: "Author", value: "456" }]); + const properties = new CustomProperties([ + { name: "Address", value: "123" }, + { name: "Author", value: "456" }, + ]); const tree = new Formatter().format(properties); expect(tree).to.deep.equal({ Properties: [ { _attr: { - "xmlns": "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", + xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes", }, }, @@ -38,9 +41,7 @@ describe("CustomProperties", () => { }, }, { - "vt:lpwstr": [ - "123", - ], + "vt:lpwstr": ["123"], }, ], }, @@ -54,9 +55,7 @@ describe("CustomProperties", () => { }, }, { - "vt:lpwstr": [ - "456", - ], + "vt:lpwstr": ["456"], }, ], }, diff --git a/src/file/custom-properties/custom-property.ts b/src/file/custom-properties/custom-property.ts index 6804cafb5b..fc18db2667 100644 --- a/src/file/custom-properties/custom-property.ts +++ b/src/file/custom-properties/custom-property.ts @@ -9,11 +9,13 @@ export interface ICustomPropertyOptions { export class CustomProperty extends XmlComponent { constructor(id: number, properties: ICustomPropertyOptions) { super("property"); - this.root.push(new CustomPropertyAttributes({ - fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", - pid: id.toString(), - name: properties.name, - })); + this.root.push( + new CustomPropertyAttributes({ + fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", + pid: id.toString(), + name: properties.name, + }), + ); this.root.push(new CustomPropertyValue(properties.value)); } } From fc87a73259c612f219956fe48679d56b49f4dd7c Mon Sep 17 00:00:00 2001 From: Max Lay Date: Tue, 4 Aug 2020 09:15:20 +1200 Subject: [PATCH 138/260] Remove unnecessary properties getter --- src/file/custom-properties/custom-properties.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/file/custom-properties/custom-properties.ts b/src/file/custom-properties/custom-properties.ts index 0685a38f08..c254ceeca8 100644 --- a/src/file/custom-properties/custom-properties.ts +++ b/src/file/custom-properties/custom-properties.ts @@ -34,8 +34,4 @@ export class CustomProperties extends XmlComponent { public addCustomProperty(property: ICustomPropertyOptions): void { this.properties.push(new CustomProperty(this.nextId++, property)); } - - public get Properties(): CustomProperty[] { - return this.properties; - } } From 05dda37b710ccdf9b68820f94c988c30c8f36833 Mon Sep 17 00:00:00 2001 From: Jan Marten <546795+LeovR@users.noreply.github.com> Date: Thu, 6 Aug 2020 08:56:02 +0000 Subject: [PATCH 139/260] Fix comment regarding output file name --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 28781012fe..f48a42ecf6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -53,7 +53,7 @@ Packer.toBuffer(doc).then((buffer) => { fs.writeFileSync("My Document.docx", buffer); }); -// Done! A file called 'My First Document.docx' will be in your file system. +// Done! A file called 'My Document.docx' will be in your file system. ```

From 7a48da440b0d2a6d3b9efdf89c0347dfd9730e57 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2020 22:43:32 +0000 Subject: [PATCH 140/260] build(deps): [security] bump prismjs from 1.20.0 to 1.21.0 Bumps [prismjs](https://github.com/PrismJS/prism) from 1.20.0 to 1.21.0. **This update includes a security fix.** - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](https://github.com/PrismJS/prism/compare/v1.20.0...v1.21.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5174555098..a569f2b171 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1029,7 +1029,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -1058,7 +1058,7 @@ }, "async": { "version": "0.9.2", - "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true }, @@ -1132,7 +1132,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1881,7 +1881,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -3015,7 +3015,7 @@ }, "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, @@ -4843,7 +4843,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -5430,7 +5430,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -6103,7 +6103,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -6315,7 +6315,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -6392,7 +6392,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -6498,9 +6498,9 @@ "dev": true }, "prismjs": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.20.0.tgz", - "integrity": "sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.21.0.tgz", + "integrity": "sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==", "dev": true, "requires": { "clipboard": "^2.0.0" @@ -7701,7 +7701,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -8218,7 +8218,7 @@ }, "yargs": { "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { @@ -8870,13 +8870,13 @@ "dependencies": { "async": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", "dev": true }, "colors": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, @@ -8890,7 +8890,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -9023,7 +9023,7 @@ }, "yargs": { "version": "4.8.1", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", "dev": true, "requires": { @@ -9067,7 +9067,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { From e65e7d6a324417108b08ea1a49574ebc378a56a6 Mon Sep 17 00:00:00 2001 From: Max Lay Date: Sat, 8 Aug 2020 11:01:21 +1200 Subject: [PATCH 141/260] Add custom properties demo --- demo/54-custom-properties.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 demo/54-custom-properties.ts diff --git a/demo/54-custom-properties.ts b/demo/54-custom-properties.ts new file mode 100644 index 0000000000..f6ef7cf778 --- /dev/null +++ b/demo/54-custom-properties.ts @@ -0,0 +1,25 @@ +// Custom Properties +// Custom properties are incredibly useful if you want to be able to apply quick parts or custom cover pages +// to the document in Word after the document has been generated. Standard properties (such as creator, title +// and subject) cover typical use cases, but sometimes custom properties are required. + +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, Packer } from "../build"; + +const doc = new Document( + // Standard properties + { creator: "Creator", title: "Title", subject: "Subject", description: "Description" }, + // No file properties + {}, + // No sections + [], + [ + { name: "Subtitle", value: "Subtitle" }, + { name: "Address", value: "Address" }, + ] +); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); From 08f9926e600a2b9f334283949f9eb22fb3a50c9c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2020 08:38:15 +0000 Subject: [PATCH 142/260] build(deps-dev): bump sinon from 9.0.2 to 9.0.3 Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.2 to 9.0.3. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e544100c5..658a46b4ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -498,9 +498,9 @@ } }, "@sinonjs/samsam": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", - "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.1.0.tgz", + "integrity": "sha512-42nyaQOVunX5Pm6GRJobmzbS7iLI+fhERITnETXzzwDZh+TtDr/Au3yAvXVjFmZ4wEUaE4Y3NFZfKv0bV0cbtg==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -7303,17 +7303,17 @@ "dev": true }, "sinon": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", - "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.3.tgz", + "integrity": "sha512-IKo9MIM111+smz9JGwLmw5U1075n1YXeAq8YeSFlndCLhAL5KGn6bLgu7b/4AYHTV/LcEMcRm2wU2YiL55/6Pg==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.2", "@sinonjs/fake-timers": "^6.0.1", "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", + "@sinonjs/samsam": "^5.1.0", "diff": "^4.0.2", - "nise": "^4.0.1", + "nise": "^4.0.4", "supports-color": "^7.1.0" }, "dependencies": { From c91f135c2848b0394aa2cc80d5d8c8ca539a7b76 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2020 08:37:49 +0000 Subject: [PATCH 143/260] build(deps-dev): bump @types/mocha from 8.0.1 to 8.0.2 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e544100c5..94a8bdd92e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -576,9 +576,9 @@ "dev": true }, "@types/mocha": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.1.tgz", - "integrity": "sha512-TBZ6YdX7IZz4U9/mBoB8zCMRN1vXw8QdihRcZxD3I0Cv/r8XF8RggZ8WiXFws4aj5atzRR5hJrYer7g8nXwpnQ==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.2.tgz", + "integrity": "sha512-5cv8rmqT3KX9XtWDvSgGYfS4OwrKM2eei90GWLnTYz+AXRiBv5uYcKBjnkQ4katNvfYk3+o2bHGZUsDhdcoUyg==", "dev": true }, "@types/node": { From 8a189161f230b1c1c8acb3ef599dd595cc2a403e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 08:28:30 +0000 Subject: [PATCH 144/260] build(deps): [security] bump dot-prop from 4.2.0 to 4.2.1 Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1. **This update includes a security fix.** - [Release notes](https://github.com/sindresorhus/dot-prop/releases) - [Commits](https://github.com/sindresorhus/dot-prop/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index df2c8be0ca..9b967d2e20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2531,9 +2531,9 @@ "dev": true }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", + "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", "dev": true, "requires": { "is-obj": "^1.0.0" From dc1f3aebe9bd3559ced112c8bd32d2200a96ff50 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 08:29:38 +0000 Subject: [PATCH 145/260] build(deps): bump @types/node from 14.0.27 to 14.6.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.27 to 14.6.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index df2c8be0ca..8024348871 100644 --- a/package-lock.json +++ b/package-lock.json @@ -582,9 +582,9 @@ "dev": true }, "@types/node": { - "version": "14.0.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz", - "integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g==" + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.0.tgz", + "integrity": "sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA==" }, "@types/request": { "version": "2.48.5", From 58fae6b201cc838a6566bb67cdfd06074aa11c9e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 08:30:15 +0000 Subject: [PATCH 146/260] build(deps-dev): bump @types/mocha from 8.0.2 to 8.0.3 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.2 to 8.0.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index df2c8be0ca..158af12419 100644 --- a/package-lock.json +++ b/package-lock.json @@ -576,9 +576,9 @@ "dev": true }, "@types/mocha": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.2.tgz", - "integrity": "sha512-5cv8rmqT3KX9XtWDvSgGYfS4OwrKM2eei90GWLnTYz+AXRiBv5uYcKBjnkQ4katNvfYk3+o2bHGZUsDhdcoUyg==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.3.tgz", + "integrity": "sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg==", "dev": true }, "@types/node": { From 1285304f974a356729b0686d253452c0e8dd3809 Mon Sep 17 00:00:00 2001 From: Raymond Berger Date: Wed, 19 Aug 2020 10:54:27 -1000 Subject: [PATCH 147/260] remove broken examples link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dd52e1a94..84469fa454 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Please refer to the [documentation at https://docx.js.org/](https://docx.js.org/ # Examples -Check the `examples` section in the [documentation](https://docx.js.org/#/examples) and the [demo folder](https://github.com/dolanmiu/docx/tree/master/demo) for examples. +Check the [demo folder](https://github.com/dolanmiu/docx/tree/master/demo) for examples. # Contributing From 364ce6d85664a8b7a149aed258fea97386fa2e41 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2020 18:35:48 +0000 Subject: [PATCH 148/260] build(deps-dev): bump ts-node from 8.10.2 to 9.0.0 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.10.2 to 9.0.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.10.2...v9.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 841f8d4763..b917352c3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7915,9 +7915,9 @@ "dev": true }, "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.0.0.tgz", + "integrity": "sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index 9edda454f0..51e1b246c3 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "rimraf": "^3.0.2", "shelljs": "^0.8.4", "sinon": "^9.0.2", - "ts-node": "^8.10.2", + "ts-node": "^9.0.0", "tslint": "^6.1.3", "tslint-immutable": "^4.9.0", "typedoc": "^0.16.11", From 491c7abd1cf6ba0fe1f1439100f713a91b6227a9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2020 18:36:24 +0000 Subject: [PATCH 149/260] build(deps-dev): bump prettier from 2.0.5 to 2.1.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.0.5...2.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 841f8d4763..182c107308 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6492,9 +6492,9 @@ "dev": true }, "prettier": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", - "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.0.tgz", + "integrity": "sha512-lz28cCbA1cDFHVuY8vvj6QuqOwIpyIfPUYkSl8AZ/vxH8qBXMMjE2knfLHCrZCmUsK/H1bg1P0tOo0dJkTJHvw==", "dev": true }, "prismjs": { From a576098639de279d24f5d824ece63121ef866840 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2020 19:36:39 +0000 Subject: [PATCH 150/260] build(deps-dev): bump prettier from 2.1.0 to 2.1.1 Bumps [prettier](https://github.com/prettier/prettier) from 2.1.0 to 2.1.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.1.0...2.1.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb7f22ddb9..f5f162c321 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6492,9 +6492,9 @@ "dev": true }, "prettier": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.0.tgz", - "integrity": "sha512-lz28cCbA1cDFHVuY8vvj6QuqOwIpyIfPUYkSl8AZ/vxH8qBXMMjE2knfLHCrZCmUsK/H1bg1P0tOo0dJkTJHvw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", + "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", "dev": true }, "prismjs": { From 37251c84f8ae5849573457db2a5dd03415c8f62f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2020 19:37:11 +0000 Subject: [PATCH 151/260] build(deps): bump @types/node from 14.6.0 to 14.6.2 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.0 to 14.6.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb7f22ddb9..3c691f6b58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -582,9 +582,9 @@ "dev": true }, "@types/node": { - "version": "14.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.0.tgz", - "integrity": "sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA==" + "version": "14.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.2.tgz", + "integrity": "sha512-onlIwbaeqvZyniGPfdw/TEhKIh79pz66L1q06WUQqJLnAb6wbjvOtepLYTGHTqzdXgBYIE3ZdmqHDGsRsbBz7A==" }, "@types/request": { "version": "2.48.5", From e196d9d917c621c8a9622b2033f6b23b65007f21 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 5 Sep 2020 18:40:40 +0100 Subject: [PATCH 152/260] Add Clippy the mascot --- docs/clippy.png | Bin 0 -> 30632 bytes docs/clippy.psd | Bin 0 -> 153099 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/clippy.png create mode 100644 docs/clippy.psd diff --git a/docs/clippy.png b/docs/clippy.png new file mode 100644 index 0000000000000000000000000000000000000000..97bd4af2df2c9ddb8a708cfd0d519d6fb9db72ad GIT binary patch literal 30632 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 literal 0 HcmV?d00001 diff --git a/docs/clippy.psd b/docs/clippy.psd new file mode 100644 index 0000000000000000000000000000000000000000..5193c920e65585a3b5eca7903fa57af7302ee932 GIT binary patch literal 153099 zcmeEv30xFM_J0pI3Mk%ZG)7~LK?S_PAVy-0F{lyoHUwb?4QDvS=ps2bm_s9K95YcD zjOVBm;&?_y(RfAM7!SY$Vl;`Pcn~9q49wL3`>K0}!DGW_cYpug{lH9jS69FH>eZ`P zud2JhQ}iD^Dnw8S(w_qkH?SE67r|c23TxMY@UUQqF8r*qlvlIo*E-X=|LW%hXC{P4 zL@Sd!PE|%tj|=Ejx_e)zj?*IpI*scS+$%UCNI7l#%d--dA+tt|iI^1~;TPE{aA1Sy zXZp{KO^8({hj*MA8xxo0KQo|Hcx3!kr9aY?-Lq3iPLdoQ(CG!b&~be5sE$GLiOP*@b>NBv7cWL?>>J0eR@CF(WjSp-=4kvdV2Tv>gDa<%g?`;cSrfJ)4&EuJ)an< z@*n-;OLB2I3+Oa0IXS_nCidV2f$`StAO)6>Vt3lv^SZ^tEv&-98* zdP)*vk@KQ5DI#%tLh|(ZxQ-+@d}@43azLj}RFL&gu2*b=wV=499=wh{BI09v&J0iJ z>D{AO&qpyuMp$_gQW9ghYLO8=l`+a#Wn6L+_`DyMJFW>nE?~XCVeDl(wMgsls!i)lj2hnBa}mCpei+Xh1s4*>Ha~9%JAg) z#4+*lF$1M`A7!aj$Dkl;=YAcZ88Cy6SCNhEFe&(W}oG@BaS2-u~YGZDrU{J}3ho z9T}b+UMDHGv^H`gBm7nIiLv3y1H%&%Vx~ugll%3Y5f>>tm9=%B?^#1?!*9Lr9~2)G zp9p1@1AU+G`KW9gF76Tj!{U;X!{Z{9!(JSSj2_dcNBa9Hy?ZOYy(7H(Ozq#>OXb^p zs@K$BeX#S3=+mcP-#&eP!d2X~!NIod4~c#;J|cy@8lt5D5E&l<@il7ojqI!P^Ye-D zQmXtSy}Z4Z;a+}z;oe^Ty?gnpdinV&mHm~Lf^396RM5!8>4;C^F*Y<*mq--Wzfa%D zseSzVc=e6+>F*V(LS4d@{rh@F_UVh_ruzE!i?kN;2r&;8_44#2`0(32@L1ykk3b>H zw`%8--%|*Qna(3gLU>}5lKM$NCrd}Mh90XV;^FK6MYbN}gwI<@1!W!QRP zypTw3CYjO%W8_cBdj>}MO_m0=BkU8tTgrJvYMhUiF$L@ z#Y$G1dUIJ#QI|x$x$0siD^0z*tfr_-qTXC}v67Xh-dt8w)Fn}GuDV#sN>gtxt10S| zs5e(#tYoFBH<#5EbxG8lt1ecu($t&FYKpof>djRbD_Lpk&1E%3T@v-?s*9DZH1+1P znxZa=dUMsqN>-YBb6HJMmqfj}>S84;O})9Srl?Dz-duIDl9i_3Tvk)mCGmI7)u84F zsmeI~3N;l!H|4)q_2<7|{S|xqJ*)KF*M`rK zxMZa=E+v*OP@0ZGF^P2Ei1UU_pGg#hrzaB+U6y1j6Gz~8J!6K9AA>BZFo|JQVtl+R zM46nDFmmdf5xD3kj1m%sczjesMkU*k@1_@SboN+OOW0K=!johZDOpi&P z9>+!Ex+|v+3Z5`r;58mVBJ8}dtEq7ln;MVgzhF(m^_D~#l#m=}sRSxHHPL!9Iw~pH zdJ>cv7gTc+mt1r5>eQGd>y;5v$uq1cLtY(_aNJIWNG%@a>yumRK(+y6H91|Ls{L)jSW2kMde}iKpJ3cCZbW%(* z&mT22X3%&md4n0s2>h52zud&Hd}Xf~6*Vf!;uVx8VjM|r;Z>zd67xW@W8xDYS!_r| zjFdkrF=EgJlED8OMRE+&Hgq&b$1(+ z7#^2|AEhbdBHorfu{po;1orO27)Pk`clo(1-(x39=_>u6y@Ax9kZs57T+XRp7J8~wxDtcC z6VFk|IV&|^SaW>1u!-1PXh?5`Kz&Wl;WF>zT%f+p9{Fc~jV?d(68mSaaa)jR)J>|L zgB?F};d|^jMK6BlpuitLC+$gp>WEG}N1~Ubhut8E!zOc6YYIY5TeP85d$NOM0Xns; zDI*m(-p{PsMbHcCi<06wDh$a!q-nhoqq%LUnb7Vfy zPlUlW{fU-C5JuN@7gEhB3BS5lCXJ1Gl{&nlRymIR8nT;UbLJ<*UbHF8IVv$eC81W9 zQ#}7cvL%)e2_fmyuZtnWJv=2jeyB1|nMl9vMTS7X3YLi*NW_#wSBAw#b;RM{U4MHl zMNn%%M=Dj}DLl-(((i8{K|a=!U7Nh&)F}RIcpKw-O7aH}wO#;= zFd{yVZ0(vHpMdE?lF~MgHi$vMeJIy$Di6>P2 z8p7e^7}$)Tkwd$3E}|D&AHv` z!Ow)qcR;UT7lpqHZZ0k^t}bq_u5O+U8#MH6-pI|ZQS(+!n>KISw3VkD|C0~W$%A`^ zd&7qA9`21jJQ_Fi@bG9xJC9}(i)UQ~usp%j1?~wo(g+U1uI6+ZNLsH0->cN z1u9rU`m+}lb`FkC&MvME8Y&*Vh%w9FatXpb#6X-|5V@JiSL~Xa_+JycPlsMn{=Vg}-=0bN`R+?yKU@95)+Gne{!+GP+oAkl%g3r_WT@9}KU{G2UcaH^ zqEhEBUAN;%p`pT4u(N}<4qPW^C&xZqg(tn6I6#B9IyH6ld3Rwm(qRASQ@{Cko_aa) zy+uJG%_EX}-|6B+3OGOA=fG(wv8rX{kkG!#$}3hC9y8Wq?D!OfnR=_v#Xj)WvJF z<}6b_=~>mRT-)QN9i|tzv=F~As@h)IpLx~k=P{SxIGl1~=GuE(ZhoaNxfA={k#&XT zn+}-PvQV|N)fNzpUBX2nOumrY5~o@2uF*uFl6Kld%2bjlQX zH*oc<73mv7M!ve}YSLSCR=@F!Y3WmIr+)H&tKSRWFn%#UR%xHs>Yne}z2fYRUuGHN zc9f+s;r$oCz0QQuTb3WbQdZqIcwYIWR-2wUs=a7ByCd%2FQ-eGa2iC$7F|kHE0;Zj&Bb9O4$tW2RUCD*B52~(eqEMM9C&=!rm(?>C*9kfK9&g|jBq~ND70*O zyS}@2yN~rdH)(uf-{ansr_8={apanNU&I_KH;oJ`G__p6bhl~rhFM#e_VrIcYdC#; z!36)Mxg`0oOP@+GW_=Q|@#M9gJL5KNj=gwC zn-D!C>h&upUr_HV-j=-llYlG@Oz^>_S5~}V;yycVMApYAe%f99&PzW$*MHwy)1>m$ zw3T~5J#Gp--Q{*x@w4kT4trzAm!^;{%_~Eb_jJt<({_#++xcwRl-;QXmriP{!pb@@ zp~V($`q|m*%a05@^ws865OqJW>?5~J`OmJ)8J1Z7 zTKN;D`Ub|={roO}e|Y-!+m0uu>ptCfYetWfX~heNUN0@XZhH0;O}XngJrAXhJk;VW z6M~tre#OfD;)au_P0LP~UDq2YEu6uG;T;M#7M7V_%q=Zh5|ZEfYwuY@&sOj5v9ZJ2 z%LBzk$NBv?O@D84!MPLV{qon8epTRO+;O_9+pc{fWn;T{xEoPYXdZJp{boRzG1z{& z`<2iUyM||de{FnP;1lMRr@BW4pZIc1M4Ax&<;j-=Zf)$>WYIC7H|JD!|FOh;YMgf8 z6Bl%41y=)396hq}$#*h}4(F~cdgt=axcSFke)ZMyLF|X}&<}p_e)Fg?_lHgT)Tuv5 z6pv|Dk(TvC#hi+3rJLiv8nG$nxOrpRl>Xa_r?1@;?bYg@&&DC?O8rv*jXv$Cq`y)y zC$%!``)9Vy`E=W^pfBfaEL)sbs2(t9cwFpP_ihJH>+65!MoiVvEw@_eH<-d+$hwvr zcDmcR^3*1Cw~ND{`|{Yif-x^Na!-m@b-gfSd|}*oGurpLQkr_d%lxpB#uJkgvm(68 zZ!3d0-&c=0aO)dQg);4f)eBBm$p1N!#5^M8@9Ik<|or;=MIQ5&puQ3TkbRK&BiGgjbpo1rbmB0Am8Nd z(Q(eEs+=SDm=N}CF%$N_e|lGoe#3WNe5UjEV{hI0{7mJxsbA-htr(s=X+`djYxbUu z`tsy&lP=AEB5TXf`GaQPDjR>nG)k81(J$kM_u5#zb3nEGtER4Zx1F!fUt&~uZ)Dtk=DFAtvtPgZOXC|8Cx@R} z7!`8SG&J&3lqsrgcyQ;PzZQ>}6BxAr$ia=C?--LO`?OYUGCegVcds}jWcb8OMPF?= z`;2klyF*9r7TUIdeaPP3H+x)sWBd4fQzmI+gTK0PDR}Ixc~N_rP!M097`y96@6*FS zopSbyDs9YxV@Glq>@`GQ3c2AoHgNWifqRPLL&YbS1#Bw$CTwNSsWn+El>-+)J32jo zgZtIXvx@@ymu;#js7f22c=)ABikw?*eY|4lY4?75a-^xv`C&a1r<^@~@cNi5WhKU> znAz8IT7Ula%MKZR@^_t&PMuX4XX?J>%{iNrznFv-wdS|jySsyN=!gX&uW3T6j&L5Sw=JRiyy|TZ__CI|&4*hD0e%FlLta}STzjXP0)V1I5 z4*Vh7-+AQb+q2)V2rO9i#L%)&o;kKR@W#&Mn-hn1IntwK`cKK524<;-e176wVphp` zA$pLHA+JpHdgP!}krVF1`Eam0=x+4bX1P5BxiN2 zl(d=q=&gVz2qqXd6zuvnU{1~gbI;$tx|Tod{HFbf zyf(SM9d|4@e#pKRNpJpWG-p*$`S`ibS9;BV_t3Ljw&$KnQC>eiK5Ij?IV|Vsfx8KbyZ=kpB7&g(iEn@p}aG z*>A;secP|~lF(bTOO*3xG;cL_)}~a``trbALtdU8wJY}eqRBJ5PB4Bu_IMB7<;t}i zCQT{d*+6&nyOP-G8xgrJzxh15@S__c)rNDXhJiz>fBm9;dcRFqe*GmaW0}{H{+-_| z$lbr=@TB#z!Rul_-O}lB$Q1RsC=72a@6FkAWAq5$l<=`--Fk!sZZt)1*z;aNta7f` zw(;Vm*Gq=9D4ze}t$CYI9^Voe*KghCZRvjZJ~q7)dVA&BS$nJg4+d;0dbarNQokw1uWx$&lOB5w7Z*(0GWp)~ zO_iGVy(ZrHqWG&d;)d$NzFEJ88uy+Yys`OTJhqg7I5oNCckkt1Z)=whEExE**CDrZ zmndz?uj6K@LJNG)Xxa$1b{h$GC2Mx&PtNpY(hDyX!Y>(u%sT zzA7^O8u3X?LQbc`srmDF_gHEST>a&x;KAk{_+;kUw--ZjlMTC`z;+`u+zEU>^2oX%jU;N_w~PU;bOqPRZMuv^x-QG4MPTM zneenK{oo`fjQVB75}brH;ovx&oqhbJ{J@^SA3x#9PCu%f9W`!Y!bf`-GvTkBnQ%A% zO^=B1tC`m~6{fv$eUtdzx7$vBb#q*7$AXH6E*s|QKL1|3eOBSDw^L#c#@|rSHa(X< z^2e>}v8nlcSNtu`uWj*-;(K%LH=k(HVEVT@^OF4YA*QFNo{8@MjXM8Ex?jmSV;_f^ zDOX+@3fW$ljEOV)?${kWW5Dot^}5~NF}R=du9&c;^5gFMDwF@lA!3Os(82qBznF*% zuY0-A-soOkI3XoAZHzH%@Pg2rRYS7ATy=KyYx_#FUO9T8s{Ol%zkc(%F5CL|J~Qr| z=K7h~zEi92>?kPBXTpK_Rj0O`E<2uY*8P-{6m}sjdQ!-YK1+5w9h}?eVvO={E9PTb zF>;M^iTUG8qqmm6^u-dd)Pf$Lwq6jk%P?W~^fm9TYuGm8(%2^|^j8aRs?50~ug8_; zzLMCzEG=wnNJ&|Pjh^a$YlQyl^FJ2N&G_c)D`!5u6SBkm(#mpwRd-X?YI9QA-&U-DJ8;~x#b<9F zpA)2+A3b@>{PFL_C3QdKH}aeB({p#89XGtyg?(l58*jR!`Yn+|dHo!kW+PtA`*$w54UMrSfT-5GrVfeDFlH&1IL&o`RPixRUEjZ`t zkGq#$JF1(sW%ZTwXWO1_7j|Q_m>^WCwnzSOGG@-zw5okKrq3F%#Anrpvg%KA+r-Cy z+UJw^|9Uee&V5T->d;kD*KTb%ax?wfja|#0GtXMxvfRA_Lqk9L z^pe5U;nb`pp;JEEym!-25y?e+zqr^VWy1HDQr4Vkar^v;f%hhabib$)-z+YrJl5F$AI9!=}zoYZ@zc-!sj!7F@3qq)ZyywmyX}) zzf&`}$%WFSi!UFYU9#rh*53P0ZOGl)_jv5y!oG&>8{XVe*1uv>{MtiVE6PV~nm7BI zBgf_p&@X4gwxU5vKOX<$!rd=U{B3?{pl`%;Tgv7v^D@7gBaYj(H0WT-h;4-f54Y7! zi9h#ZthV4>fqMM$?wfO}hWu?+4<-6@KXZ!>H;11pezj47$Fh5q=UpvLYgL#(ud2=Y z;u6#H{FDyY?`$`OVlH+!>t0sAsl)n_mHSUSPCXKtu`O>vQQ_8)TCP|Sq1n4Tef05& z>s!jU6%Sn*b$#DUE9d{vYxCwQA0D~zX3EY&!C)7(x$P%Y6knYS_{x+ubR!d{gzEQd zFNa0wT25}4x@WAx{#qGGAHfqoK_&m{l!=84j0k?l@^vbsF-?&Y7dp)=O^^+Sa`!4^>?ay0( zl-WIN^p2k!d;7MXqSM|!B7XISeghMR4f%0JDgxhYzkK*~yB9yaw~jzEnE72l8^VLC%5-HnmJ=qZN63O8pSNxw`mQ`M*!YSm z>{QS*gGLPQe9ZpWB~N$${JkNsY-@XF&h3@&j~JkjJ*wO4vw!%lqK1>gXC5y5@p4(% zjoqiyZwCZ?v-7k3g(>PCst}9Vz8k4V^96}orZ>pAxWhYUBz>^@zRpSEsi23T~jkLh4fiGM~lx;BAVfJUc;!0Y1X?L{y_(c4Vt*-7I@Ybe)ioUunC40B$ z$K4xeo?kNl{P@aO`$p`WJ@LwcHx?xPGW(r7|GM~6 z?D+)?KRt5p_^z}WrQfK}7$?116?lKhx-+xVK7TGvwLkiaiV0Fu|4ht7fx_>$ma^1dlT-l~O6OQU$ zToiIVrEj~Kp=Hl~w0&;z$2S8`-?~4yXOrcdhA%hx6{IaKC=1(HDLywZ%%H0pjYj-} z33#^gdrnjH`5Y#6(iz@}h$@`&w)?{1{K&B{eXxD>z2cC$_cYs>@Y|cm>^g>hynJ6} zPI){Np1l)zOP&79=vpG8%tM9-RQhSYy8ijS-R&AwOo)!`|JLm`+fEuMP1+K5KmPQb z1!pD{6c(6sCX5}vrNh}>(M2zXc$sJHD@q%%y!5qwBdfa_0}b8F16sP6azDc(j1%b_ z(<{e)#Do~kSvoDPE;R07!jhR;_l^ht-u<=C&3^qulF#Zua{A!4+^3wrjeDZSz<|{+ z=r??RWa#bE=+xA4qla|~WcheBHmpmx&WnbYy92um&Q*o@e3HfZuhMTt)7eivGovPyqNt&?BhiG#rQ_NdH<|*{uU#q` zH~vz2R`0{dqN6@cm<`{^%lvv*lB4gmh?pK-&lDBr&U>rJ+PVFG3g>*3bMMRD9yve8 z?R_Kt+7gF#TEX-&?)Ln4El`CHbo{h~IzQ*s7GK|KGhPacj*Yyv@r{lvR&PHt;8K)f zc8j)OzZf?ydTaHW30YnNUCvA$RTT5)`uOHs`~KxfK+y{OsFbINbzXdSHQFYS6+EJi z76t7p7=56k@qpeRMuUw_i(X|*hcU)G``(>G4n*vks%~|kGblMxu&#d_2 zc2VDu&%0+{J?as^OFlgWR1PuXcGq9A%~_Ww>uJH zFpP_yKct{x!{ZZ&fAYnV6_<8bS6s~v+dXj4p3HVXMTg(pTz>TFza)?PrE=f?1?LZB z-YlGuwyE>@7djsQAg;~qz01-}>i1TixwmIon+tiWo`_#FJloY@RaCHz{jJb=SMm zZytMd>yS;c?m99`T87UQJ(CHpcJCMN@{%s2uImsC!|nw+=gpY?v@| z((2}bRZAZ5zMYuhJZ*qD2G^QK!>0edgq?AYnW zL7y*Od+orQ>r1a~+_-Sc%-egbKkj}nVE%@$J8Yj(a$`{X>Eg0BIhT`v7_|N5R-w_h zRnhwcR$c#Q(u_u{pUnUM(zKRiuLN#8vpY*-!AsNKYZcnVdL#S@c0lm{rEG4h;?{6IA-ZF zZRd3*tN*D3JI~+eJjvg0OriHO^sb|k@PZHtaL81=DDMcU$TXyru_f_T0w`Mk0Yyh4 z2%nCEkI+l-7W$E3>Ag}XBn5>}aIo+!5-x(Xq6vpx;B^Y}+i*AxsW4U1)|!4(@r+D^ zSFQ?g{^FJ7Br1G(n%+)*Hg`II;Yz&gv7Hq>*5ZKo?(*>u7xor>dinI?%eeRHXjy3+ zFPF0wQrUzH$hNbVVa&F-rumCo6y~I`m-WQk=$g7HI@Q!g@vLoK>=YIm3Lm=~*$~D5 zUdEp4BOMh9y#>Yd_gS@ck?*Ay^c_ey$G=hz_Ta!CmU8?nwQU^M@5XEj*A&ll9zno6 zKjQe~&H2^vx0Q*o2IRz~#7zf3+1gon6)1|g;T(xVM>H>QSuCiZh-(fp;cq8$`nRV? z(m8E(9uYH@UYa{lh3I^GoNA_gou5a?MaSEo$0Q}FYMn>KkbDgAays~$p<^5?fbmWo(uFz7MIA(gRl8`{iz!6>V&tU?J~C80{3<2FR5v|uA#Qmxg!i;`)^SEpjsK0^Fgt1)XuMcPO?ZQ0y5UR zPr#7?Yp#?INq#%V0{W@Rz|{tHH3%U#KGs4zHasSUhfri#{u&Y4C@e0Y0KnjMtk;eR zYq^GFvj;AZOrEApe1L|RG&(*RFeD4)ab#i~5A81}&WeMS$Kj6X8Vxyu75WHdC7oOT ztWe1Z@(G7!MPl06itt$0{2E(3rHo9BR3^%3D=N`x#)COcBDk%FV0r$S_ypxRn57ne z>k-!>hgzjUtTJiZsCa-dfh>E0hP|5hatAmI|9>GohF`}e?h<5{(72ako|39XXzdklGIpR?|$*Mhc7!w&eiDE|K z-#aA9uF5-o5a7Hv=dLRHe-I(b%G&;EF$X!AEAZ$93yin8Jk_LOq%tl(7XRPGnr%lI zW|znm$wzB>`=6E8fGZaSn56~&#;fo`ob{YLJAvusD)A06CNWMWqb6N!qsxP7OT7Gh z`4&fdh^8h^G>MCkdqJg|9;f6$WcsH$|A(dX7+%ZT^--N1l%s2{(YvO#ILg+VUlS7R zqdK>m@b^ZI|Fo!18i&m4*s+%T3!~zaJK_Ql1>+)8!wJX#WF9;_~OJ}gcZU%NzGP&lXHP;8k853Zzt1QkTQHdkm&dh8u1Jsqh3 z{Lfk7T{f51Z}m2)_ksU>AHeO{|6Kg3uaV$T-}nCW`(Aw;)wdD(Kz$7U-;CJx{ky(@ z*ZaVKhY!@p;QAO`-&g-T`f7bU{cpBYeGIOT!S#Lnf3t7bx9fjLyVl3x|IrvM%oX0P z-|B5p?*sqwK2RTn>tk?ztgaug>V4q;QAO`-~ayq^}l-C*V`U3*rnFz-;GqO zDa{S#{wqtXExG3G@1@+ZYBA~I!jICKW#0^Wjcq=b{6`)CUK#(QYewNiwvHJElkfps z%}jz>_$yn*%mS9}VPA4k`Fm_7VatWu$9Gvaki!4H+i$4TV(9<4;~iXIgzH#+Rxn{( zi1aB083oLl_B;ujV_vG|Qvs9-;1nQhB)y>OqOuM;Y39oGs* ze!fPis&!l~RP*yyurkT99KRII{Cp+W0=NzyfvprMeFJjMY!xl+&2FNsYPLrB1Ugi) zwZc5%9y79aI99VNcyKk+^RYL=tE<_1q)n_6o?gwg!l&3*3f0J=w29q+WV#Bx63qgX zTP3G6QLZJuh_6*(;tLi~FCy6sAg@ABXCjBvCM+^;VEMvg@ZQIH6}u-~#`$N^nRGIu zq)Y6qutX^1y|EG!FY@!dD2w<7p^%-ydf<1k%mUR%5YDmFp#PmOyYPdYHo-0@{Q$onhZ|da9|E{+%BeK$o-Z1Z?#8kDtO0`Ap<=bhMm5>R7;z^Xs-pl3&P^wUPo89KeCBiN1@d7&n``=`ATq@jP7ujLqbD@MEHNtg% z{6e_Kir67xxp0*qR|voIW0vqUD`p4b!|5bW;U|7vBNVes>;M)9xxjv6`-Kf? zRXVN~eq@)i1U%8xaT&bl3fsra{h93*NdI40F8BFg*&g8|_~%u&TX-MsW?;MUqztRk zvTtxSf^r9r_uy&Uar_M}xQ%|yTQfQ}z#<%dh3AB?gpDXz2jw;idf^FtY)2V4p@Yy) z=!SI*o)Nm@^AtAQ>yJ*mVTpBrNZTT;6~0E8$Uzw`@Uf+K6M6_;ge-iPV*5;3f$rT# z=va%!mR?G`q5ST`i^3pbAYalY2qn3oCJn5kZewezW^`>RGz3K>p(*|oKyz%(@M((w zQ{jn?QZ0qn*tdn`zL4xMyo6uJzKs1aVJP;4@bMJ};5W2`vCPaMY=JzlKk}YO`g#1O zb^y2n@bSa>Kz#f;#q-z?5c*)*ncm3phg3gYdmec`aOFjOd~xL&v_dCXwlyr>60?Lx zLIWfFP_a&7WF}@(e8kpcZ$boQiVU^}d!(?Zv70FvvttScjo(Zm;8a0FxB^FON`M?e zf!Lv_WOm5jjZ_(HaAHWKsLNacuHR&eo=eS4v9zZdSNCIkkn1bvlHWR~{Nf8Mn4$vo zPKqw&th|FF*M_!voA<>{iX%DHc41 zGxps8_qL?B^*ZOSX3k*Fad!0nwwfu%tuQn9i%OD5-;JJuHyCr}M=tF?G?}u4?HC8E zxGN+!ncKt~)rgifyHZ=*x6V|qOO>^aU0l8(nzW6+tMh%gJja=(E@q39NZVLCW8HO? zS+4mlfvjrSorMvkDjm5fQdN_}QkF=navsL`fmF51Wn8dD zRina_JqbT}O4jqqQdZiY^t=JDD5cCJL)oz0YUY3(hIVdJMG9E2a^7kb&DhY8+=?ou za5mK_ScYtLtmPHs!}sRHfPkz@&)0wb=>BxsnOB%#GQy59Z?`>maN%*qbUc5ZE~{p zwu%$ovMhSW-kl#$dh#QLaXsg|&Xujnx#0E0T%#y;O)lEjn#~og^fhv$`6YF~^LBL3sbZer^lA9i5)#S33*0HLxG4A$vdC?! z$g;;3-^v5vVENqXfZ{upyEw!#T-6CD( zcSE46>k)JBs>O6CWo=b*#_rUN=&mr+3zyf~TqdWIuPNUze|t#HHD|@C?n9{`n8Dxp zqF2jpFv_~-h@ow-v%Bs!gorlfJEFP4(91&RAL;_a_zG%4#lAkabeC8~2boUM{Duk9 zgJOx9*`05@&z25zQdbL|qp8NMiWgR_wd(GQHmG>YLe}z@4Vi024Ovr#U-{+~B6GgZ zSm@GkNjqxDl~zej6{os|+$E9;4H>)W)q00aLS$=Xvbx&;-%WQ0?Ymjl={|GNr)Fg6 z%b;f|6T07F)Ygh}oKnoAV>z?SaZWYCiE)8{?;`hWY&0}G=`(zN1wl`g5TLLTK&R!1 z+c_kOM_N|HX=L{L48a%o0DAmm3iOEv(y+?Cg#3j%Afkyp+VX<=$XUgj;$&_T*M$$r zw}Kk2fB*+RaGOz5jiw%;lgD;WWnvy&h&;;6ja13nNzTb7Ak#XsOUzgio_7U1C~Ow& zP+du7H)(8@{Z$$fNM$LTtIS7GuJZf|lKJ?ktXy(eNpXOW-V}1ID$n--ojkyEDyYnb zFeVX8t_PK+Vl9~u48sX1vR-4i#(F?T9i`B5s(kN@&amlVy zE?1b*Kw5>7a8mnUC58E5?Py|Eq%a@GZ55u>-X3%qP@ORrbE<0QPBJJ?@By0l=t`!b zLY-~%Fpofyd@Q!;E9gyvy#{_S`GK=E)LH@v#uau8o0Kc5iviV0$6!WUR`|d#9k6{FQoV73(4m zw^9V7SmvBl@fKuB*+}4v5tS=y>UoO$0XJ*(CwHSsQ9hj4Qq<%DI(fwBR8SQnpsGYG z6;a9Dr9$OQZfi52FmqnXu5^b_aR`b^1FaNCDWc{$H`PEnDO*w$gDF>(?H*dA=$&D$ zSCXRASdNsnUoj8R$-_OTf}(spc9+L}sR*#ROT}8I1Cm*30>QZ@Rrk=?`yIPQ2RyQh z`i|QhxlOn5+@@QQ`?i$(kB9Rj1n47N;#KSmuu=OJ;(?JAmCJZU##wion%u@FO%g2B z$2jF}3cWNqKS#D*t7==>wT9R-I9MYdtVaBj zatQf+QpK4it4YGiYQ)Ot4!lt<@@>__RSIcDsAyk>se>FKCC%hO=hoo{yUcCIUP}v? zDJ^PA!3|Rf;*@l<%-}eiq?07pqEll@7y`0IvaL?=KRJ3qD+iv0$>e}2DJF+CxA?ht zqwIN%T%pLRA-3pdy~TjZh+k6AGIQk2RjeVDk%VI|DVYLyfN~t>G?>aGa#K&{c9bI) zDaVsgP7Z>Sa&jnhyY)izg^jp!hKA)e#J0+Deke!$l5&>Xh$XQm(j~Dq~(tIm(h-m5@P<)o%kyFL;QM&$*M?>jG;>D%5!7e$*ogP!yKkq_W)XJH%w^*z@+1?Fz+gpbc3RCE z%dt<2zPO;U6lY|$=a-etfluzFmawE7%fU&SBG%@&O!mxDiG0!}bIa+*atx88S8eXv zlQ8L~md}G^5jJT#JUBY@k+-G-HuECM2=oAo&rf6-wrP~!z6$x{*nOiml) zvj$A-Y04s}$+6wQDRo|35j2aC8kU-YZdZrh0x!)XI_Y`M$IxDRAHJ7^*ZD`=<`Iq8nbNXkm?(%$ymqcGY1U>sEv3s?4a^hX)@L$&pr=X zm3VNBa?~2NmVL_1dIe=wGy4pUI)ifT^%_w{@6m*8vqs7gHK~+guhDBbiKANO*KM#0 zFNhceKk^nZp<9)w;8G=LskAJUxpeXk4)*iwGq!SU)w+E487ZE}%z5@O8?U}1Pi68H2E!lpMiAZCHPYz#CtIh(SEJLNWlNZ# z!MtA`rh=|&7}CTV=rx0VyLozIdWJ$=)jBoNYBV~N#)0#jHFi3+x>_e>pG7?zh^mZs zp50Pm*9<(CWG))L3eD#0*~z4{1G7ozf|B@GV*-y+SFILwXP6rQMFLZMm8XlRr?00P zmQrJGhca7eRM||Y3G)m?nP7wrQcYumFPYR#$53rYs)tT<8v5JkF_vofbav_Hnff!_ ztD1Q*y&eY50Gm!1>;iIo$WZ^TGpfNyjKt@VtrzqBOrDONG@@RkLNCxeWoz>Eu!C7` z*0t-Ds?qD<3L=_IugliJWY}a2nsoM1ESuyowOe+cKDC>tZw6TPsi=a+Lo5{ad3ky? zsz#?zRZ&}+bS+RamqW(n9}Q$?Yfho<7`lop=%F_?1m-Gw=5_y0o~m1DDz}XeR>;;H5r)3=}Ydr-Bq#+PHjc<*q676`%@6QvyVS5Svr0h2+GXbzDoV0Vo^CFl8KMSHiFg&N zMW;Ndg0ES0)RT>MW{m@?q}LO_gGLpm(%|M)t?!v9rovO&snCto83se1^vN@zBBiJc zeG2)Wn?}d^F#xFW#z&v3W_tHLb*LZOlza(HW>F|C6C22-6Qfx?Nk!^WWOfw=k?ho# zDp(R6+4!hnb}^3(hfh_WLNA*1f>^D0;29FDTBX7RX^75nOhr4W)#xg!4ETD(0Fn49JgHpu>eP&EQPhcIJ25XiBiL7MFyM8pUZu*$ zeFp!QGD9h=HYoB8<~%1726KLoXb5}5U(G5<9qMO5Z10qpp$b;xxeqg_Gs0APki&%; z7%t0cbE(N7|{WZ=_!{KgHozRECfV!IDW+Jh|RH}?@6s3m& zM3~v&nHs86=arKEC~Of2{DNGZ+J@@O#G_Qx43r3ysL+?hycW1DqSTD+ylhBRQ+z^J zo(W#&jNl77=vT}RZgHHLHKCw_t<)m?xCM29Y?ZG@ZOA73fsu-V3pc_ zUG-=Xb*e8)He)#T6ji<%DiPgMlT99u2E{DF;0}GMRPd2k9z$33Ft9vyevLX(4b;$3*(%bS zR7C$ll4=iblE-B3(mbv+v{mcidt%4JyzDRxIO+^vj5;Dk6S6WA7-Arw8p;lR;}~Xa z4M|H;hY1`S*~~mkSs}_)>oS5-I@l;^G0{Vsv~bHqm(uSrPO(xCm;`ESG$QQ`%n>q~ zL2uTy#h?%M)zn|9%H&g=7iv)W&m;cEWDAz<3;T#F7%rQ&AYVs_M#x8a_C?Ln^;jvQ zBSsUE<+-5Zr7)ra{EML~H3FIkgt`phV6{5iEP4_vO+YeKzUmBaE0gGinE*AkNwkAD zM=<8w<&h2CM6?cUmIu$&Xj-9I^aadhVLG%LSq?oCZer3kAa>}B@(o96=0lBXHn@qH zWs~M;r&NuAP-U-z7npPo8NrxJRf`NWF0;;=J2+a9Seud#{yqeJ1N z2CFj~4W`#+SLp1Zca?Yq^EFfq5niVQr>}3JnnF&7$`LFGCsjHJHB5j>7RG-lnU{Bj zEoIH&aAfK{q&9)WB$F9iz5JO)-#Y)KzFc5%o0lF#IiU z&KhucruNY3%0!1SU(86&qLVZqMaqRn0^ZT8H88p8$cJ6Sw}8}`MSIv6TEoo9y)Qc8 zbzL5cGotaFX}$@M5%1}Y;aM^~)`Rr;vtK;^tq1ABC2+%qjZkm(AU%Kx>Op$-AiX++CjZ&@ zlMnJg>U|}>c>Gf!Jv%%*G5h`*ke&lLHJn$1I{g=*^z3nmqpJ3m^!=}Z=$U;Po;mw+ zmH)GWdU%}T>!4w{9hA)bpAOV>(Zd&@uVhQK+(gtP_3Dv&c&bW|86KS3{?YlPX1;%j)T^1{{vlG&c1ruF zp?Wrx%s+$Evz_t%IkaBwnb@B~>)B3@{w!RtX4>-S;d;LHaJ_#eTo3OdAA;*0!)wuh z9{|K$8CA6NXAx6j`gp~!Y zrv+M1>qzy`ihqdK(`pH=r?rO+_3v6j>rq{_e~i}CI(14F^;!b0G|5IHTZGB5$rdze z?KRrEp!HxjLhEUP*3-6t%3KZ^lYd0W%oZPm)~j;1p!Lj}PG|$Q2v`Tb@W<!$9_G>OwH&MmM6T*F zXuTr5CM2|;R6OT@1X`~(z#bN~9zYZzBg^5FS7fS<*DI2teuN3Ah1WA_6dbMxcn2f6 zo~+^na6M{Qja`uqT(1CF1#AV_@q?j2G!zjK0rf7RYCizi!(|Ix4{v$(MXU&LJ+cuu z5NuO`gh)~du19Z74MnzaJx5#=3FPynRs*~qwF&t@w@d-{s5x8)=P++Ayq*Uc84zWT z*V7VSuLyWOm5kTJTkryg8d$0Uyk3#PT;#<4?*Y7?)&L!>cs*Wk!s`_g`i4Vrpq(Xc zE&yJys5V{?bt_;_1rlBli$4$~i^KIGmTG6BdP5TfVEts%2hn=SYYD?>0L!9w2C`h0 zO*N;l84lylT?_^-Ksm6a1QwLQdg$gLYg8bC^@<3rM^=%*dIbd5gAmvb-b%$bAe%{G zy@DFB9?VpP3k23f?JZ!v0-!Nbo}mcUeE_QmUXIm6dBExcBu$1QTI>K>Bdi|)QJ@kE zYOs2QPZUAG8leyZpXm)n9IIDU%{w6)7|??v67o2tUXh_AO!_cVkB1^e0uf=-R0NC- z695LVBK3gCkdb=87D-4wlvxX@M@_|j4||S#0~VtOst2VXg6b8aBnheq4pbHOh5*S@ zGE@)nHZXFaUQq!(GM0dP;50OZZxi^8SNAZLD8uwnEE>KA99{(WE+e~$!}KUJQJ)}~ zo|Bf4R3f~|4kovt^r%sR(t~MRkd47*Md^`uBOfR|2!*K#rAOt~Lg|5-qx2dPN>3wd z!JkcjZNRS-4Ddi20MM)9&{m9I5rDx~j2_nZD3B3)D7gp*X^t|f+fa{|$|Ez%7`q}X zLQhi&cQJGTaEpLiRIUa!5PE>+afBX|5PAUH`l9A!u>uQ1uZR$O1;{dh9|*ky zz)yoEX8KI|bhN&am z1N$0;9_AN-unHE4p0-+Sz-nRiFi|su#sL9Q1F)P)Yk}x#5#S|=o*SBws))dVcHs~` z_z;Kaac&^%fXbo}Xw+8L!1J0CEDG7AA^H<K)o+ewZ)l_K}WC0G(qgoR@4{d__ za+IRT?!d4QV)OvDgslM4BeP4jlrVa()H)=F%65hdGD^>^ag{)N6w3h8BgLUNf%E{q zLw(6wC>9ttdu!bE4?V*mr}rfiC9_yTcv2H5EZ+T!mZlser}_;ilPEvqj*zP zbeRb!o7n{ptJsh2L9VYvmkrJ49n9&SCMqgG@1$sdP(0X5k!wTSL?Ip+>^|rKNrl{f z0d9f&?u#CZcN#Zd@L6-md16PsnA5RZY^O+Uhchv|XM^VNf!KPTb61PbV4mmb&~-U_ z*N`;aDdddedV=&rcb`2>bmd1b?LIVlWs$gOhyrv9iB0AzrHC)^X;skK04rX1l7y z24qrvU(HJ%NvhJ3iy~ELO%bQ0N~&@mQRD|w)hbuyf-R~7wkNhZCLU`i>)B?XxUVJY zxko&v*hiUJ{YC$!7&wt5qMe%@rP8feIWGoLWcDAt^biohj>l@0{94@CjFhA!mqSW! z>MB074oW&II1A=m#90j;tx_eGEIN{V!L^*RwjK<{8{b(Jk2wMt4KcJ)@vU|>K1yzA z<|fL0b8tISRJty43yzXG_xLzASPgSF-w6c%K1wCk=YWuxN=on9u#w%)u@VEi=)N`B1FrY_KI2r*ttbh&I%B=0#W}+ zS~F<*GP&p%oh)kZ5OZ5G(M3T=5>!E24jSoi5kOoLZ;g@;kl*s?B}ldOJM^V7>yFIo zDVuZjI|mbkYwMWlIIBiS_tkkLYji|`oLRDFrw@7VwkGF-*AsJ%qSQ6HXj^MGSBU!tHF#!|tZVM`4g7PFmb4=)l1cLvTWi#v z*Rf?{Ep<7+q;7Us2gi9;qUUGNy0l9rk^Gz3V9){5mX0Kg+y=8ch4`gnxvVi~L{uUE z+8T4|lE$#{=-))elCHVD2{FBc@8WbLw>_@Dfvb%c)VkVefpqmfaV4j!>+y~#99=B) zNHLh4u@f~Tx+~1od+R!z%j8t@wNcX!zR|Dd8rIP1)SvnR7MBnk=X7q838Q?_7%{Z@ zF7ZHv8bU;ygNs7B!O+VFC#+}>!tsZw1r?t^YfFcpxwMk$6pi=bCnG$TU}CCk{<$sP z5%eAlox`yjvnqP0t+ndziZ(dZ&O+8C*M`jbPz_mAh1bFPQ;5uQmngnCb2({84Y|@P zsi|UJ$H51PWT=ZM=5%hhNG2h&H8NRU?f>tlJA?M!EbD~HytK9+^eh#HPIp9VYehLu zDdy3!T(q0#7=|atbb){GBKK=-G&EyvJuG;DXIwak0ELYJIxR=so=1{+q!nv8F()NX z+#_l9_i!DtT^d)pn~=j$4@5YThg)7UA3CeVrZ|b2%$4CIa&8~DGzf6uBR3XrvQgCo zbn@WNsZ62=7a|Yyaw}De?IiEy5|C*f+9l?jP=+F$D`|{h?g6e!Pd~lOla0^Ujwy@+qFd|!(#czn|4go(Mlnm@FjkmU4nCvU%a*g?r ziXYi2UT(QV(wGn14#&i!q_Hy%=(ZZa+|nL&7+Re%=5wlQ(VfP4iWo#|RhSBOw#~zg z0!8vs*+yYJC&Dd_Rbgq^wFDE4F=8$@DOXY$gDYG~A*Ke~=-V<^+(!EHQQcNwG1UQd zH0(QY8gwKGFpCW(N@}BAGB1_rY{`>6Q5v4FbLYhm#_;P;>TpczZe66YR|;no*c|5_ znh0T1wxlVBSFY)?F6+22aLb0q9|$E)`Pg1d(_lZSs!1zjNmx=OTC5x5VO3Y9at zf8g#LMRH!rwD)mSO^@{$1(qtYi!}5~k(FZXJjX_}z#(Nz+G2R++KNm1*JzvP-|QXI zRvO)rvi39419b8PfKx$RK0>?8GXbdxu((UbS|$jRaYtOT3DG0X8yCp=h~HD&uh)XPs!mavPg8b+Aw$ z_btrnZ*_HH(lo4x(l;@2HT3-Lp@ zE_j$h{K9)Mqh&fEa^`AG3!LQWPC?sQQh>T2I)_ERr4G&ce83VH6*KdsB-E2*t#r4; z118iP^JZQ!S8w7>aTe~C*1W#a0mvF zE2+f`mesO|wx~rhUb;uImjfG*UbwH4BdFBxCGf8xbm69>s)04waH-a>#RQwMX2_H4_I# z2FsKdwWKg-6zz#q(#bNf<7|>nl30sQjU{0S%@)bFI>Gc@${nI(X@VN@snLTUgUd8^R1%8$VQI6zCJ77kyFL;QM&$*N5g;YmgaHtA2k)e zD>}?`R5&jwLnOt9D9auAq&#D`o$@-(bD1a3b^C$>@gqoU&v6lV@$B@&czNoHr}LQP zN^{m~v9TQdr0`45X({iaStlMH^C_Ry7M65lIXp=d#|H$|o&w_6{8TcZipfIcbYtns zj69!vKuGPWnRL_3XGgLOo3tD#95L~#T@yY9k!MSiJ?Ie?pS8$RY|~(Fc@(~BE2P#u z#+~d>o5<%9nE2B~MoyELyMa~e$+j}Aa|FLcf2N+i6@oPI(!d4yyWZf$qzSeA9~^us3Jpt7|Pe-lOK}G>+p$K8Lws?K033k z!zZWtI(%}Pufz9<^jfTn2V-(xz7F3b(tI60IiJ?y6GcvLlcaU{q)b|PkJjN^{lGeW zcym*G9lq7H4xgBTIh)1~xCy=vAD;D!zu^RHA@Nrfd>y{kq8`YI49#l1smpNCgo)O5 z_?TrKK24~|*Wtr!JSOsW_-JuI(XtMoD6PY%u~Undb@(WY*5MN^>+oTX489KEYO^S> z!zW7X@ZohRR?_>FIjS`_>+n(D1MBbsd4~0G9$1GDO9g^bUWbq7{qj0|cymYeSceY} zxGn4OF?wBv)v#7$6o2H6MT5?;JY>+p#+>+of|sx#F@tI=cv*~j^T z?8^kQFH=};yAB`hDy_qZH{|jvTyz+=n=vM;kXvQOoSWw11sb@)Wh zYL+Rj!$*veVT8*LUDJ$b=Up=&-Z(tB?*~KZaMedbI+Wad2?QE9zK~a4tS$ zA;lltq&Jd_HK>*d&^}5LBIPkWT_QdK+9x)3rG=*AOyyiW$I0bfn2H1Vjotw5<1|S3 zXb>ioXrX-^GAsT8v=5c3d*tAQ35J=;!bmQO4DT#wq#+c>73bmOSROtZ<>8YFdH8@1 zKpsA7qL4F|Q)`@D%^?pTnI)io7?Bp*$8*RMR4NZ2a!tb0luEhqkSj3|1;#>;c=n&# z4U_2d@S%3eJbX;KQdClNqIis(FW}61CIE?nhnf>o>Y-y9W#i*yKK57`R8PjsnC>|_ zsgIX)l#P!=Ha?`)Gi0@?s$Lkf?*ZJ$v1EL(La6}mQyOqeC8tuFu#yl`3+^Km(dOdg zxSGhthm%_PNL)!$a7qp@1^%%&Y$@fOT3H5TSJ1#YT`oS31Nw^!ah#bF#zHv&DSwz+ zX-j%yDuQ+tH0jg|8Zp9uXi)(7!BUWm&j?@A#R_Fjm=lumkw<m|7J0k71)e?Ie>i zil-JhY5*y7IhKnL`a#vIoLq(!P*SB5AQD)DOu_T)so<3gzEG(rS0Wc5wFN^Ka`BPL z!U7~1A3*|;i;we=Do{%aY#(%umZ&i$!BR+Wlu|2HN+B1Y5zGme3d12a@x}@s)nVv7 zuzhqz1EtX{4Nj#rqBayt1PxS{Kz2yr6ab7g2X9Xr)Z>(D&Uh%BV~Aubqk+>CnfN$M zW@FH&0{uXdT4W*oEhT7@U^sF!g%azAqf~~-#D|52@DMU9Fm2Qd4O!0m74gs^%Lt_a z+JrBsB$=Tm93{8_5|UTsEA@CKPO}ui2%$fvE)O4vJbWkw{DBB{kxCHVAr!$LxKSty z!ywC13)S_p17~>(LX}V^KF)^{h63G3lVXK#Flzx}O5|UH&C3hfI>Zb^opNdm*U(Ar zm=?g^d@!3*FOHW%2g({yY8cjMm{N(l@MCbEG8hcGSQ#?~tVIu;f@ah+ko27%kx-F*X_c0vZ+210~RXNJyt3^)au7@+zen88=M~4Y!bI7`*`W zNBY1r;^cbd7HqIbCMR7<$vvTl9N>;HV;DU8g+=LOinRDX6oRIt9F%KET9)Aot5hi? z?V%oefm)ST7$a$lq(;wF8IVsQ2OFFK0De5>@iGK#kAqh zF_;}@1k0Y6dcfk*8167C0NDZ(&tWq}&wWE7)peC_e?}UJlVwP(n^iDub!uAdX`;hL6m2SZo*omX(AK z-LM%066Pl5O_swzFiy-6^oBfqkhvlx0JN4gNtqm(_Q=2_2p^CjnVO>hl`Ib*9T!M3 zWfAG19_Gr2XL4`0 zD~U+}?2m$#9Em>MS^>w>@NqWi0gD@!Ax0WLs62o(!VA8nKw>C`1`uPxU?HP64Ie27 zGEx;B*O-OC3XBnqF_51a{YcqDqk0;ph*MA^K8OaDBThjrsUy!zuvqZ5gfev-AU80% zRR~F&;(V+OeX4*0xtt#91O5dKG%^+Ixqvf3u0T5Z(biRQCQvD!5-wko z2mi*g%zNlEhcm?rf>m)mdH`3dqyT*xA*8|5gKs2ZA&)Uh0()hcKCY~wbnKuWjg=Bt z4-Flo)Dl4Ypf)23ju^bO0GlF&=wuIA1<{mpk6A8Nlt?~thF)Tr2##$MF?-{V%RHI5eyMN4o;eMj#Z~8;aHMA^Z;4W7)@RtXQGsdy>K2V(MYTzEzr#xs8Fbi zK~XPxA|=80P)V5q zo%z7G^LlcPN^XGY0oGzlO2M5lG7cOo6%4CKDj{8qNJNYRUfm0rS_>!~3x(Vx1}Dzf zo)@V&!s>nDM2Z~F0L}oJ2600WOB+pdB(AamK17>LPncyGZXtBSQqUur9;^W)gRm6I za2(~*`^;oeZSa-0CW%VRTB$Y~*WXg{CRLhiV8^qbg!lJx!Gw*E&nutKv2`4Ino{i}n2 zZQy_12L7WDF3w|0RNT%0`Gx_k9D*0of}aQJwIlWyKdb@WtpV7s6CRE5Agb@;Z~th^ z8i3_aq6pCifT7QU&ODp}qAQoGX$^pI1JNNo_TaS(4C^uwo!2f^=C|!zqyMHL0`CrR zvO9Zp`>KZZSD&d3fo$A{5sljcd@N9n6Ro#3qa3#b0eLyVksAP>+yz>318kXy#(zsT zPE_Lrh$gr*QHK-Rcn6ej&$c^aOCTF}W+gh|Q+qAhcn6elMjfIg?}W^yT`-1j07$on zPMt9B+K|gZM>hU@N727ycj=lPdb{;9kjYl1Cq)pV0*7f9?j>wPJgw3DsQHNhTam?A zqn8c-QjK09(rRl!0+o#;xdeH+i4dyfHYG;N#|tzyrKrmdwbbQ|@F?jw%;ldozpWUm zF%sCz^+8|$3KCL#(js>Aq7nkbd8rZt!?{pm3$6+QP{6$C_iSe& zrQ7}zZ3(WNoOUS&^zg5WklZC%&`W>+Crs$23;$;}^sme67(?+Bpx-c}e_d8b;7Mgm zk}HE1{cNf6{6}W=(nbG}9X+&Ei~o@!J*-60@0q**wYm>sOIJ#a?JuycBl|F0WiUs^ zwJsQTNlMB;;9J)>IfZ-SLika-aw(EZ;F110%60s%Qe&?bm~pfJGo0(fn7`)5EYN&+ zQdd)fH60R{kedkF{~6+So!mM;&hN_UYFZPNF(6+rDJx@X*D?@)AN#sa)Y9aiNR%oN z`<8SPe~E$Jl(B^hQWH-nJsDN|KS9B+6S@T5D4FwjCU-Rzh}4;)iIkT;iLd=TdDsPM zaeOFZHYH)dmy6w0pi*bj7A-v@ZPx}W-$%wS$V^nKbW-yDXE4daWAVk zE&F846`zSm*pRga5gAkacd)n@iwGt(J%PR*8-It%y)0^}kdvJ(+mJcrd~iu%!Te1o zcb#Z}NB)Cs?l>vb(!oP}%(0Vzx?u1xvbmQOQG51A(*8|GcM=U%^EHMnGdIcgHyPba z%Jt8&x|4hYEj(1mnA=Ijzs2hQm4I5$2i1KSvpW+|OYLsR*xO0Kzsu|{$SAP8ztp_? zirroKR>$!EQuF3_7~X|4|D0F-XHM$AMV>zj*8d>)Y(j~+zGPVb2l;197B3Zu|HTxv zrQ7*?jPa%0&_$_#B@b=s7D@+?e<2rb>1IlVbAK%zZOLXz##w(cC2h%ODD?RoX=$Gq z8HI*j8`j|XU-H^;>Fwfc$tABbm%R2|@|tvd5uf}AcD;Hpu;>`A=mYLKmfYTheYj}B z_V30!@ySz}lG_~i;rcY&zYFigCr@QcZiBau@yXMEsgR)dtIZvZPo8#y3>)=v>=PK} zcW8G2GY$-xmQ#Kw5_?fEV8+$5%BvWsJcqlcYB0?M%5;R%)T-DW{oUBB(b((@w5<-XZ<0<&+P?9>yvENnn(x&x}zX zld@mU2_L~HpDnP-(`PN4JX#885(Ahcm45jv4DvTIKm%fsH`Y?f=X@i9d@Q3T zM1DIWkT=mW$RiF3v-@`bcm;(2nm-jmvJeYC-Dg@l>FA~TXby*0OX`*IDF0jACAAg;ZfD*&~ z-z1P{4G@7mNOlDRc{N|c7Are~qdGbzX;zR7)WLSNP+F z`qVv!K);;P(%T{bFJg}eNAzz~(*7QKJXI|skI(;R>Ug1A<>Gv_IJ5puI@;f5 zj;ER>nd9w{1u`Y&8;IjCp<*pSyihyStR!o^>YGX9uVBPwHN~v) z@L=D@8Go4qs!ZfsE?0^)o@MXEk0Ab(GoI=jkgKd!iZmYff!~XL184kYI>HiFvfTWy zlg3BkI4_XKiYl47$1or!4~pnY#u0| zC$e~!K^xyj86SbOuacDUp#T1M()b7YX%-W+K~RaBqR#^-!Z8Xti(M*JQc z?BYZkZ(2keU$z8me8C@c#-9h=3e~lo@!&WoV>QDIy$Yo9>ObX-Kc@-$Jbo<~pPkgj=+G5@z=o5c*b3<$|EK$@XDZ`9FfOj7YWl`{t-3A;%) zjpm#Q$D}1RW|6cEj|pl2|G+j|{tMd_>3!RA=3m%maa5O#)%P!KvpTI>hcwM|co%~0 z8WzwhhIiEhJ>h=fi&z2dFR8uaGcp4JR_PQCaCbU6GZq{(_L!h8BbBBA?V2;>CCX_E zs^rxxE=;XxTlyEasWH~NRzY=ISiAYGHQC+g^ zv}bJp!Zz6tuSaf<5y4v72f! zaF+jvp_?J?KZa1oVH!xtH$XQ-kaC#FkdgPX93aCX z`+4XKFRl7iAqHHCbpJO%H=#93ISiUvRfrvwz#1Z5vIpjY-_QR(bhAuYfeyN<<{U8v zQXX(qg7^V+iVfPN$9@_THK-2xJ?N%oDd;9v6mLpI)Qrs?KmuwGH`_5z;EVAQtj{Ho zo7$Yie~jEjK5R2a%?%adou$V%B#brxt;o#;VoOGLTt;LLn?$xhC?zcHPmr4lVARF~ zRLS6HC$4Bbz;{n=k!C`K`eEE3AUBCwIvxy_Lhr1)nlFXibodIn33LsLk>c=>C#aBa zm`A!{9_faOty)|8H`q-f-*5^DVR7F&#e~&{goR!tRQzI3RVrWue6@qQXPJ=L%m3ua(Ys1n_zDCMkrRV{E6s~qJ(5>3EOP;STL z9Xx9q12n0`tWhJ-9g1j$79&|CWxzxdSuJuCT1r5l0VJbFnV$lD8cy5rwGq05rT+%F z3087@sz40iNZKkTfFc?b=Qp^`1at%HYxtT3tQUl= zFfK4Om&9!X$De{U!(wTI66U}$PleK|6f+n#EF4tpXqz%G>L8m)^~;PNKm8!cW&){5 zO8$t}0#X2n8G|evUBZg=p=%vt6WJ)mVku0B9zbj&Wort6-{SqKM$*GxtuQ#~2tJ(k zD%8~?Hc>Y$Ut@*qt^r^_NA3M&%PAy2%#M6MmNKk39u(0GuW6nDggz(r5QD%$16jMI2|g$t23e)xdP5JgKH{Fz%@xsG)NBy*Cf(-WQE7_!ye|R zaD=24mq2blp%h#b`r*YM0BMpsGy+@`i?$^OP6|^Jn>HN`6HGB~C3dBtKH!=}lAU0V zxk1U0fR@ND46b<_{6qx72@M@Ci0KNeD1_zO4OTaknCIL;coY?%403iTth8Tf_B!H|)L&^v3 zy)m9xX z7a)buBOtXf4&KV!t$mD+tk};hRuZ>V=S+ut5wKw9jOHxdhh? z@e$((L&b1Sz;2-_WSA$lqYxIP0N11$rdre(sGcE%7O$!1$_RK(I)ecT6b&AN6JC=+ zE71nSMIzA+bfH6SQei3%&p~KeQCKl>6Ub`_s3Z(+ND*=~B$qGC`X}E7kISH&P!EAJ zsk{=9Of@u)#1R5=Sk3F8n~)r3*pS&G1UMA((cqvN9d;A?gmz4+Ii|1zoMo!`VgRQV zQzEI7+#~9;iPd2^!5vABv2MtYc^!(=RA>!f6yZ2A`vQnl^?wt>8Htph=aF#p93It> z)Usp}&F@LN*$ZhgdjY^nubzNnmTtG?Ct>^VC*9ORIGq8|Y@&s5Qqs-NfMK>nip|ap z!r2brwqX#?b_~Etdnqj^{cjK0W($1ljQ{OKEdlZ*&}S`_qlBDI@J%fw60L$q1-xuU zmKcrce+9zH@8OG*Zt}Z8`=w2~$?wFrHt8lv0g94t@;itVPWWN9cAM^ZVoiX&k@#>y z%cvK{c;gIZZOsRT<4l?O#gcfvI=--Z-#YLide`t0z)YnphVn)~RoEDPs+Imy9yFiE zdJfTibVa?(Ulj*cu8z->$jcbJaV~FJOmAExj6YSQkguvG_Y{~uOVA&)+5*+vMkB*| zd$I1_KpQVQRdE1gLxaF;Em~aCzOmMb-M;r$eybbU)4*cLsu5ivYJ;(*xNAW&A`UD$ zKuD~mK4yf(jOdOeE+RK(Ovog$!1t-+=PdeOOY}*+i$=b;);mDr3KxkS#E!I!XJ7gJ z{@ORz7RkGK3_r$4ke5}`)+Kq18W!X#DKC<4>X?t2u#7~Hge@XBW<Q&X@u)vx0HBSklw{)e4Z5-dIB<>4|!L{iBc+)bvyb5h1<(4tZ!v zLCNF<7Ep6y0VOq<5Y;iUwv(0Nz=mDKflQ_e26lYXQFsd93$;Z?f+<{TVN_NI#oAs_ z@fC^Rojq>~D)GV_jzijxwM>B`qp#(~7eosRCQdZZNCAtb z#o&2xAmdP?6;{XXDG1A|62&bJP_auZK+v9Kv%Bpbb)rV_mn%YO_J)RXNYbwT+moc! zB-Ik?77Hqnj1pVrSLUiC3Z=Fg^I&N?!GByVrrf0u`w3MgDr((uKiB9@awWV(qNQj-0OyVS1~KF?vu8=zAhW9&m^XF(eipanp+~}6ezz@PNWxFs>SkpI>K3^-V~U&SurXa zR-)+l%-#Q5UE-a+QetemI92okX&#Zt;&)e$Swb*Cyt3qy>HRaWztPA`#auP5GMFO{ z4LWyJl9iSusYY~9o@&kptl ze0hABK3Z7!RnY_E2Zv8!u?B!8=+d5*ry?k*jYn896>rH}(MBfBIw>@&Dy#$61a>aB zw%)Sc7HtcaiEmx!gTcQ7A|5d><}^9jUBH_Q0fBaH2=1H&7j`p2*ioMeKHHrJ0^b@9 z7Fxy}4tjVNa?tJ)f>S|lSi*`yaMlXX3#Ekv2Lu=T)$RN$b|@t{uBw4a2iIDe;Fy2J z2G*B~ogvMWIrcG;+2Nl=o?kmw5Sc}6uJkfH#`@SgS&g4it5U~Jh|;^<~iDoDYKp_Z*&A1&abgHV); zTqZ?RmnOP>f@KOpMQV{jmm)VNbFL#q41)6{H)^yoW+WOEb_@L@C}85=s&kZy!*tB( z$ssO_NCa_sDD0HWSKhzT(X(28) zH!W-XBO*5P+=A;azMo;w5Myjq-gAX{?Nxuw<{Z?%CZewWuSG-&a+6e8&;BMt7OmG6q|-W2^NN@F zaHc!H>m(0t$&#X>Dt-vhs*+r~c$8HWD9t^mUmv8;-2PHMqK(%UE-9a|52|AgkchfCm{l&|%^;A_IB#@OPzN1K1lP{W z6rX0&DrY*?dOv(HWSf{En==6~m_`>DE+rsq00OcGNI+c#&MFH6 z3XSvbrhF4{k3#rt=+#KiWCucdM+)b`4@?G_P$Jqd8LS&`G~LLrG2cxG&p#+$Iy{G; z$My5Iv$R1o?$RJW7s73D$7&s|;Of8b7suSv@iOiruvk@?W8Jp3))flQ_;(s99lPT8 z5lO&8NNq#fZELOL65`O`X{dBaDO_A)L7ldp65HD7&WHt!rL>7rAxBM7kSFK|0lje5 zNZS&NyR_R7#Qr95N?!|9D*CdZd7+nZQKyhMrSOXdLqap=s4jSouiGgKh(0k>p!uRp z1MM%P5ekU3+q5LDP*+&l)Ciu>i_AoWs|G4f5Uw2;CFuN}Ys!r5NqgOyCFs;%k7fxv zwb!Xxf==!AYi)u~9!V~X6LiuiqyXBB)Rzb$*fvYhsoiEtIe%xHCFs=dXGuAKXPYJH z)b6JQojlK)FR@7pI)$CZ2|9^wHLO&EPDF!9L@44)BoZ=3l2Ry7D2XNLplL3N@&u4go1l|-ZP~!arU4`h>Z&BBjDVGDs!$~#JjWu*S13=GAdkZ&B0(ouVKov$c`_PfbY2SO z37T6X<3(!{@DP8Uppy$=2|7VC3ua~%A(SU5h#~Dq386e`AQFc1locoF1a^lNCChz%4;IT;aRg8>{>@x~sYH3ng^OpEfA$-{gaumqjB)9RzvSmVxq zJmy&*MkXyGlqZz0lGved))48EJuna88ZSn9@+MM{QbPo(TGKS_15ln^gP}ekspc>R zU;zgEI_|TBs+!TT3ta3Z7i&;05m26V6WCbFV}M+MT2qAb6q~vVOUjhU$cbM&3@q2w z94%8oD?sLJ5C-ON0p$sUzi!AXorgMj*noLhQc^d8)HGR z{G6OfieEO#ke^egvN1Qc2>@y&0OP=;kTXWoUV4H#81&h&NuWG2A}z|3=k#F(d79$< zoJc?mGXtTz@Q{OmS+2lX=n>EUQ@df3B9td;m&nh_bSp(Aum#6s+3_R4} zO=j3dbS$GRogDb!0U^Si$cSqky65DiKBUtu0MZk@_E>vihOD+0cd4cvogC%pgcV8! zoTt)&2+LJU6IKw-XmOqZsWAQ2WiyKuoj3*t(359;=ESkhIGgbaPdSLA%V6jV8aG#j z^W=b-(y~ayRDl0t*#*@~ThbC!5OkxUDW^uzh7tZlhXT$MPKQ!-HXzb+V4ajOCXWC% zEyM^<4+UNrH0t9M)C(qO(8J@QOVJ7DX}~<89!y^qxeT}?DX8C-1fr6GzMefn#;)KC zm3nfeT5e2jL6usVCxb1(w_to=tOv{!4DAZkQUc})O`|1hObH++PjZ7wUJbHwk(?nW zc})PkW&jx4Nk^!K>M&X!Fi#AJ#3ZJ3ysMN()P@4cGy^KCg?XZL(7T&prIKzyBW*mC z%`o`OO=UE2da7X`MR;(pK0*I8`NC4RN`vh3fj)fm;O%4(LZ5al)!{K9ofmBi7CdrYs;#Nsu2X8r;%Y zgP32eK{>UBlM7Nh5UrG+6LTpA9k&b`Af<+3Wriu0s0tSbzbS*Ykb9Mp8E`5&*x-2) zs|reMFZdULX>jRGj-F%y1A=5c3_aSRJK+(=#nVJF8{p;JL?0F>EYMNNY+;lA$X=*EC81JvpgdL7HRE3Z+#_GqP%$5gKVB zPk2qs07i4~1ym7zhdH;w4w;;^1eSC7EbK%~5@w7wf=*#c`j{Lo)DwlEBPmBV2w`Qo zGAvcXdysk{HFm0$Ru~@Xh$Ke8RF@(F3Vj2lSo;8b^6;Pl;?Ytvl95F#aY8_=m3as( zXl%uUbR1qv$(hTs+Igu53>}RDZ>0c$53o=l^eu-%Y)KSaH4uS%gqBbas9)6PA+K4+7HVc*u<6kegf$ja&(PG*Dng3AGhS&WX}wPErZT-D||lWnNN5 zWdULy;*;+nCDOrD5(am{ED@qy0Tu~S8DEyLhCGPbVGOvjt>EIZgryQ7K6wdhlAF?S zmO_-m6i@TS5T6Rrshbe&3sM3wS(h9FUchpJiyr0(a3K~V_UP6elZ0HpoFP8(1y_rc ziD|4HREKB*r4jv*g9l6y&5|on5T!gF80Dt;Ucpu&LwqVQ^Kx@Yj*=4cRZi9Fjs~O|GsHKL9CPJ^h=m}ZJVGr%J`p|vxrZQ2EkWLATC1E;lUh-8 z6;NM{AJE_vp&;1<2PugOK)RTEi7ZE=4<}FnK6)TNDd5A-awshp$4jxwP=h@K3M7V7 zC;)*K3>G5FgP6=h+Rf#W{5a}bNT5xa7~xtG zJ;4c~29TcADhJ;l=0Wq%bb=UKtj1mdJ+WHVP`f$iP^bs}D+%aH6NgRhR2Fgujwo74 z;Ww(PIM^eZqlC+sK>p+dRX!6wP3L_JH;XF?*v4*?= zx@(|Ap)Q6+{TK<&GbpDd2fK3dD$sUs3=}<4tOE{6!JwO@5|U5EWVFXX;MQ?Sz~ZLmP5u$X z6X$Esg;X3tH@}cFV2qN00uEPau(HuKN8&0A;6$`&O?;xr3$_kDOJJQ+bpV+UMh0mO z+1xRxCYmBC6uFplC=tc+a}Q37&}7>rok;lw>VUZ^IUO!Dn<*Dl4+R#XF7aM4;$8a(L4TTE|@+YZ}iD@ z;;b37d(9Nj>ObL!iQ0X|CG@dr%t~~hK5M2oGMVC9ipX--+^ODEXO5rVjp`PCvu;2? zcZ;%>%c6uuub$lp;XNO(G*e^z?<(G4fH%E)gWO$3p?9mM;)9{Li-(IybY_cL;dmo_ zE;GC5hh3bccWio)*^;5Z?$GSKRHkNtp^bh+52x1 z_EPuWf%@G-4qHB`q*fkzq|AG&Z2!xg3MZ>C*t@y<)4R`qc=y4({^wbGGt4#)s{Hh$ zb>qt6m2Y(0YP{NTg`}&isYJd^qjXLaKfiIgZOXISZ{{e6TlodYcTU;2_xadqnP;op z2ep(OtUqS=%$djP_qOk`I<&rC*T4L4|F0d+%}+bBXwAWJWAC_q3nn%`I&@WrZO-Gf zvm%?j4J>zHR76_hu5NwYo=-Ti;pWhU^$*&teLKqWi(TI1hI8Gf`gQke+`z8hk|XO! z4{TDkv8~^$5vyF>LhIXamcBjd<~qE>;dv6ty_cP%Z;iRsI>0qNz0KT>!4p^ZJ{TvC z-8`n%()@@9trwJSJhrgn(ogqYeER$DPS1KjZ?1aZzNHH{MI|p^Fg>D7zMo!VomW?m zyJfDb{pz}{{mus`M&#U!xboSyVbkYbbDkBn9vMERLE}+hI^?Xa`{Yp1FVFn^QbUgV zyDeDo`O@YO>*`6f7w-9TAtJPElL~kA_*KIBpty zS#ked{Ih6gokn%}D256!ksspRkicl?~|Mrcm%xjUkA^9j{X8SLFKv9@75 z|Jco5l{P#JKAE?xc?9<{N%P@~XN^tW)~LH0m>l`IVDYEist%p<-TS$Jd0jcz;I-A| z@i&(3w$BcJbTX*@=fdaXj@C;H+}EvJx0Pq=wq5ll@A4MUxERHijE$9^A9(Yo_QIcI zw^W~aV&JT28Aii?3e8y1uS21@na(HRcKVL#pF*$2mJKr&cdjIy?>lvSm?3*`PJL2uSZ7YR*nnj++w?Z zY;yhD${mH{=G-vN$<#zAmakN`>9Xb9xBDks&ENjoe@eN-*@NpiRJpJ=YT=GK7iV1^ zGu`Ru)*1V<13z7=+G+8|YJSrzMfpB{oDy~1Kcm*O6#ZeLOSX>@ul?cP{KS*ZfAhB=Z=1|p>%Haq)Ypmjac4hm4eFFI$#Ko5wVm6HbzS}Qy)Nk)&cU8nJM8n; zpP=&S>bPv@<{o>>bh7i6AMJnD=9cJP+Vj~t-Hl`W)Ug=Lhlg))eztr66w%JxurTJJ8tv)jk6?pZMMqto~m1Ix5s_})9Aap1boQL4`6uh#zPlR71Q z!@YsSoSLZjEb{g4TPZ6^>~)@NIqOaD>T8$Atk*OTeQc4jPie4Y$OZe+jcnGh@15)O z(rxL-pKS#pmft^=l6^My{-F-u%g1hLBwy|SVnuM3GqYMZeb?ap+}!AZ^gDVl59t4p z_i;ht-sz6%(|$hN-C4ETzD=}K@JcMR%$8Ywm_DLRRcB(a+)28y!eCaiNlsz5=3T}* z^UYr8ev*4`OdZ`a|8@1YN%v+S9cgfB+|mARclDigDXLEA0sBT@_@I})b?L88BeVid zzFn(?W z%z-jvE8~tE+tfICu)gJty7SGAR|Ix! z{^{XLEB_mbPogg^8oX$}hu$IIj@f+WYI$#tc2TW}I=5)R*nt)5w0Tl}%)s`Q9DZui zZ{YULE6a`e*zRh}megwM*?*O?YLi=;Lk65V zomnr?Z^OcV(~j7h_5E?h&&`@iuk4(1wQ*pY@6=7Lwnt;|-F|U%a~m>XN3W)rTLon- z3)z_5adhD6N24}K`x*Tz9ewO&WV15Hb#M5-S{IerIPm_<>lZC&IL^1pQ%z3o9vL}g z*QmD{2Zq@fXpgXq!eYkXn0a7FBd?d~fk%AHZ76qp(BriG4>m_18yGQY1eYB(d&Y@^ zmpJr4yqwed&YaApom8L9<|pl#cjL&x>ub2(l$RXjXQU4!Thw7IRi&N@u+*pZ_$_!^G==FH%eAue<{Z< zee8^b9tFQ9EEsmeGp_u`aU-t!n{AoCG3S~(YPo0J!OK(2A2@r{tM}0a*IFN4Yt0>= z5}DlPMA!G8(=2qy(WAB8#~yO8u9B|n67#f{M^i9URFfX`mTW7T>yAJISpWk@P z^h@(o=M|3n@;=Yw(Q~8d#dhf)dp7ECn45RicHBZc_ea}z#y;KjE+}SpMtaKW6|e8C z82xM9hIQ-DkG(we#l(poS(A?bns9O4(HYfi%_+>vDmVSnhv4MNs(KT%uJjmuw8!}t z?NU;YUhN;(MKfw~LAuxO`F;WCpQcu8|7p!V)$PunTVK8URdKtgxX&&w&*#9rOXJ$5 zJ9O}$>@;-Q`9Y_}yKdaQve`bf)1$1OIUA?FPb?U9wt8l?HV){LQ#mctEo#{dmBktV zZPw{QQ!?6r^pR(#-G4oA;8D{JpPfdQPucA-uEL`#vo77=WLr6;gJaz7mR}N_W+#oh zz1!fznk}8qZya;v{q(2l8#>2q^E!CgVcne9p-09<-SQn&wr_sBsSj|ty}93W`ObGY z1Ap+jo#*S-b9w5?t=qP>>pcBY4a-AwK8&0Ec6HxgsrGHg_i*ff(R;K((=KB>uPVq{ z_9`RGhfHSL^JU>a2P4y3O+LSQ^c&BnXZE@IJrwVlW9gAJFR)EQp3-pgPXPfvE@t12 zJd*Iayw9`=gFCuBY6Gh_PUv!B+UwY5%EAMF7e>`OJ2&Z&B6~!Ihz;PVBFuUK#Coxs~ZzmP)?W{5$)!OOv=UEs03ZG94Pf5;EUtSh5rMq9fk!j8`Y;sMP zetB;`vf!Rm`IW~v@0WZ$)kt=I$=Lx{<~$vrq>4umvV0_CMU#99(xrbJNdiW_eW@Shp$!)tIwo4AlHuI0KuF19AsZnfJZH#K&qTRw@ zf6@<~+{0r|c<-yeAD*=gUD4u;d_~*r+bSH=Z#`Y{+;7vDgb9hu!mn0INS;#Ta?i}} z(>ficH61A$++xv~&&u+P+z;)4(G<)EN$VYAx}3~QuxskSaawFt3x^{unp8D?I`(1{ zI>5&L8XE0Bt#gEQn0(>T`CHxGQYXzHupzX5Z@)vX!?%m}|K{IC!}fCrOmDyX-o$eY z->t1Z_i9jj+a9%^WcK`&6I0nDwyyG~%SqMr4zHj0ZoJs!!10Ja_#)52;%KccRe!O0 z+sbuWR?PGA`Q@J;S{z;ZzCmP@i@V19rKex2mgc!<%As2rO06rRPy0T$d}p?KPx}SU zCr{${dk2pxFRoO3^If~chYOrH->Wt!CUaKTktdxS_U>3KT{PdfQm4h8@9fG78ZfJQ zL4;zlWt&Gcw*-_=n>BGw;Mz}WQKoZPMozU3WTRacl>Rvg^DA(b0(h3v*nJreG37-~UIs1YCii4_t1RU+_3!AX!{r5wQXnTC3(HsT&3p?zrC_Gmet}qp4~mxKQDIr z)T{}Ig4=v3sPf(~W)6nAUe(ueMR=b+%iM3Q@t$q};Qjlid!AqH{C@YDeJkw?I#$VC z+P#D2IIr;MnVtG8RfQ*?n5E>82`_V^FmU?rD)+l}FH^W#t+%uBlVdFwE^g!RzSO0Q zZ|Z!T^mZFZ7@Pgr`OaIbrj90A8^<~3l+|0=GtMfvS4(Bfb=`X?>Qw!b`fyM1Ci^aN zHOpl^TjLS_y!xi@nP(0?2x;{CLyH23`!_PrWNmI}P`Fw4i#n((5 zy^XT4uWT^(QFOMS>Q%ivzQOA*Ttw`#xC%A3u5iXHy-MpOZ#yj<(*E4N*OhebysFg8 zXl0{U?L3dnOl&eYXVuEIZf_UnRV`|yjPYUll*Y%V?P{A@*JoOJ|KOE7J#$_(Q&% zl2xx%zm+^OP5LluLcxEkAA;a(9tCHCsPqdG$%b+ivEqe=stfyI1qw!Gn$s zkKK~(9J{+;&eb73=2Z*r+4H@%v!d*c+_4ouOvw9q81aOr@1C}qv$uTM(l7ClVPG4Z zi)#zjVe=0rjBdy`o}V+obwccmrHzJnzEx|UK41T1VYbz(JNs9>l&0``O~#L`ZEogt zqv_MNL(iQ&9-O^u%ESC|vU|x#S`XU(Mdq>UuH&)>L37PE-NbWDP|9x2Y5g-3?=;=D ztWWnQ35(NOUCeoQDstN0UtBA;K6hz}LH{4Er#7rnNqwuD@$I-puHjRczTz788u(;o zn@TM$lRhqMBsX{1e7Zr?EfH0I?Xclx!qZ*l@7w{D$?nmWeKP_lcL+#|snC8`puw<3 z{H~{-+s9s-8Z&R~rH7Rt$NHW+UVq)IOMM*1@fUu3;C+22IdJ*7O9!u+H*ma;Q{5{j z*;`UNI^XTnad4dmz5VVTIhSD_zCF(E$?TNZZsLchueCpKwriy6*_9&CWOnjdb=^Mi zhjvtW+Jm~T!JRs+RCaE4JNm^>wd%_X)5?Z4d+xM-R>DHhMayP(=*m?*m*KcD%5JRu zeO+8xIX$KM3pG0wUC-*5_&Vp3XL!tzUh5z14$r!f5jp?D8>KiO|FTTN zoY)&3gY(wf?98^;@0&TXdilno^|M}G>XNnNetEn0A9BJLkNKR7%Vg^fx?46`dvC>E z<-z*)`?{ZSp7Q!uJGX)D^&6MFc)@1p|AUj~9dNT7!?ydl zS(Xdkcs6jPuS=uU3Wq2AZu0Ka-EySc+csnGH_BSkB{p*2tf*=CBi|lO;&3tj}(GI2d>f*C91CED=SFl}N4^o92+Fm?pD8dKVlNYzvf1 zGZWjlU;L?EQ2Pbf6JIr(bkllwC%^NM!+6NsAjx^V_J;emZgq|Fsh7QYa#9b=)xZ2Q z#4^e!v)`f?W?LQ{7GN%H019be%a&w zEI>t|*H9aBp$4tXx_jXuY=e@oExNdUa&5t#^8-*kXU3N ziI*;4ytvz6ogJLr=J0E{m+`XE`}THxymqNWRQjC}Z|n4t4sda)J6UXZFMKM}gj}~; z_NY}*_=7nE4m8>x?De+q+_a1DXaB0Y`0{ySa@$224*b$BEuz+6o_H`c%C(lea&E;_ zH?Pf$>lEu~($0S7rHdaNtZWy{SKRh5%*`6`xTDQJzb0F5zfX+XGWpD*OQG|fhP*91 zbjYLuJrvW=zg?%?>pf}o-I~#s$Axcp#?}0&XV5#ban`(dL)utWdgW{M%(zYOf-sdbJJ3j_smKzd*0V3u#rRglMAex9qO^^;7Sv#i_>22?YL;G{nh;^ ztOl4b_gOwS3Io|tZ9rI9Sp5bK*46F1OWtSU!Zu9}jLm0nS!-olb$^R~l^@o3FoDd= zM{PbVldY<@_-)PIt#6MAy|UP5#?$kgA~Y{dx~#pu`^M)rX`7AP9^07RX4}vw)lot2 zGs{Ud?1E3`n5q$tUcH*}!O_wEc>4?KQ|ca{?-ahV+JJlK9a<-KpHlnb&7fiB8V_Hy zGcLPZrC!r&ObvGCa_v`4`SgBIs^Zw~oKwROn3%3Lo)A9mW_s9yL4(SwUUzwRH!bUf z=2`n5la1o;)!Ne0b!owuq`B(wsSjV3yJT9qd->0SC$6+QEeq-Sa!gLQ@OjC1G|y+A zn0CpQ;f$+4HC6JO1~ z(>ng%v{RRpLxZfM9c~XQunntf-{Ae2U$*4ubh;k<>)xsr*FT-=vmnsGcCl#r&C3Se z_IJwnQh&4`+@pH`vto-mjiX*GR{BOa*?0ZavZd7>IxO7y?%g}r;B;fFYJFp3VybSb z^S*yWzx#(%k9MosZqSVAT|XF3a~&6J^f=kV=tM1#8mUjZ7OwMc9<(W=kHyT-AgMW!AMXSFft7Ea^Mkef6`L z6{9*W$(`-9$@9(e;itqqNA8VuSvm8-k3V`n@Mt?ZJLQZ_=JX`;?Cvj_&-=xDE$dXh zyoG0~S~cy_!Qn%O3=oT#-TJvww>6Cx-WwWRDfan0O@92 zn`NyI)|~h29`D}e)PgyelIBdcUfH|l^30?K3r4lOGV6KgiGfX9H~-Y^=&sB6YRq=3 zSZ7#*f2-{w$2-h)%5B?i=BK?}{Opx`y&%e7r}JetJ>Ap!hRd7TC(l$jdll9s%k$~% z&UO_#oxa)LE+?g3(!%(YJ3lTOFyMfRXvle&?X#cGicGSbsaLP-huLQW^(Kk^S9i{v zRB`x|Yl&Na`Cyd#;$hY3P3td*hgXQO>(cg@X(!J#uQx<#vcc|I-%6D#4H-G|mU3w4 zX$z`94SH=FyW6PX#g9*8Z(fXEak5T?UFm+uxmB)6aE# zN|Nuo;LAr=T=BoHdF5wXc4S&L>uSpi=U7he`(^x%fHOm-nJN8VS30_5&+GLao-5Oz z_;_YNj_7-E@TR4F*3q{?KF?mp{V?i$M~_49TawLRuWuCkVs7Wc$-ca^BJ9Rb`ksS4 zM=tsJW4!@^16{h^TJzzGd3lp0vBR86^>6OA-Z{f`MRd}VRUa#PoM_Xv>bS&bmOp;z zb*IPbYBlT{kBkm}D0|rJVR!S1kqw+S#5JBZeAuvn)~i?FjNMcvR$0Yq)cKA6dAGg7 z(yn^PRlE4<0r%;eNuw$7)t`Pn)%j=K6<&3!RebN@eHoT*k_PN)zjfXJ)T!%>v-VHI553=%nKQdY*9{voBzn%Nn?}>u>@do_QqUy*$+-w_&?v;U+ zomwrgQFHDpYiC!d*bQ4A&K&+`?&!cX56bDA+NI^%ZJF`K-?Z`^C+pVAGvk6MwK%jX zZOf~!)QZTjacC!NmnR48&*Y}Wc!>2jG<~t;Li#Zm_e!0Ad3R^QW0%Zl zp?zib+oDfoQ@U_yL;Fs z7ChMXa_8#R!M&@;yiDzE;OzhIgQZ}Mx>szc44)cC%A|{>vxvk@x+0hgF_3wXl)Rj4A%X-ZF;lu5AXXQVR%yT_7+sQib zQ)+4t&q}`>{b~2=vc`Mvjoo>nt>K6cr!2Qr8NV{Io@LgT1KsL9xaq&LouO&X+;zh( zWr20O8yg(o*P>xenZ*7pUAi}3+%;?Dr=FANdwx72J02p-SZWt&YLRtqWt!>47?)pW zYc?#-Invas`dy{NWZ$*Z<_>EyqhZM8=4GuLDC<->ZayIEOZ?cQk6ZM4JSMbh?6~To zTgr2Tdw?wmoXJr)6wp_};TCE?n`R8S+S%9vI3BH}{A^o|6=&c00tUKfaAwm=$AR z<=WW0oBGPHY~410_0tuGU1v`ol~ZM>y4K>?o7x^*a?>e)alcyep$48yCK;Q?pKN6H z>xV-RGBXw8LGOlczHr=UU+1PxYTjLwB)wq&w1ai+mLJZCbrY}Hx5UK_{ka^jusB4| zbN=>_m>upX+m8%CaG=Zy$5jS_wKk8P;rT*(NYA3;gzozWp4s=>x^A?^ne~qXn><*v z;p&X1WzIhk6?BhYINEiu*Mu0oTe;WYIK}pUJ@$p|xE05(vbI!B-JUqGU#!Yx#G9_G ztBo5_vtIhM!+m}_VG!PI;B$og1cscY5AU}@s*zjb{@TCQn{X1uU3!R zWNr6&^C35fuI+xAZt%#YY@+c=>&~w()O+78dHFQQj^ny?onlQg$%cC^<}`^ z*0+*#n>0?E>vURbT`gfz=Ip`e_Z0Su>+jmSK$QA;llK6_<=Zw}J8nL|_NL9Pb2WWe zeOb!cHaXmdtjT*^f@h8j2j-U zXS;a$wR&wlXZk&B-JpLTW4Zdgi=pL;$I^<4T@U|gzTe9^dQFRYixxTW%$~F9{?YSi zVwb1a_qvfZcA8!E@Lw&<;vG~#8q~l%kO$Wa8-kN0nS-*ad8gDj6S6vB6v%&cTi=38!sMF15(>oIlSuHp=*xS939eNr%~(NkL&s_-uH4z z)eY$vt}OXsTiSs$<{5)KTCVjPc%YGStA#erdQLJuWYfymWz>QT*BBWfBFUAcBC%s3Ix~f(jz? z5eHC2)GDAC1PUTUR7g1p60`yl!w^7b2veChBH~R&g2-e*gff+m$@#r&?USJuzw1^1 z_y67J;YrhTa?ajszkBVy*IDP}&04d!EE+yw{-mfTeJ5W2@#}fjcZ{+o)E+y-vFhP( z`W|c9c$64At2k!Tq&efyJb!3pyH`)QOk3A^?wr;O9$L`s^OzwWyEJHU_Cd$TznnMD ziLd*fXK2k2-k$O3wAMLqjyQ58_ZvJ3nfSTdYR|e0P5Mo={P0~=$FFWVpk^B?-+Ara z$T`=u7C+i0-1JnD^3q%9c6`+2JI`xhtbh999|~-%CN^w4rBS0n+qb5lUD7SF)uaIp zcX#?gdAwiu_s2gU+5eH1bAC*^FR{(McY6;yR2b!|I{(>h$HD8?6PC{g$GL~~ADG?X z@h99bpWF2AkQ0kez1HWu`x~S#Ym)l-&NC@9t;d(W^Xu#JwZ|qeUWf^>f7^t+4{V(@ zpkwV0#eMGk{`tL`hPt2sqpj=E{Ju#U>zdT8TlJ;G85!#iuAkSo)11az?|#AKIA3A# zr(wNzCiLF%&+8l9S6-^U{Y=ZZ?2omW+-+yV>7L{I>|6NYCv!(PTRjL*1B_LopMUJV zbnAr2hFpy9x#;-^diG2Y8+7n|(k(yOdzzGbC-2^nwx{#5q)|`qS-9=MYaNYh_`Xvs z&L(vn_xbMpN8XvdYj&&b!!h4(ORoFmuRA(){;pHQ8P0a!K3_lU;JrEZs!uvLyDv3T z&Gyfnc`vLul+?tzcG%dO&6{Uz_~g@yy)KX0nmGNasd=>nk~N;<+1BU5oVZTU zRTpc1ZuO7XTSiw&cw}MJ!tEz}p33^6S6Y|ZW0w5dr9rKe17i9WHp~4s?Xa_5_nFDV zM<|_sow2*#Q&sM5dMfPxEhEQ|vK?%2?1eXfD7of(>bVy@U%yymMA!Fn8mINRcw+FU zUv2Vzvhv~+ISE@nX;%B22_44_xwYSxBRyyCXw-O2*B1HbMujgP^~&>Y_E}@oN`Gv> z{@J1btlsXcQH_QUZ7}kO@W*<-_2Hx+v#$Ldlk(HE3)-!j(CFn(XO23b_AXiUbJ~{u zZN%a?*fsyunfALUJ$z=%xyt8uB;Ip6w$1Kd zBOFVXxOd#~*z@&_S+yU3dccTT7YsX_rS|{+i<-^DhrZfp-HDFt{yFbR);lj$Sl)9; zjqJ2#9lqZ2?#FBIb~UbW>$P!)wR84w?=EhOPaClASf>HQs~1=Qv|HO_N9Ok2s(C9^ z=p9vc<&Xs*Rd^+0#GU3X zHsk!A-%Tu8H|@ubjy74Bmo8nkZeh=_Kc8MYANRtyy?FMq&TAU=xYB;uu?@Yl-|lfd zcKxqP_2>bwuRGVewb%9!?a5C@C5&28Z`S!!1-G=Gk$r6Mh({l|kUZ~&_=igzA5E#$ z87|8AeH`x{8{Yq+Db?RKZ%dwk@R_gIzBbm_<4jHG^DPc9nmzYQMx8e{5B{LVu}23F zUUv91F>%Sd3HxWfpw6ps+t;i2zj9<_#y_$SpJ?dlzW%N{dpzw{j}AY(EcSfD$RVqr zc(dl5ddb#G58Zll+=XSU@^kK=vT;ZEh1C|$n;F|daemn4yT%{iJ@mz~uFivA>d|=B zbNw!@9rb+Fnb)E#9Zov6@!I#pCckntIbaM>n_gyWX`jGH1N8bNaQe`)dxwrLL-tOY%#Xo-fa(DNV!WtixR=jX$v-UqsZJ4@o?uSvSi?-({&-&!)?pXt` zw|!&ls8LOy?^N99i|Usv{xhrH@ttD|nthu4^wK+DzFPZ-NBi|?J?8qH_*?e&zx0u5 z!Qtl{wrw(YbffP!4H@3{f0D9l6nK9<5|!ru=(R7u82_>3)3f8&jk~%zu9JGt-de_t zr(4F1JY}dgsbZSxl>sq5ZXcb}qv3rMcO6~(OZHMLt^8oS{#lQYTye7hru$YsIY5~`^3fy4Zyt0tfA(^> z(_h8ST=!*D&u3LP$AxEg7$xd$A3L?n^ln>yqs|Q9y!7i@&&ExCxNp*X-_6abKgj}Y-*ErDzVRZ z)ec{-*YDTCMTO%=9y(CGe$<3>->;nCXZDe-ng@RRzIf@Fm9IY(;U4qilMjFO^P~Ga z7GFtyGA1Q_&DnufRu9b@;a)OsRLA#vojy2BsXw`CLejJMww=H6%NjkWzuIo!u0mHr zi@lyN+nTnmAF}(6jQuAXt^YP5&h6W`@5H87cm8~-U1#T+vAN;Ov-2Zo?U>moW%Bm^ zKNa7(XUV0bv(BDfcX43Sn2w`rPO0Adhok|nuC_VDD((4U%~Nk?_UV7YbLGl|>qp-` zee=@0`&mx3Z+rZD*iP@vsIKn~sryXz#~)}3Z}`D5HQX%1My+_x^!UgDE#sS1ofwn) zf~suoGG=KvdQvu};j48&z4m0+oF$Q;E%TjB+4@tB3+>Zh8=EruOy-JRX-VV5pE|u_ z`;wt4zYeS0LCsCbt$y&r$@$Cddonh;QeU|D`@*Q^+Y6?qE{OR2%Zu&>Q`=YlWkW{A zOY>{J^!3Vp06lYyCe@d+v`maq1d*R-13R_Kn_>FUi54Y{QXu|51Q}&!m|F}}kUE#B?MP~yk^Kjc{AcygZXJFq>Es;?XKj0H?Gp$0zL5Rs+V<1KH?29D)Tru| zr>Z`)`%E>Z-i$Bptsh_i;oASbz4qqOaTE9n>p=Z1NlbhW+sgGAl|Kfq} zO4qR~HuV4Lp&=if2w z?s$Dz|8_GPPv7`-%c=IeBAT7QKJx7NOhekbu`dtEm~~)Rm+1MP(S|!e96a&cmIbqi zU5pztWKZ7g2fE(=aY>g+Kki*|`?{q)qb$>py*4iCq8q?=t(D1NBZ$+&`lz*YLx^A+D7Fsiy4y-nFUiuVP2fmtX#*=3~z;TsEdr zrva}$bvkM4*&3bp+*Z5a>Hgn$XtVIJHm_DnYQ?LG1(8|bB)vMl*Io0QZWUASk9)b` z`;|kw9ABGu`<-J4xu(Cjr}u=!uBT5f8nf-rypy+2=-F^#{eqcK;v1jaUwnLV#fSIQ z-*~>$)1#H%UAufe`;J)?-<$H(@Qu5x{d{g^qxau>b4l~DC5`%A{rc&uOJ6!Nvcvk0 z5i=ddD+cdqoHpdEk6Wm%dd;Zk*?alb1(kNc{nI<+HrJ_n==&a93ML=hI< zW%cuBpX-(}KDz&`+QWNKTz|3l_MNBhotQTCovIr*j>!Mz(OVlYIazbvm`#s8z5D5F z9ajxIb-7o~m)l)jIB4rTpghNn>QgUkZ||b057N@ijrVK7%V+P7u@9cwFuqz$-1LjKy?Z~h zeO2}N#gE5*oY*h*F7Kg@S2xG3OZ{%i`)5CPzvD3t>AQWKBQ5RK+e#C@erH#kTdzHI z-<-2)-<}H$Z|6gOV5aZ2RLId(&dBw-;-M4DGsP@9udQA1Gb&&Bi;-mA!{o?bK=w^Yfi`D z+n>7c+;&fofrsutQs-#5aX&ujjN16C>!lAO>e#L%-uLr_k`)EEJx^uE4jlaHdxIwK zF3w0dL=<+fv+~ywD`rmbe%i6NZKP*T(zz?GUwJ9{t@m*s;#v8^;fA&Qb*OI{xB1-) zeSOtO{$Oc4_osSqH21tesN0V<@YVbAo%@tc+rK*Y&b3)_eU%L_-%}^As&SJ#zW4Y8YE z!Z&FzO})MJ`QzVqd9vRJYpdV-+UEoJw5hH{G+VOgXjT65@xshM{?mtnwLjGod%pGg zE6Ho_--KUwDED`JsOz%M&%BFW{WmCdH1HdkZvOr5y+#ege!QaaFHPuhOVo(?-B&cq z248KJ=7=u7Lb2h!2=A|y`gjG;$KzKpX-Zw?cI7s_n&Q<6@6hu%-cM5QMTG9P$~t8! zqLwdHRzr4;zcF_CeM(ov5%0mTF6HnfmHSKx|9tH79!ht_AMb>i<9919LSmQGvAYnD zygee2-;EgN?RdXE_9(7-M|_g8%PBs2Ym7-NlxmCDUC;}?nxR}*r3;R?hE8u&Zo#X% zlB%RYKB^R7z75_qZtYQ@#`MOcN+aJ2BibG# zej8+fdWR!-LT)pRX#>RUuZxkbgjsmQi1h!qcIcyQ?H=8IxiZ_x18#Kd4 zE)#K}TjFykG>tO{pV17>vwWH%t2w3T-iEgxDH(ggip#Xfe^y_ffArq4`IH+x%FrNR z%dcbDT&{Q}gLd_?ioGes7$vdJ>y`L$UZGaOurN7!)%u#oD+R-MZS}nuOG6l-a(f?7=jA4VOfM%eO-Hfw#3VoG>tceHy~IhNe;z} z>=9Z$ujWnD!Pd*u@=^)xc}$f&I=H)scK>DsK*A9XqgSbfFa*wWU1V*?!5)uoE-29q zMsFz6V_IHyl&1{~BBZ%3wDdzj8foA<$iYTcO93<>R$>YTN;3!34O!yjp)yu%jHY>w zg-|}tG9;1$hC1hxOK656DH%S=RPvl%9!F$t$}vxw<wr0ZEC)Dp?VN4IEV(9*bd{@ z9w7*_GhDR@Cy|Y>Xnu77eTwGnwv?uRsAsebbx@o)5L7@&dk?waFMw*vxV+8b@}t}o}o-WHL@n{O=-xn%%RSEPf#EUe{)oXaO>xXPRM_&TiNqQ!=a`a{ zFKb9XkG!31ldzVL)ZALWEQ0UF_{&DZ2+>rax8dITtIG5z24h%|<}aFZA*5(bLD`~} z4Q=yRzD`Ar=QOQv)(%2TVwaVXSlMu>$zxZk*b{M@cJ%h@YxQDO)DcqjuZ-RQwYrBf zm$roTtq`FgIeP^9oTn*GFH2`2A0Npi(>7lVTW-wo(n4bOV>%jE@Nx1hinJ(4W_r4U zuw(cH5rz;E^byrDsc5)JVA;yWTDT)qN%x}mb(}2GVx=R%(~%}7O$C@b-9KOee626h zD&xcCQ4EM(hzng3=R-gQyBbIyffiG^JQYDf-5ud#UabO4(H#?g*o(AUav87)91J)k zvhuG$<2S)!KQlG zhscl6YF^fk6V`g_CKqRvca>T*Y#b)50kI1HZMR>(m9j@D&fmw{}gG0_?TDc`! z1L-74dr6klxV&H_nXCkQK0?n(C)d5=RA4s!J27I}(vWm9lVTl$#0Hf75_6VZAe1G+Y zgjTvBWzkYW-A&jLsb;P!x>7cw(gO@8^IeMx4I#cxmzS(oK5AnI0H-q^9F z1;iI7T^`I3M`md%ZVUDMyV#H$vj{#0h%A60`rRb1jLR7WNa5t_8YKW7qF;VlhCw_v zKtkh&b!dLkq0s0$A#cXQ>1GQvo{b;wB6SPw<2y9nipIk;WYJnl&7wxZ!v3obB1voS7lu2;uMc(0qn5`l*KCQ~=raF1#mhM2F!P9qzw~|GJ@&%VYPw@x zswL@mR$6+TFoZT+td;eQ5g?zvQaQr@{UqHGO5gUkGW=euPqxg?qAo$-Pcle*B`xJ| zC6sj@paMQV2V2~k{AQmsLg>dS4Fs+s)KthWWrUCigBc;Lh{;(tBLu>Pmd^-brHl}! zOfPabSo|3wtVsQ~2vJmVG$bR06=8EJBZL+4zcWn~Z9R|?0@)WRBSbm^9LtOl2o9_w zBSeHL9if)zY2&pB4N+7nBZMgoaqjhu5GrScfH;`~LKUW~nqu`KVZ(Ub9}AT-LLjIv zpN_Pc0vRFb$h)B#Aym_EGeW3kGD4^bw!;}A5Dk_}qq-Vqr4}L(FH2PxT(z|829o)SVeg$**5NeN-X`mtnsJWly?deD(P z^o3rz{Ga4H?0QNFlV&QD5`vYB7#L_z$-O3G_13APPsof8)TEV?K?rLGVo_5KD_$n3 zT{uZ`cu_J4fn*Q@$sqWEo(w`WDU=REP&x=i{I+1Fm@*w#J>kOR5nhjx%VOB{d=N;T z!pcGDZVUkOLHJBH5s^7lXnDdz?>s>-Z0OG^e4ZHeJC8ao0{I|JxRIhl0#y*~JDu`D zXilFenN-BufnxG#yh#XTMB+abDDy!OK#Xu0&iaJrsb@EtkPm`->98|eG>5uStvpDx zB{G*J2!B2Z6X%1l3Ssw&noetGuXKyYqj@xBin796;J-Z0lc$w>3{DU7L69tHQ_ly% zk&#UicJ$BV(~u9s)XReBT$%^@AWTlkVPPH(-P8Add0vm64+1HJ8qg#)siY&+LUqy~ zvb@ki!U?hXgZ2|3LFD0$|0t|ygh2DEk2BJcc09sl>T9B5w)jlZR_Z$aAtQvSz!MA_ z%|k;_r9UGC<_JX(x1&cmh1FrobZW?5GUa!?=+Y>aG&=hs-m)};PV)v zE{v##QcB(yy5cw*nUE0z6=;Hy67sC+5a&UZa9mG;57y2h&=CicO*lywZX^H)jpK@V zJ0fsfEm)3L=z#R<7-TXzJRVdwSt*x}6$XOsmrhc@{EDbkK|0WrWRz7_28P4AVi+3V~A4l10!=1YoNvUA1^%Mo2-lqM=bw zB0Le&5`n-_$+|HPjD#g49qkrlIh)cmO#(|%wbHD{IO1DkPXe$~lc+^gkrOj`v^$+x z@~Wkm3EmTrxR#fR1IP-2ww>q}L!p^Xy`ioWGLMI=3um0@3yWbzRtQrrRMJp*RDe*a zZ4+T8fLJuxrLLnk$fIRr{$taiyavuR68aC87fUwkX{OFou)Nsgvi6nsH6cV0?5-p z2&5O1H`K(H9(XLYMybd8nxn0gEWXSLL8?g8tm)8?FhOsajVMhi8F2BnV8~3g;Iup# zMBG3KWQ0J!^Dqn^)X&5X8I3_ah6g3>nd!&~Vf7&`E9#Qlk!eatMhMas@_ys$Ps5DN zA%L?HE_0ZZbP$WoQKT{?gg{D*6nGedbArGkNX20tVvcz2u~Zv)(Y}WhLeRAG!IB}b z8Ue>JWvG-80y#wBX(1s5yr)v3!N>C1jXbq6epEAxq`>l3LEqAm%tiAcUqhyRAtQv{ zh#`aK?bZT&7*Ll8&IlnQ>@e&0N~oHij*Jj6G-Q16msw(uus{KDtdK|$81;-0m~c=X z)_-NFl%^o}0NxVZZpzzZ1W;OHD%I0G>nR@u1`pbWwzX)?P787^U^3B6gEK%GAy5;> z6d-9=EyiVr)JYj3khEMASZzK}JRbg2PCdNPaFM-=u){84eqlNyL_cM}fDh#rm^+*p zf`kkBLXKWE4S)cj;HCL+6qhqvu*ec-kB6@zYtq7_%n(r+K zTpOlAjYP9hK(QT};z|S@1x^n^m^CgxkT_elCQNMN)&-^LczcdJ>#gC>f>8S_%SR{2_ z6LEN>ReSoNMR1Aj$)p)fDC#Hblafi(0F3E_3Y!Iy8n_fP0qB}gYUuJoType!(@n2CeU6f)}oNfCID3Y@pKdaE~}5q-(>drzv`hc%Wg9Jh;bNv z%3ZA8WcGP(GW!DG6ww1*el~oQ*>{uK7vLVpsBg;efOGW){t zoWhs>Cz*W_sEkaBsQ%wY?F+|!g{d_Czm3=DOGlP*Q##}RFJSlKiAH(^(zBX$MgLc@ z`=T9~8UQV|3__1&f&5>k_eBw0y#A}`ed%PcZqoZ^K?{;>9BSjs?%$;M1#g{x#*aYg z2MIUnecDZWpPz)M-K6&^hMV-he{D(sh_(Iu%lw|l{)gy&LEroj(fdNZ@xR3H3vrMC zEV(b#RsHi6zp@_WpQiYQ`gDJV;}>+c{u;+G{U*mx0aKtnvG4EV_<@J_8;;+;zk}lk z9>IS##m{yFir>B<#m}Y)AKv+Rm)iaX#Sdi)ZHdChFRRUlKVh@|ONyT@#$vPBY^qIF zZJ_wkjt#^m8z_FZe?{@Lg`uw37L9iJPk2$K*anK9?O#y*Y(()BD%FFCP>P=o6hB)e zb;2fyVi%6DoiltDjnPdiW}L#8Y50|xBM#r>;afFSCyJjf93m`NY((*+j@bSH#m^R1 zKSMZd#C54;#g0`#UwG^4^V-5y+aIF%0R&O}Y@qnrssb|$B3<%JK&Vyh!dFnB4pNrSqr^|~^QrYQ1Qr2S2r&l0A7EaLB*$2(OC-=|yAj2&LK%u5_D} z_%V~gp@HycwS_YL_zUj;jo}AMUmR0rprSGiKe1Drpcyg-DTCTF#Oy)!%w!()ypybQp+*? zz`{T=QXF1Rx3?_E&#lt~iLzIQ8OkkB@zYFT^;$AAL5i?}tG=IerM$ zL2NFj_(3Xl&P)9U5`2{vPAV9I~37DgYy>23_q8j;Rh|bb%r0h;b-{a zbR?SdxY673S~NHS)UQks%M_PR@I!MT_<>eUdZM!U2d*0t1VN`lDa9oTezl0;2NMZ` zpBxh6tvNhyCiuBac?Dv8!CY{Ykl&;CVN#*aZ|Hq&hF}FS3xwAVhK{C$()(1M-baKg zruU)2GW0$gCZ2b0H?aa!iN_J(_W|#3_GW15ZUF_qkp4 z+*^|SP|p*GNlm0R?&t>8@l*TICQo`0e2CiTW@;bVBU%eY?TfO3x`w3&RxEVwXZ8_W z6U;uEe}IZg0cIb%MF+v`L+79)V)jw1Wte@a3ua#;G5b_uLv1U~We>r}v?H63rHok| z;Pu73vCad$KCc$<(rJBY*bQAI6Aqfr=%s9qG^i8v+(BBOnhUE`2XrsucTvMC`pM|9 zP$E<2anOwo))6)7qG@AVAK;Xu_1Sb$73-{j@%I7g*yo51H2I3ZeB8Olc7$tw^g* zz#gn38;uuQ4yOTNTA!Pyr%vm$xqp||2iP{a2}J87U7&qQ>!Yy*txwfJUj%Rrlce<# zQ_5=#(E8w4`D{e%!vYP^`hbCGeJ-8WCz#d;Ymo_BpH0&G;FJ{D!h|hI>$72|+KAR? z0t53O1kw6vwwIyx!6Oq?FG%Zyc0*}> zm`p@hf(H;v>x1`3v_4!}%Fy~$QVD2%CSd_SCKDCes-Q_s4*U<&`ruK3;;Z<1ee?+w zxlm#sd@~;oN5Bk%{{7xlF+&ZU^2LbI9=?XvS_t^ZDJ{u@~ z&|{=cQu?r~*veA+XeJZ=$_6x`@@axdeP}oeF06{TB=xEAwp1HPeUN}M)Ht*HN|@CL z(p4CQ=$t+iIDIH4Iel23*KGk#AKH$GO+Fssj2Aj0VoIC0P; zsF#==A`0YVX7t%4qffP3Y-)+kK;36XAGJb^KFmRMmT8RwtUJ*9Y~^TuVCX_qVD*vO zxsNVM>!T5-IZItAWmr0|&!@&M_Q`g^>S+_v8K{StdQ{#8>Yfi8M}Pq)8RM*<;s@lU zb_P$2u$U(ibq-4PbNrxBQ~{NbdI(4*xXTPB`Xy4osR9OrMe)G;xqd|=fzEL=G>-#p zzi259CjxvwjJ_oMdH<7CKk=~$1o0DdL?DQt$in_rjemGav|)b`KY_d|<@V`&G3d^K zX>BMHVFqE?NM%GscANM|SL2S#AcWzJFf@1*x_Pq!RBhOXw;r(ud%=p!MC2D$rtMtb zD(r1xI4PnGsXN8aYKG0_idQm-?VS@kZHHXE#MTb+_iQZ`6%6B&l4j0Ij+`dyI>hq2 zrJ|PM)mr!@tj%MS-$miTd9Gb5jHo;Ru0?3&d0AVDl#1QdGBP$BicMbU z71g%VIMLr8Nc3+=7Qq#jmM4-7Oa!hZ=xRl89cyS^HaAFv3%1*JlN)RnN zFCOW44@`~@_KxR11pV3%maBq@Y=9x#{dN@qy^rSX+?4u$sB6XMYADVd2r3|?ogQxI z7eKXS-5}5i$WPgG98yEqBNkYn#k)s0hcJ@;=(wG)_9~0h9636OGa=jga1bXN<;qg2 z^{4Ec2K`2UUd6mCyKc%q{8;;Kf2BXf^9I5g>nq0Lx>mUsmH|}`f~ED!qRVSF*&w!d zif#O*j(2nW*mj$-FALBE4byHp~1DWef$ks*?k<;+YiCMQs*UHcYgfr+@ zW7*>H2C`@d!DBIqPYv^Q)LaqfhU%9^&C-LYq3=g83B&A0y95m=!NPFPZnQKo4k+;q zN+ixKQzCI@u*6I;D^U8c>|Ykj9&3m!Y07B=*QX)JGKV@_tzKQO2;tVxKl1#}XWEoK zkDxd8@1iAy2n`}>`7M>q(BY&c7~|v(VtZ`a!ZC&icYfHHb&N&Y`IY&pDBOP+jl5yb zt>w!)#I9<3Swqq$I0I~x;Hue^=aetI8>`S?HUdV-zdQ}C-du-4`VKE3F%uQZYem3ANq{nan!#ooq>FOB$G_rd=WM+au9wBrmr$gM_d~G=BNli zUc? zG`k#hI0QHq)ZG#;2H-43cTj@BWxG;Dh*KgfmjRwZKZ}IQO$;3458r@Rsek3sIK|@_ zL*~mrL4NHPtW-Kg4uwd@V=02njz?L@Tu^sTxELU_6d`13xfF2+N{v?aA1miXltGN& z`;vo>U;If`8>Nd7YA$Gs$fFFKU5XN1!|zL3D`B&z5wTC~A=pOpK_u*WSzZ=|KVXC> z!Np2N0{IeTo}_z0LkiT?sxkB!JR!(nSE3whJg&iANdUF<75tWqu34M$mPaKDcm&1d zcx3bn0iCj0tRc|sib&9KYG_9mBxfap3&Gcd1l*j;qEuuvL8c~+{$p}xN~hu+x+Etw ze*A@>Z_-NC$;ZdK(?9;eh5VntoyFB}_Uh$C1Qd2+ ze)*w&NoGIBZ)6Q`I^`}P>XuvH?y>a+#6B-Ndojc(-xQ;9v#8(o#fIFjMes2|WB~-x z?>up3T;m`>3MU8HC;{jY{qoB~N#Xw62eQ9%fc^5zL*yGX zd5dXC*#nnFx4IIYZam|wZ4#>)o#^yGz3?Q2N`^wi0sOF*s}e51Kg!i4E-BWJD@h82 zmG?_7j|+2Bw}-$V!MjkMZet}l-B8B&AHMz3FjAd(+b}IyI24~00M)Sog6Q{yxpIk! zLv1M>p0QL1T}q^B=Q6?DOj_lSi&1bE~A+;u+w&=$*mBWdO1O z0Av9K(C>kBWeHFUhfgj6k`kqn^*0byqCa zQ@pHu4m*$MtW!qlPBWh7!#|hqcBx3x4Xrfw7&Aj?ySV0-^_TIqnSE6`#{T^z-4sfX z_Xa}B`mTs~KnU1{)CKALN%AR}{*dejg37v-@}UAdb-J98ecii@WQVbQuh?nQojj=@ zdN#d3YfPeaNVgTaG z;t%+z?^3`&c`z98FZ(wE|KPxu5BQf&0slm%R}BLJL&f*<2zi+eSN{?|;%G>~zifQn zK>`1=1p>>dgG5NcKTQVwQ~L@%;2+)MAmAUu`$4up;Gdv?e`=UT_yhh44)_OgdW1hs zMZmvopU^)F3iyX_SNU|LMGXY}qa%o))TE@M5`CS*^9jTV1o^3cy4Fi;8&Td|^6F|s~59tiG&fPdK(whG@&T6|`(0ab@tMG&D%+1SZep)b63^?A+V z0G6!>{L2mm{KGeL2>6$TZ-8?#&Q8R}gVu-*2<3atRna^PB3<%Jh0yGffPcbh$tErX zqKzTo-zBgCRSNiryLAkKMa`ywe-seVNs<1rOE1F30)1x52Ba?wqbvd)q=0_`HlQiG zvs_ZqPBm9mole!^Rl`XfEmM32??6y4N48mK1F9J+raXna`3)NomAPd--e0zZaGA5Q z<*<|yP?#DL?@whmU^e3YWy^SfU>6|XABiYcqnsp7b^27q`=dDtHXwSWvjK$~hS)?! zS_=xll@VRBVlBkW#58lcobu&#p(8oy3%zprKgo5N18hLluH?wDI2=w(-?m_QLbn!F z@~KKL`YlS-c)lKK#ykD~smi28@{eGyz+ zkNW2$KA=i5|1b+Jk`L$#S6wdE>oRgdVAT15ATzLj8uG{@3qtmEQ2Wi4Y=8^=}AM#J-kbh7QhOeeG8)2s`E*B^$ zmFsq!pk8(lZ#8hE(dC*A+=Ja=>5;r=mI?5RD7O zp~6Zf-MBDteR+fttT8&9I!=EG_@`Fj83ujkpcyDq)~}X{2}MDn%;*nJ!GNn2FcAU& zu&m%V0&@;VjigYQow8j49dZ<^9DJeZBE(PK@>T~E`xwB6r7GkYc7AdKNW01 z6asxg$$>+HhrO9#(k9{v@flq-YiQc|Wc4r{z&&M-3YHwMIF4Fs2Ka!~V|`38WSI^Z z;ytNQbSbYvj4#%plVsuMf|L&CBZd3JSXu_DA{!bYr8=-O9WEED!i2$YW@EOHdCjJ2 zpd#EK7y=4cEmgq@#?N(O1BKCvma;(_^Qjc?PpyjPwozXa-!>f>)fjJm?XFQOjq?v4$B^xsZ7j9gr z(R~EL!y-cuu%66xy~dOYCp4SD`j2#CeyA!KQsCuT%!v4hrJMrSmTV<_7O;s}do;hW zip&VUOri*YizEKg)qpe;2mc1hF;*GySe)T%rhuyjY9QPvFudSo`OJtTOKVk?HA#w3 zt%CX{{LliQC~=Pz3w~*AqhlkhE(m#>xmo1q%3As2WHeu!9)PQaY>_5q?~C6U@*irWo-b;XT0! zp~iHrn53$(?T%hF{;U)D&?X;_f)I$+>Vw+jF@~}p^zWiTe>8B|)rYcF4M$i)C|Xwa zs+f;79nEU7xd@g`cUK$OZ&kPSL)rnj4t>B_>Q)tRhTAm^j#H(m7V0!K`vLKW@MWSu}V)G=-j-2H`%>XHEiM5TZ5c zP}W7asGUeDo+*Fk0vsyDyF_n33IuE{-E5yZ21s+UXEDRmHkc$p^hR+J+YfbI`D(Fh zG-trH0dtHea0!iv zpRh*_!%7h(1lhzD@Pbyv5=vE_sD}oMRh_7({u?p*l*!8YfAf7onXS#$E-IIl4>4+& zmCMQpNGWhdxuQ_MgsaL`g~Bde`_1;6GDG`F%U5o0|Nqhh@@6SkeGLA{{$-S3pqDSe zKINGBME`sp={4rx9M3;BpZ|#NL(BZJarnJ;=Ugz?B1oov%5+kI_dMSBLg%I0eC(IP%HW|b_Pnq=<@ZWZj*h*H zc8ay@ygvb0{QHxzZvc%Nzd=xNnnY4jA4JhU6{USIOr1yDt7PJ+7Y&x6>1$%T3Nx77x`sZT6rbUyh?N;8y8N47xQNGu5xO|aTqI?tB_bOip_I=pj z#cdR6a-Z5S#{K~up9HDM;*2so8E2_h8rb)tjf47ejrVuxeJMei8|{}uraZ1e&H-(^ zUfvtn&%rU$&2DYmzub;j_GnHnMO*o)?Ek&mRvZuhC&~M?E!^sjwi7Xt_G_ED*P&a| zh|o5%mS{^O;NKq5HnPTPI~5c9Yi)z_J|;SCr(ychcDjNBKqjR{Ki%81vz Date: Sat, 5 Sep 2020 18:41:24 +0100 Subject: [PATCH 153/260] Add Clippy to readme --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index f48a42ecf6..9d2150a441 100644 --- a/docs/README.md +++ b/docs/README.md @@ -57,7 +57,7 @@ Packer.toBuffer(doc).then((buffer) => { ```

- clippy the assistant + clippy the assistant

--- From 93a7d607b241f4c833301a2419cd42e03c9ddc95 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 5 Sep 2020 18:51:50 +0100 Subject: [PATCH 154/260] Update PSD --- docs/clippy.psd | Bin 153099 -> 153099 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/clippy.psd b/docs/clippy.psd index 5193c920e65585a3b5eca7903fa57af7302ee932..0d32ab12d06bab589658c43e5d024830bb338a83 100644 GIT binary patch delta 331 zcmeBP!`Z!tbAt;rtEr)tk?CYlW=ANipLw%xnvtQ2ftiV^u2GtiiLSAkiKT9mfoYO% zvav-NX=j4qXBAc68cC)GwqiymE4hN`BZ#hnHF5Zuq5*Z8`(ioB%bQw~CbRvVn tWP?oO$?TZ|a22LNRmMQIa23r4ncEFA8Lf?ZQOunzmnyY=(j3Ohod80aT}1!@ delta 330 zcmeBP!`Z!tbAt;rtFfV#p~YlRW=ANipLw&cQL3Rys-a=Bu4$5miEf&)Ns?}ofhmx% zOg1$&H#0ReN=&oSugER%^|kVxypcm>b2H0sRuy8jOK(6KHL&+wL8bF23HyA9OJbeRld{P(~ zm@5i$l6@F}3>C|y#3VDzBs1OAG|QCDa;bBfB`q0}7!rZli~+_EQzjc^ m8c$}=6hKp9icryPkh$F;lhN9k7scGka;Z|=C(U83+z9}TkYh~% From 0c068bb03b941bebe7eaba0b225f0287e347ea59 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2020 18:39:58 +0000 Subject: [PATCH 155/260] build(deps-dev): bump @types/webpack from 4.41.21 to 4.41.22 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.41.21 to 4.41.22. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 281094bd8d..e5cdbb79a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -670,9 +670,9 @@ } }, "@types/webpack": { - "version": "4.41.21", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.21.tgz", - "integrity": "sha512-2j9WVnNrr/8PLAB5csW44xzQSJwS26aOnICsP3pSGCEdsu6KYtfQ6QJsVUKHWRnm1bL7HziJsfh5fHqth87yKA==", + "version": "4.41.22", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.22.tgz", + "integrity": "sha512-JQDJK6pj8OMV9gWOnN1dcLCyU9Hzs6lux0wBO4lr1+gyEhIBR9U3FMrz12t2GPkg110XAxEAw2WHF6g7nZIbRQ==", "dev": true, "requires": { "@types/anymatch": "*", From 57c480a6c60b07d60df5ac4ec3bd5d452e22277f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 11 Sep 2020 16:44:55 +0000 Subject: [PATCH 156/260] build(deps): [security] bump node-fetch from 2.6.0 to 2.6.1 Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. **This update includes a security fix.** - [Release notes](https://github.com/bitinn/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5cdbb79a5..316cb7c06c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5627,9 +5627,9 @@ } }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", "dev": true }, "node-libs-browser": { From af0bf5ced5ac07f5ebaaefd5e4e3922969a5a8c5 Mon Sep 17 00:00:00 2001 From: Matt Walsh <51417385+netbymatt@users.noreply.github.com> Date: Fri, 11 Sep 2020 21:10:10 -0500 Subject: [PATCH 157/260] Fix row height option --- docs/usage/tables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/tables.md b/docs/usage/tables.md index a8e41de58a..38a74f8ba7 100644 --- a/docs/usage/tables.md +++ b/docs/usage/tables.md @@ -103,7 +103,7 @@ Here is a list of options you can add to the `table row`: | children | `Array` | Required | | cantSplit | `boolean` | Optional | | tableHeader | `boolean` | Optional | -| height | `{ value: number, rule: HeightRule }` | Optional | +| height | `{ height: number, rule: HeightRule }` | Optional | ### Repeat row From 38079b61718a0339e12e3c3414bca1c36b255201 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2020 18:43:32 +0000 Subject: [PATCH 158/260] build(deps-dev): bump prettier from 2.1.1 to 2.1.2 Bumps [prettier](https://github.com/prettier/prettier) from 2.1.1 to 2.1.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.1.1...2.1.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 316cb7c06c..ab66a41a83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6492,9 +6492,9 @@ "dev": true }, "prettier": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", - "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", + "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", "dev": true }, "prismjs": { From 5125e774314cf6664e8a3b3ff546aacc09bd9ded Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2020 19:38:42 +0000 Subject: [PATCH 159/260] build(deps-dev): bump sinon from 9.0.3 to 9.1.0 Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.3 to 9.1.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v9.0.3...v9.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab66a41a83..196fc1b90f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4919,9 +4919,9 @@ } }, "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz", + "integrity": "sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==", "dev": true }, "keyv": { @@ -7303,9 +7303,9 @@ "dev": true }, "sinon": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.3.tgz", - "integrity": "sha512-IKo9MIM111+smz9JGwLmw5U1075n1YXeAq8YeSFlndCLhAL5KGn6bLgu7b/4AYHTV/LcEMcRm2wU2YiL55/6Pg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.1.0.tgz", + "integrity": "sha512-9zQShgaeylYH6qtsnNXlTvv0FGTTckuDfHBi+qhgj5PvW2r2WslHZpgc3uy3e/ZAoPkqaOASPi+juU6EdYRYxA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.2", @@ -7330,9 +7330,9 @@ "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" From 6cbe40cecb79ea4ff12a8544e947c0e6bc77e245 Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Wed, 23 Sep 2020 11:23:00 +0200 Subject: [PATCH 160/260] add settings option to add trackRevisions --- src/file/settings/settings.ts | 11 +++++++++++ src/file/settings/track-revisions.spec.ts | 16 ++++++++++++++++ src/file/settings/track-revisions.ts | 7 +++++++ 3 files changed, 34 insertions(+) create mode 100644 src/file/settings/track-revisions.spec.ts create mode 100644 src/file/settings/track-revisions.ts diff --git a/src/file/settings/settings.ts b/src/file/settings/settings.ts index abae0e61d4..2fa4a27f0a 100644 --- a/src/file/settings/settings.ts +++ b/src/file/settings/settings.ts @@ -1,6 +1,7 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; import { Compatibility } from "./compatibility"; import { UpdateFields } from "./update-fields"; +import { TrackRevisions } from "./track-revisions"; export interface ISettingsAttributesProperties { readonly wpc?: string; @@ -46,6 +47,7 @@ export class SettingsAttributes extends XmlAttributeComponent child instanceof TrackRevisions)) { + this.addChildElement(this.trackRevisions); + } + + return this.trackRevisions; + } } diff --git a/src/file/settings/track-revisions.spec.ts b/src/file/settings/track-revisions.spec.ts new file mode 100644 index 0000000000..3875d51f0a --- /dev/null +++ b/src/file/settings/track-revisions.spec.ts @@ -0,0 +1,16 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; +import { TrackRevisions } from "file/settings/track-revisions"; + +import { EMPTY_OBJECT } from "file/xml-components"; + +describe("TrackRevisions", () => { + describe("#constructor", () => { + it("creates an initially empty property object", () => { + const trackRevisions = new TrackRevisions(); + + const tree = new Formatter().format(trackRevisions); + expect(tree).to.deep.equal({ "w:trackRevisions": EMPTY_OBJECT }); + }); + }); +}); diff --git a/src/file/settings/track-revisions.ts b/src/file/settings/track-revisions.ts new file mode 100644 index 0000000000..2da692827e --- /dev/null +++ b/src/file/settings/track-revisions.ts @@ -0,0 +1,7 @@ +import { XmlComponent } from "file/xml-components"; + +export class TrackRevisions extends XmlComponent { + constructor() { + super("w:trackRevisions"); + } +} From 2adfe532dde74234e1f6665f85da4ae18f2775fb Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Wed, 23 Sep 2020 12:59:55 +0200 Subject: [PATCH 161/260] add more unit tests for trackRevision settings --- src/file/settings/settings.spec.ts | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/file/settings/settings.spec.ts b/src/file/settings/settings.spec.ts index 1e34c781c2..9be90669aa 100644 --- a/src/file/settings/settings.spec.ts +++ b/src/file/settings/settings.spec.ts @@ -79,4 +79,47 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:compat"); }); }); + describe("#addTrackRevisions", () => { + it("should add an empty Track Revisions", () => { + const settings = new Settings(); + settings.addTrackRevisions(); + + const tree = new Formatter().format(settings); + let keys: string[] = Object.keys(tree); + expect(keys[0]).to.be.equal("w:settings"); + const rootArray = tree["w:settings"]; + expect(rootArray).is.an.instanceof(Array); + expect(rootArray).has.length(2); + keys = Object.keys(rootArray[0]); + expect(keys).is.an.instanceof(Array); + expect(keys).has.length(1); + expect(keys[0]).to.be.equal("_attr"); + keys = Object.keys(rootArray[1]); + expect(keys).is.an.instanceof(Array); + expect(keys).has.length(1); + expect(keys[0]).to.be.equal("w:trackRevisions"); + }); + }); + describe("#addTrackRevisionsTwice", () => { + it("should add an empty Track Revisions if called twice", () => { + const settings = new Settings(); + settings.addTrackRevisions(); + settings.addTrackRevisions(); + + const tree = new Formatter().format(settings); + let keys: string[] = Object.keys(tree); + expect(keys[0]).to.be.equal("w:settings"); + const rootArray = tree["w:settings"]; + expect(rootArray).is.an.instanceof(Array); + expect(rootArray).has.length(2); + keys = Object.keys(rootArray[0]); + expect(keys).is.an.instanceof(Array); + expect(keys).has.length(1); + expect(keys[0]).to.be.equal("_attr"); + keys = Object.keys(rootArray[1]); + expect(keys).is.an.instanceof(Array); + expect(keys).has.length(1); + expect(keys[0]).to.be.equal("w:trackRevisions"); + }); + }); }); From 09db2c528a15a5442967e7633cfd2fd7b425f7c5 Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Thu, 24 Sep 2020 10:24:00 +0200 Subject: [PATCH 162/260] added InsertedTextRun and DeletedTextRun for Revision Tracking --- src/file/index.ts | 1 + src/file/paragraph/paragraph.ts | 3 + src/file/track-revision/index.ts | 1 + .../track-revision/track-revision.spec.ts | 81 +++++++++++++++++++ src/file/track-revision/track-revision.ts | 72 +++++++++++++++++ 5 files changed, 158 insertions(+) create mode 100644 src/file/track-revision/index.ts create mode 100644 src/file/track-revision/track-revision.spec.ts create mode 100644 src/file/track-revision/track-revision.ts diff --git a/src/file/index.ts b/src/file/index.ts index c4ce99e345..62e7e647ac 100644 --- a/src/file/index.ts +++ b/src/file/index.ts @@ -13,3 +13,4 @@ export * from "./header-wrapper"; export * from "./footer-wrapper"; export * from "./header"; export * from "./footnotes"; +export * from "./track-revision" diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index e1db0ec910..856c34aacf 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -3,6 +3,7 @@ import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run" import { IXmlableObject, XmlComponent } from "file/xml-components"; import { File } from "../file"; +import { InsertedTextRun, DeletedTextRun } from "../track-revision"; import { PageBreak } from "./formatting/page-break"; import { Bookmark, HyperlinkRef } from "./links"; import { IParagraphPropertiesOptions, ParagraphProperties } from "./properties"; @@ -19,6 +20,8 @@ export interface IParagraphOptions extends IParagraphPropertiesOptions { | SequentialIdentifier | FootnoteReferenceRun | HyperlinkRef + | InsertedTextRun + | DeletedTextRun )[]; } diff --git a/src/file/track-revision/index.ts b/src/file/track-revision/index.ts new file mode 100644 index 0000000000..20bb87a229 --- /dev/null +++ b/src/file/track-revision/index.ts @@ -0,0 +1 @@ +export * from "./track-revision"; diff --git a/src/file/track-revision/track-revision.spec.ts b/src/file/track-revision/track-revision.spec.ts new file mode 100644 index 0000000000..faa4d5a565 --- /dev/null +++ b/src/file/track-revision/track-revision.spec.ts @@ -0,0 +1,81 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { InsertedTextRun, DeletedTextRun } from "./track-revision"; +import { TextRun } from "../paragraph"; + +describe("InsertedTestRun", () => { + describe("#constructor", () => { + it("should create a inserted text run", () => { + const textRun = new TextRun({ + text: "some text" + }); + const insertedTextRun = new InsertedTextRun({ child: textRun, id: 0, date: "123", author: "Author" }) + const tree = new Formatter().format(insertedTextRun); + expect(tree).to.deep.equal({ + "w:ins": [ + { + "_attr": + { + "w:author": "Author", + "w:date": "123", + "w:id": 0 + } + }, + { + "w:r": [ + { + "w:t": [ + { + "_attr": + { + "xml:space": "preserve" + } + }, + "some text" + ] + } + ], + } + ] + }); + }); + }); +}); +describe("DeletedTestRun", () => { + describe("#constructor", () => { + it("should create a deleted text run", () => { + + const insertedParagraph = new DeletedTextRun({ text: 'some text', id: 0, date: "123", author: "Author" }) + const tree = new Formatter().format(insertedParagraph); + expect(tree).to.deep.equal({ + "w:del": [ + { + "_attr": + { + "w:author": "Author", + "w:date": "123", + "w:id": 0 + } + }, + { + "w:r": [ + { + "w:delText": [ + { + "_attr": + { + "xml:space": "preserve" + } + }, + "some text" + ] + } + ], + } + ] + }); + }); + }); +}); diff --git a/src/file/track-revision/track-revision.ts b/src/file/track-revision/track-revision.ts new file mode 100644 index 0000000000..1af9e7dba3 --- /dev/null +++ b/src/file/track-revision/track-revision.ts @@ -0,0 +1,72 @@ +import { SpaceType } from "file/space-type"; +import { XmlComponent, XmlAttributeComponent } from "file/xml-components"; +import { TextRun } from "../index"; + +export interface ITrackRevisionAttributesProperties { + readonly id: number; + readonly author: string; + readonly date: string; +} + +export class TrackRevisionAttributes extends XmlAttributeComponent { + protected readonly xmlKeys = { + id: "w:id", + author: "w:author", + date: "w:date", + }; +} + +export interface IInsertedTextRunOptions extends ITrackRevisionAttributesProperties { + readonly child: TextRun +} + +export interface IDeletedTextRunOptions extends ITrackRevisionAttributesProperties { + readonly text: string +} + +export class InsertedTextRun extends XmlComponent { + constructor(options: IInsertedTextRunOptions) { + super("w:ins"); + this.root.push( + new TrackRevisionAttributes({ + id: options.id, + author: options.author, + date: options.date, + }) + ); + this.addChildElement(options.child); + } +} + +export class DeletedTextRunWrapper extends XmlComponent { + constructor(text: string) { + super("w:r"); + this.root.push(new DeletedText(text)); + } +} + +class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> { + protected readonly xmlKeys = { space: "xml:space" }; +} + +export class DeletedText extends XmlComponent { + constructor(text: string) { + super("w:delText"); + this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); + this.root.push(text); + } +} + +export class DeletedTextRun extends XmlComponent { + constructor(options: IDeletedTextRunOptions) { + super("w:del"); + this.root.push( + new TrackRevisionAttributes({ + id: options.id, + author: options.author, + date: options.date, + }) + ); + this.addChildElement(new DeletedTextRunWrapper(options.text)); + } +} From 065c17de741cb5b79245781cd3dabf164d8afc35 Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Thu, 24 Sep 2020 10:43:15 +0200 Subject: [PATCH 163/260] style fixes --- src/file/index.ts | 2 +- .../track-revision/track-revision.spec.ts | 59 +++++++++---------- src/file/track-revision/track-revision.ts | 8 +-- 3 files changed, 32 insertions(+), 37 deletions(-) diff --git a/src/file/index.ts b/src/file/index.ts index 62e7e647ac..18f0a595e4 100644 --- a/src/file/index.ts +++ b/src/file/index.ts @@ -13,4 +13,4 @@ export * from "./header-wrapper"; export * from "./footer-wrapper"; export * from "./header"; export * from "./footnotes"; -export * from "./track-revision" +export * from "./track-revision"; diff --git a/src/file/track-revision/track-revision.spec.ts b/src/file/track-revision/track-revision.spec.ts index faa4d5a565..30a684fe9c 100644 --- a/src/file/track-revision/track-revision.spec.ts +++ b/src/file/track-revision/track-revision.spec.ts @@ -9,36 +9,34 @@ describe("InsertedTestRun", () => { describe("#constructor", () => { it("should create a inserted text run", () => { const textRun = new TextRun({ - text: "some text" + text: "some text", }); - const insertedTextRun = new InsertedTextRun({ child: textRun, id: 0, date: "123", author: "Author" }) + const insertedTextRun = new InsertedTextRun({ child: textRun, id: 0, date: "123", author: "Author" }); const tree = new Formatter().format(insertedTextRun); expect(tree).to.deep.equal({ "w:ins": [ { - "_attr": - { + _attr: { "w:author": "Author", - "w:date": "123", - "w:id": 0 - } + "w:date": "123", + "w:id": 0, + }, }, { "w:r": [ { "w:t": [ { - "_attr": - { - "xml:space": "preserve" - } + _attr: { + "xml:space": "preserve", + }, }, - "some text" - ] - } + "some text", + ], + }, ], - } - ] + }, + ], }); }); }); @@ -46,35 +44,32 @@ describe("InsertedTestRun", () => { describe("DeletedTestRun", () => { describe("#constructor", () => { it("should create a deleted text run", () => { - - const insertedParagraph = new DeletedTextRun({ text: 'some text', id: 0, date: "123", author: "Author" }) + const insertedParagraph = new DeletedTextRun({ text: "some text", id: 0, date: "123", author: "Author" }); const tree = new Formatter().format(insertedParagraph); expect(tree).to.deep.equal({ "w:del": [ { - "_attr": - { + _attr: { "w:author": "Author", - "w:date": "123", - "w:id": 0 - } + "w:date": "123", + "w:id": 0, + }, }, { "w:r": [ { "w:delText": [ { - "_attr": - { - "xml:space": "preserve" - } + _attr: { + "xml:space": "preserve", + }, }, - "some text" - ] - } + "some text", + ], + }, ], - } - ] + }, + ], }); }); }); diff --git a/src/file/track-revision/track-revision.ts b/src/file/track-revision/track-revision.ts index 1af9e7dba3..052c7e29ea 100644 --- a/src/file/track-revision/track-revision.ts +++ b/src/file/track-revision/track-revision.ts @@ -17,11 +17,11 @@ export class TrackRevisionAttributes extends XmlAttributeComponent Date: Wed, 7 Oct 2020 08:55:47 +0000 Subject: [PATCH 164/260] build(deps-dev): bump sinon from 9.1.0 to 9.2.0 Bumps [sinon](https://github.com/sinonjs/sinon) from 9.1.0 to 9.2.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v9.1.0...v9.2.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 196fc1b90f..d73f9f5d71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -498,9 +498,9 @@ } }, "@sinonjs/samsam": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.1.0.tgz", - "integrity": "sha512-42nyaQOVunX5Pm6GRJobmzbS7iLI+fhERITnETXzzwDZh+TtDr/Au3yAvXVjFmZ4wEUaE4Y3NFZfKv0bV0cbtg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.2.0.tgz", + "integrity": "sha512-CaIcyX5cDsjcW/ab7HposFWzV1kC++4HNsfnEdFJa7cP1QIuILAKV+BgfeqRXhcnSAc76r/Rh/O5C+300BwUIw==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -7303,15 +7303,15 @@ "dev": true }, "sinon": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.1.0.tgz", - "integrity": "sha512-9zQShgaeylYH6qtsnNXlTvv0FGTTckuDfHBi+qhgj5PvW2r2WslHZpgc3uy3e/ZAoPkqaOASPi+juU6EdYRYxA==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.0.tgz", + "integrity": "sha512-eSNXz1XMcGEMHw08NJXSyTHIu6qTCOiN8x9ODACmZpNQpr0aXTBXBnI4xTzQzR+TEpOmLiKowGf9flCuKIzsbw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.2", + "@sinonjs/commons": "^1.8.1", "@sinonjs/fake-timers": "^6.0.1", "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.1.0", + "@sinonjs/samsam": "^5.2.0", "diff": "^4.0.2", "nise": "^4.0.4", "supports-color": "^7.1.0" From cae6405d9a534afba21115988371c0fe05bc8204 Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Wed, 7 Oct 2020 11:44:23 +0200 Subject: [PATCH 165/260] improved signature for deleted text runs, added demo 54 and added documentation for change tracking --- demo/54-track-revisions.ts | 132 +++++++ docs/_sidebar.md | 2 +- docs/usage/change-tracking.md | 58 +++ src/file/track-revision/index.ts | 3 +- .../deleted-page-number.spec.ts | 30 ++ .../deleted-page-number.ts | 30 ++ .../deleted-text-run.spec.ts | 371 ++++++++++++++++++ .../deleted-text-run.ts | 83 ++++ .../deleted-text.spec.ts | 15 + .../track-revision-components/deleted-text.ts | 15 + .../inserted-text-run.spec.ts | 37 ++ .../inserted-text-run.ts | 19 + .../track-revision/track-revision.spec.ts | 76 ---- src/file/track-revision/track-revision.ts | 63 +-- 14 files changed, 796 insertions(+), 138 deletions(-) create mode 100644 demo/54-track-revisions.ts create mode 100644 docs/usage/change-tracking.md create mode 100644 src/file/track-revision/track-revision-components/deleted-page-number.spec.ts create mode 100644 src/file/track-revision/track-revision-components/deleted-page-number.ts create mode 100644 src/file/track-revision/track-revision-components/deleted-text-run.spec.ts create mode 100644 src/file/track-revision/track-revision-components/deleted-text-run.ts create mode 100644 src/file/track-revision/track-revision-components/deleted-text.spec.ts create mode 100644 src/file/track-revision/track-revision-components/deleted-text.ts create mode 100644 src/file/track-revision/track-revision-components/inserted-text-run.spec.ts create mode 100644 src/file/track-revision/track-revision-components/inserted-text-run.ts delete mode 100644 src/file/track-revision/track-revision.spec.ts diff --git a/demo/54-track-revisions.ts b/demo/54-track-revisions.ts new file mode 100644 index 0000000000..01d96082b8 --- /dev/null +++ b/demo/54-track-revisions.ts @@ -0,0 +1,132 @@ +// Track Revisions aka. "Track Changes" +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, Packer, Paragraph, TextRun, ShadingType, DeletedTextRun, InsertedTextRun, Footer, PageNumber, AlignmentType, FootnoteReferenceRun } from "../build"; + +/* + For reference, see + - https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.insertedrun + - https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.deletedrun + + The method `addTrackRevisions()` adds an element `` to the `settings.xml` file. This specifies that the application shall track *new* revisions made to the existing document. + See also https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.trackrevisions + + Note that this setting enables to track *new changes* after teh file is generated, so this example will still show inserted and deleted text runs when you remove it. +*/ + +const doc = new Document({ + footnotes: [ + new Paragraph({ + children:[ + new TextRun("This is a footnote"), + new DeletedTextRun({ + text: " with some extra text which was deleted", + id: 0, + author: "Firstname Lastname", + date: "2020-10-06T09:05:00Z", + }), + new InsertedTextRun({ + text: " and new content", + id: 1, + author: "Firstname Lastname", + date: "2020-10-06T09:05:00Z", + }) + ] + }), + ], +}); + +doc.Settings.addTrackRevisions() + +const paragraph = new Paragraph({ + children: [ + new TextRun("This is a simple demo "), + new TextRun({ + text: "on how to " + }), + new InsertedTextRun({ + text: "mark a text as an insertion ", + id: 0, + author: "Firstname Lastname", + date: "2020-10-06T09:00:00Z", + }), + new DeletedTextRun({ + text: "or a deletion.", + id: 1, + author: "Firstname Lastname", + date: "2020-10-06T09:00:00Z", + }) + ], +}); + +doc.addSection({ + properties: {}, + children: [ + paragraph, + new Paragraph({ + children: [ + new TextRun("This is a demo "), + new DeletedTextRun({ + text: "in order", + color: "red", + bold: true, + size: 24, + font: { + name: "Garamond", + }, + shading: { + type: ShadingType.REVERSE_DIAGONAL_STRIPE, + color: "00FFFF", + fill: "FF0000", + }, + id: 2, + author: "Firstname Lastname", + date: "2020-10-06T09:00:00Z", + }).break(), + new InsertedTextRun({ + text: "to show how to ", + bold: false, + id: 3, + author: "Firstname Lastname", + date: "2020-10-06T09:05:00Z", + }), + new TextRun({ + bold: true, + children: [ "\tuse Inserted and Deleted TextRuns.", new FootnoteReferenceRun(1) ], + }), + ], + }), + ], + footers: { + default: new Footer({ + children: [ + new Paragraph({ + alignment: AlignmentType.CENTER, + children: [ + new TextRun("Awesome LLC"), + new TextRun({ + children: ["Page Number: ", PageNumber.CURRENT], + }), + new DeletedTextRun({ + children: [" to ", PageNumber.TOTAL_PAGES], + id: 4, + author: "Firstname Lastname", + date: "2020-10-06T09:05:00Z", + }), + new InsertedTextRun({ + children: [" from ", PageNumber.TOTAL_PAGES], + bold: true, + id: 5, + author: "Firstname Lastname", + date: "2020-10-06T09:05:00Z", + }), + ], + }), + ], + }), + }, +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); diff --git a/docs/_sidebar.md b/docs/_sidebar.md index a63970dff9..5d2ba31551 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -20,6 +20,7 @@ * [Tab Stops](usage/tab-stops.md) * [Table of Contents](usage/table-of-contents.md) * [Page Numbers](usage/page-numbers.md) + * [Change Tracking](usage/change-tracking.md) * Styling * [Styling with JS](usage/styling-with-js.md) * [Styling with XML](usage/styling-with-xml.md) @@ -28,4 +29,3 @@ * [Packers](usage/packers.md) * [Contribution Guidelines](contribution-guidelines.md) - diff --git a/docs/usage/change-tracking.md b/docs/usage/change-tracking.md new file mode 100644 index 0000000000..6f81e4d0d7 --- /dev/null +++ b/docs/usage/change-tracking.md @@ -0,0 +1,58 @@ +# Change Tracking + +> Instead of adding a `TextRun` into a `Paragraph`, you can also add an `InsertedTextRun` or `DeletedTextRun` where you need to supply an `id`, `author` and `date` for the change. + +```ts +import { Paragraph, TextRun, InsertedTextRun, DeletedTextRun } from "docx"; + +const paragraph = new Paragraph({ + children: [ + new TextRun("This is a simple demo "), + new TextRun({ + text: "on how to " + }), + new InsertedTextRun({ + text: "mark a text as an insertion ", + id: 0, + author: "Firstname Lastname", + date: "2020-10-06T09:00:00Z", + }), + new DeletedTextRun({ + text: "or a deletion.", + id: 1, + author: "Firstname Lastname", + date: "2020-10-06T09:00:00Z", + }) + ], +}); +``` + +Note that for a `InsertedTextRun` and `DeletedTextRun`, it is not possible to simply call it with only a text as in `new TextRun("some text")`, since the additonal fields for change tracking need to be provided. Similar to a normal `TextRun` you can add additional text properties. + +```ts +import { Paragraph, TextRun, InsertedTextRun, DeletedTextRun } from "docx"; + +const paragraph = new Paragraph({ + children: [ + new TextRun("This is a simple demo"), + new DeletedTextRun({ + text: "with a deletion.", + color: "red", + bold: true, + size: 24, + id: 0, + author: "Firstname Lastname", + date: "2020-10-06T09:00:00Z", + }) + ], +}); +``` + +In addtion to marking text as inserted or deleted, change tracking can also be added via the document settings. This will enable new changes to be tracked as well. + +```ts +import { Document } from "docx"; + +const doc = new Document({}); +doc.Settings.addTrackRevisions() +``` \ No newline at end of file diff --git a/src/file/track-revision/index.ts b/src/file/track-revision/index.ts index 20bb87a229..eb2465d8fe 100644 --- a/src/file/track-revision/index.ts +++ b/src/file/track-revision/index.ts @@ -1 +1,2 @@ -export * from "./track-revision"; +export * from "./track-revision-components/inserted-text-run"; +export * from "./track-revision-components/deleted-text-run"; diff --git a/src/file/track-revision/track-revision-components/deleted-page-number.spec.ts b/src/file/track-revision/track-revision-components/deleted-page-number.spec.ts new file mode 100644 index 0000000000..5e0238da96 --- /dev/null +++ b/src/file/track-revision/track-revision-components/deleted-page-number.spec.ts @@ -0,0 +1,30 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; +import { DeletedNumberOfPages, DeletedNumberOfPagesSection, DeletedPage } from "./deleted-page-number"; + +describe("Deleted Page", () => { + describe("#constructor()", () => { + it("uses the font name for both ascii and hAnsi", () => { + const tree = new Formatter().format(new DeletedPage()); + expect(tree).to.deep.equal({ "w:delInstrText": [{ _attr: { "xml:space": "preserve" } }, "PAGE"] }); + }); + }); +}); + +describe("Delted NumberOfPages", () => { + describe("#constructor()", () => { + it("uses the font name for both ascii and hAnsi", () => { + const tree = new Formatter().format(new DeletedNumberOfPages()); + expect(tree).to.deep.equal({ "w:delInstrText": [{ _attr: { "xml:space": "preserve" } }, "NUMPAGES"] }); + }); + }); +}); + +describe("Deleted NumberOfPagesSection", () => { + describe("#constructor()", () => { + it("uses the font name for both ascii and hAnsi", () => { + const tree = new Formatter().format(new DeletedNumberOfPagesSection()); + expect(tree).to.deep.equal({ "w:delInstrText": [{ _attr: { "xml:space": "preserve" } }, "SECTIONPAGES"] }); + }); + }); +}); diff --git a/src/file/track-revision/track-revision-components/deleted-page-number.ts b/src/file/track-revision/track-revision-components/deleted-page-number.ts new file mode 100644 index 0000000000..6ce6266f13 --- /dev/null +++ b/src/file/track-revision/track-revision-components/deleted-page-number.ts @@ -0,0 +1,30 @@ +import { SpaceType } from "file/space-type"; +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> { + protected readonly xmlKeys = { space: "xml:space" }; +} + +export class DeletedPage extends XmlComponent { + constructor() { + super("w:delInstrText"); + this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); + this.root.push("PAGE"); + } +} + +export class DeletedNumberOfPages extends XmlComponent { + constructor() { + super("w:delInstrText"); + this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); + this.root.push("NUMPAGES"); + } +} + +export class DeletedNumberOfPagesSection extends XmlComponent { + constructor() { + super("w:delInstrText"); + this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); + this.root.push("SECTIONPAGES"); + } +} diff --git a/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts b/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts new file mode 100644 index 0000000000..7931e50406 --- /dev/null +++ b/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts @@ -0,0 +1,371 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; +import { DeletedTextRun } from "./deleted-text-run"; +import { FootnoteReferenceRun, PageNumber } from "../../index"; + +describe("DeletedTextRun", () => { + describe("#constructor", () => { + it("should create a deleted text run", () => { + const deletedTextRun = new DeletedTextRun({ text: "some text", id: 0, date: "123", author: "Author" }); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "some text", + ], + }, + ], + }, + ], + }); + }); + }); + + describe("#constructor with formatting", () => { + it("should create a deleted text run", () => { + const deletedTextRun = new DeletedTextRun({ text: "some text", bold: true, id: 0, date: "123", author: "Author" }); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:rPr": [ + { + "w:b": { + _attr: { + "w:val": true, + }, + }, + }, + { + "w:bCs": { + _attr: { + "w:val": true, + }, + }, + }, + ], + }, + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "some text", + ], + }, + ], + }, + ], + }); + }); + }); + + describe("#break()", () => { + it("should add a break", () => { + const deletedTextRun = new DeletedTextRun({ + children: ["some text"], + id: 0, + date: "123", + author: "Author", + }).break(); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:br": {}, + }, + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "some text", + ], + }, + ], + }, + ], + }); + }); + }); + + describe("page numbering", () => { + it("should be able to delete the total pages", () => { + const deletedTextRun = new DeletedTextRun({ + children: [" to ", PageNumber.TOTAL_PAGES], + id: 0, + date: "123", + author: "Author", + }); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + " to ", + ], + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "begin", + }, + }, + }, + { + "w:delInstrText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "NUMPAGES", + ], + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "separate", + }, + }, + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "end", + }, + }, + }, + ], + }, + ], + }); + }); + + it("should be able to delete the total pages in section", () => { + const deletedTextRun = new DeletedTextRun({ + children: [" to ", PageNumber.TOTAL_PAGES_IN_SECTION], + id: 0, + date: "123", + author: "Author", + }); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + " to ", + ], + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "begin", + }, + }, + }, + { + "w:delInstrText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "SECTIONPAGES", + ], + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "separate", + }, + }, + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "end", + }, + }, + }, + ], + }, + ], + }); + }); + + it("should be able to delete the current page", () => { + const deletedTextRun = new DeletedTextRun({ + children: [" to ", PageNumber.CURRENT], + id: 0, + date: "123", + author: "Author", + }); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + " to ", + ], + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "begin", + }, + }, + }, + { + "w:delInstrText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "PAGE", + ], + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "separate", + }, + }, + }, + { + "w:fldChar": { + _attr: { + "w:fldCharType": "end", + }, + }, + }, + ], + }, + ], + }); + }); + }); + + describe("footnote references", () => { + it("should add a valid footnote reference", () => { + const deletedTextRun = new DeletedTextRun({ + children: ["some text", new FootnoteReferenceRun(1)], + id: 0, + date: "123", + author: "Author", + }); + const tree = new Formatter().format(deletedTextRun); + expect(tree).to.deep.equal({ + "w:del": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:delText": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "some text", + ], + }, + { + "w:r": [ + { "w:rPr": [{ "w:rStyle": { _attr: { "w:val": "FootnoteReference" } } }] }, + { "w:footnoteReference": { _attr: { "w:id": 1 } } }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/track-revision/track-revision-components/deleted-text-run.ts b/src/file/track-revision/track-revision-components/deleted-text-run.ts new file mode 100644 index 0000000000..2342f70104 --- /dev/null +++ b/src/file/track-revision/track-revision-components/deleted-text-run.ts @@ -0,0 +1,83 @@ +import { IChangedAttributesProperties, ChangeAttributes } from "../track-revision"; +import { XmlComponent } from "file/xml-components"; +import { IRunOptions, RunProperties, IRunPropertiesOptions, FootnoteReferenceRun } from "../../index"; + +import { Break } from "../../paragraph/run/break"; +import { Begin, Separate, End } from "../../paragraph/run/field"; +import { PageNumber } from "../../paragraph/run/run"; + +import { DeletedPage, DeletedNumberOfPages, DeletedNumberOfPagesSection } from "./deleted-page-number"; +import { DeletedText } from "./deleted-text"; + +interface IDeletedRunOptions extends IRunPropertiesOptions, IChangedAttributesProperties { + readonly children?: (Begin | Separate | End | PageNumber | FootnoteReferenceRun | string)[]; + readonly text?: string; +} + +export class DeletedTextRun extends XmlComponent { + protected readonly deletedTextRunWrapper: DeletedTextRunWrapper; + + constructor(options: IDeletedRunOptions) { + super("w:del"); + this.root.push( + new ChangeAttributes({ + id: options.id, + author: options.author, + date: options.date, + }), + ); + this.deletedTextRunWrapper = new DeletedTextRunWrapper(options as IRunOptions); + this.addChildElement(this.deletedTextRunWrapper); + } + + public break(): DeletedTextRun { + this.deletedTextRunWrapper.break(); + return this; + } +} + +class DeletedTextRunWrapper extends XmlComponent { + constructor(options: IRunOptions) { + super("w:r"); + this.root.push(new RunProperties(options)); + + if (options.children) { + for (const child of options.children) { + if (typeof child === "string") { + switch (child) { + case PageNumber.CURRENT: + this.root.push(new Begin()); + this.root.push(new DeletedPage()); + this.root.push(new Separate()); + this.root.push(new End()); + break; + case PageNumber.TOTAL_PAGES: + this.root.push(new Begin()); + this.root.push(new DeletedNumberOfPages()); + this.root.push(new Separate()); + this.root.push(new End()); + break; + case PageNumber.TOTAL_PAGES_IN_SECTION: + this.root.push(new Begin()); + this.root.push(new DeletedNumberOfPagesSection()); + this.root.push(new Separate()); + this.root.push(new End()); + break; + default: + this.root.push(new DeletedText(child)); + break; + } + continue; + } + + this.root.push(child); + } + } else if (options.text) { + this.root.push(new DeletedText(options.text)); + } + } + + public break(): void { + this.root.splice(1, 0, new Break()); + } +} diff --git a/src/file/track-revision/track-revision-components/deleted-text.spec.ts b/src/file/track-revision/track-revision-components/deleted-text.spec.ts new file mode 100644 index 0000000000..d9c8de46bf --- /dev/null +++ b/src/file/track-revision/track-revision-components/deleted-text.spec.ts @@ -0,0 +1,15 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; +import { DeletedText } from "./deleted-text"; + +describe("Deleted Text", () => { + describe("#constructor", () => { + it("adds the passed in text to the component", () => { + const t = new DeletedText(" this is\n text"); + const f = new Formatter().format(t); + expect(f).to.deep.equal({ + "w:delText": [{ _attr: { "xml:space": "preserve" } }, " this is\n text"], + }); + }); + }); +}); diff --git a/src/file/track-revision/track-revision-components/deleted-text.ts b/src/file/track-revision/track-revision-components/deleted-text.ts new file mode 100644 index 0000000000..408b47304d --- /dev/null +++ b/src/file/track-revision/track-revision-components/deleted-text.ts @@ -0,0 +1,15 @@ +import { SpaceType } from "file/space-type"; +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> { + protected readonly xmlKeys = { space: "xml:space" }; +} + +export class DeletedText extends XmlComponent { + constructor(text: string) { + super("w:delText"); + this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); + + this.root.push(text); + } +} diff --git a/src/file/track-revision/track-revision-components/inserted-text-run.spec.ts b/src/file/track-revision/track-revision-components/inserted-text-run.spec.ts new file mode 100644 index 0000000000..c23069fbba --- /dev/null +++ b/src/file/track-revision/track-revision-components/inserted-text-run.spec.ts @@ -0,0 +1,37 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; +import { InsertedTextRun } from "./inserted-text-run"; + +describe("InsertedTextRun", () => { + describe("#constructor", () => { + it("should create a inserted text run", () => { + const insertedTextRun = new InsertedTextRun({ text: "some text", id: 0, date: "123", author: "Author" }); + const tree = new Formatter().format(insertedTextRun); + expect(tree).to.deep.equal({ + "w:ins": [ + { + _attr: { + "w:author": "Author", + "w:date": "123", + "w:id": 0, + }, + }, + { + "w:r": [ + { + "w:t": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "some text", + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/track-revision/track-revision-components/inserted-text-run.ts b/src/file/track-revision/track-revision-components/inserted-text-run.ts new file mode 100644 index 0000000000..49bd7f53ae --- /dev/null +++ b/src/file/track-revision/track-revision-components/inserted-text-run.ts @@ -0,0 +1,19 @@ +import { IChangedAttributesProperties, ChangeAttributes } from "../track-revision"; +import { XmlComponent } from "file/xml-components"; +import { TextRun, IRunOptions } from "../../index"; + +interface IInsertedRunOptions extends IChangedAttributesProperties, IRunOptions {} + +export class InsertedTextRun extends XmlComponent { + constructor(options: IInsertedRunOptions) { + super("w:ins"); + this.root.push( + new ChangeAttributes({ + id: options.id, + author: options.author, + date: options.date, + }), + ); + this.addChildElement(new TextRun(options as IRunOptions)); + } +} diff --git a/src/file/track-revision/track-revision.spec.ts b/src/file/track-revision/track-revision.spec.ts deleted file mode 100644 index 30a684fe9c..0000000000 --- a/src/file/track-revision/track-revision.spec.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { expect } from "chai"; - -import { Formatter } from "export/formatter"; - -import { InsertedTextRun, DeletedTextRun } from "./track-revision"; -import { TextRun } from "../paragraph"; - -describe("InsertedTestRun", () => { - describe("#constructor", () => { - it("should create a inserted text run", () => { - const textRun = new TextRun({ - text: "some text", - }); - const insertedTextRun = new InsertedTextRun({ child: textRun, id: 0, date: "123", author: "Author" }); - const tree = new Formatter().format(insertedTextRun); - expect(tree).to.deep.equal({ - "w:ins": [ - { - _attr: { - "w:author": "Author", - "w:date": "123", - "w:id": 0, - }, - }, - { - "w:r": [ - { - "w:t": [ - { - _attr: { - "xml:space": "preserve", - }, - }, - "some text", - ], - }, - ], - }, - ], - }); - }); - }); -}); -describe("DeletedTestRun", () => { - describe("#constructor", () => { - it("should create a deleted text run", () => { - const insertedParagraph = new DeletedTextRun({ text: "some text", id: 0, date: "123", author: "Author" }); - const tree = new Formatter().format(insertedParagraph); - expect(tree).to.deep.equal({ - "w:del": [ - { - _attr: { - "w:author": "Author", - "w:date": "123", - "w:id": 0, - }, - }, - { - "w:r": [ - { - "w:delText": [ - { - _attr: { - "xml:space": "preserve", - }, - }, - "some text", - ], - }, - ], - }, - ], - }); - }); - }); -}); diff --git a/src/file/track-revision/track-revision.ts b/src/file/track-revision/track-revision.ts index 052c7e29ea..4318e9a468 100644 --- a/src/file/track-revision/track-revision.ts +++ b/src/file/track-revision/track-revision.ts @@ -1,72 +1,15 @@ -import { SpaceType } from "file/space-type"; -import { XmlComponent, XmlAttributeComponent } from "file/xml-components"; -import { TextRun } from "../index"; +import { XmlAttributeComponent } from "file/xml-components"; -export interface ITrackRevisionAttributesProperties { +export interface IChangedAttributesProperties { readonly id: number; readonly author: string; readonly date: string; } -export class TrackRevisionAttributes extends XmlAttributeComponent { +export class ChangeAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { id: "w:id", author: "w:author", date: "w:date", }; } - -export interface IInsertedTextRunOptions extends ITrackRevisionAttributesProperties { - readonly child: TextRun; -} - -export interface IDeletedTextRunOptions extends ITrackRevisionAttributesProperties { - readonly text: string; -} - -export class InsertedTextRun extends XmlComponent { - constructor(options: IInsertedTextRunOptions) { - super("w:ins"); - this.root.push( - new TrackRevisionAttributes({ - id: options.id, - author: options.author, - date: options.date, - }), - ); - this.addChildElement(options.child); - } -} - -export class DeletedTextRunWrapper extends XmlComponent { - constructor(text: string) { - super("w:r"); - this.root.push(new DeletedText(text)); - } -} - -class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> { - protected readonly xmlKeys = { space: "xml:space" }; -} - -export class DeletedText extends XmlComponent { - constructor(text: string) { - super("w:delText"); - this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); - this.root.push(text); - } -} - -export class DeletedTextRun extends XmlComponent { - constructor(options: IDeletedTextRunOptions) { - super("w:del"); - this.root.push( - new TrackRevisionAttributes({ - id: options.id, - author: options.author, - date: options.date, - }), - ); - this.addChildElement(new DeletedTextRunWrapper(options.text)); - } -} From 700a74fd4ca689d39b6fd8d10c2aaa187c481d71 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 10 Oct 2020 13:41:26 +0100 Subject: [PATCH 166/260] More math components --- demo/47-math.ts | 44 --- demo/55-math.ts | 259 ++++++++++++++++++ package-lock.json | 37 +-- package.json | 2 +- src/file/drawing/inline/inline.ts | 2 +- src/file/paragraph/math/brackets/index.ts | 4 + .../brackets/math-angled-brackets.spec.ts | 51 ++++ .../math/brackets/math-angled-brackets.ts | 20 ++ .../brackets/math-beginning-character.spec.ts | 22 ++ .../math/brackets/math-beginning-character.ts | 14 + .../brackets/math-bracket-properties.spec.ts | 45 +++ .../math/brackets/math-bracket-properties.ts | 16 ++ .../math/brackets/math-curly-brackets.spec.ts | 51 ++++ .../math/brackets/math-curly-brackets.ts | 20 ++ .../math/brackets/math-ending-char.ts | 14 + .../brackets/math-ending-character.spec.ts | 22 ++ .../math/brackets/math-round-brackets.spec.ts | 36 +++ .../math/brackets/math-round-brackets.ts | 15 + .../brackets/math-square-brackets.spec.ts | 51 ++++ .../math/brackets/math-square-brackets.ts | 20 ++ .../math/fraction/math-denominator.ts | 2 +- .../paragraph/math/fraction/math-fraction.ts | 2 +- .../paragraph/math/fraction/math-numerator.ts | 2 +- src/file/paragraph/math/function/index.ts | 3 + .../math/function/math-function-name.spec.ts | 27 ++ .../math/function/math-function-name.ts | 11 + .../function/math-function-properties.spec.ts | 18 ++ .../math/function/math-function-properties.ts | 8 + .../math/function/math-function.spec.ts | 48 ++++ .../paragraph/math/function/math-function.ts | 22 ++ src/file/paragraph/math/index.ts | 5 + src/file/paragraph/math/math-component.ts | 21 ++ src/file/paragraph/math/math-run.ts | 2 +- src/file/paragraph/math/math-text.ts | 2 +- src/file/paragraph/math/math.ts | 8 +- .../math/n-ary/math-accent-character.ts | 2 +- src/file/paragraph/math/n-ary/math-base.ts | 4 +- .../math/n-ary/math-naray-properties.spec.ts | 102 ++++++- .../math/n-ary/math-naray-properties.ts | 12 +- .../math/n-ary/math-sub-script-hide.spec.ts | 22 ++ .../math/n-ary/math-sub-script-hide.ts | 14 + .../math/n-ary/math-sub-script.spec.ts | 10 +- .../paragraph/math/n-ary/math-sub-script.ts | 10 +- .../paragraph/math/n-ary/math-sum.spec.ts | 4 +- src/file/paragraph/math/n-ary/math-sum.ts | 27 +- .../math/n-ary/math-super-script-hide.spec.ts | 22 ++ .../math/n-ary/math-super-script-hide.ts | 14 + .../math/n-ary/math-super-script.spec.ts | 10 +- .../paragraph/math/n-ary/math-super-script.ts | 10 +- src/file/paragraph/math/radical/index.ts | 3 + .../math/radical/math-degree-hide.spec.ts | 22 ++ .../math/radical/math-degree-hide.ts | 14 + .../math/radical/math-degree.spec.ts | 36 +++ .../paragraph/math/radical/math-degree.ts | 13 + .../radical/math-radical-properties.spec.ts | 35 +++ .../math/radical/math-radical-properties.ts | 13 + .../math/radical/math-radical.spec.ts | 48 ++++ .../paragraph/math/radical/math-radical.ts | 22 ++ src/file/paragraph/math/script/index.ts | 4 + .../math/script/pre-sub-super-script/index.ts | 2 + ...b-super-script-function-properties.spec.ts | 17 ++ ...re-sub-super-script-function-properties.ts | 8 + ...math-pre-sub-super-script-function.spec.ts | 60 ++++ .../math-pre-sub-super-script-function.ts | 23 ++ .../paragraph/math/script/sub-script/index.ts | 2 + ...ath-sub-script-function-properties.spec.ts | 17 ++ .../math-sub-script-function-properties.ts | 8 + .../math-sub-script-function.spec.ts | 48 ++++ .../sub-script/math-sub-script-function.ts | 21 ++ .../math/script/sub-super-script/index.ts | 2 + ...b-super-script-function-properties.spec.ts | 17 ++ ...th-sub-super-script-function-properties.ts | 8 + .../math-sub-super-script-function.spec.ts | 60 ++++ .../math-sub-super-script-function.ts | 23 ++ .../math/script/super-script/index.ts | 2 + ...h-super-script-function-properties.spec.ts | 17 ++ .../math-super-script-function-properties.ts | 8 + .../math-super-script-function.spec.ts | 48 ++++ .../math-super-script-function.ts | 21 ++ src/file/paragraph/paragraph.ts | 4 +- src/file/settings/settings.ts | 6 +- .../deleted-text-run.spec.ts | 2 +- .../deleted-text-run.ts | 9 +- .../inserted-text-run.ts | 5 +- tslint.json | 2 + 85 files changed, 1716 insertions(+), 123 deletions(-) delete mode 100644 demo/47-math.ts create mode 100644 demo/55-math.ts create mode 100644 src/file/paragraph/math/brackets/index.ts create mode 100644 src/file/paragraph/math/brackets/math-angled-brackets.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-angled-brackets.ts create mode 100644 src/file/paragraph/math/brackets/math-beginning-character.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-beginning-character.ts create mode 100644 src/file/paragraph/math/brackets/math-bracket-properties.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-bracket-properties.ts create mode 100644 src/file/paragraph/math/brackets/math-curly-brackets.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-curly-brackets.ts create mode 100644 src/file/paragraph/math/brackets/math-ending-char.ts create mode 100644 src/file/paragraph/math/brackets/math-ending-character.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-round-brackets.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-round-brackets.ts create mode 100644 src/file/paragraph/math/brackets/math-square-brackets.spec.ts create mode 100644 src/file/paragraph/math/brackets/math-square-brackets.ts create mode 100644 src/file/paragraph/math/function/index.ts create mode 100644 src/file/paragraph/math/function/math-function-name.spec.ts create mode 100644 src/file/paragraph/math/function/math-function-name.ts create mode 100644 src/file/paragraph/math/function/math-function-properties.spec.ts create mode 100644 src/file/paragraph/math/function/math-function-properties.ts create mode 100644 src/file/paragraph/math/function/math-function.spec.ts create mode 100644 src/file/paragraph/math/function/math-function.ts create mode 100644 src/file/paragraph/math/math-component.ts create mode 100644 src/file/paragraph/math/n-ary/math-sub-script-hide.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-sub-script-hide.ts create mode 100644 src/file/paragraph/math/n-ary/math-super-script-hide.spec.ts create mode 100644 src/file/paragraph/math/n-ary/math-super-script-hide.ts create mode 100644 src/file/paragraph/math/radical/index.ts create mode 100644 src/file/paragraph/math/radical/math-degree-hide.spec.ts create mode 100644 src/file/paragraph/math/radical/math-degree-hide.ts create mode 100644 src/file/paragraph/math/radical/math-degree.spec.ts create mode 100644 src/file/paragraph/math/radical/math-degree.ts create mode 100644 src/file/paragraph/math/radical/math-radical-properties.spec.ts create mode 100644 src/file/paragraph/math/radical/math-radical-properties.ts create mode 100644 src/file/paragraph/math/radical/math-radical.spec.ts create mode 100644 src/file/paragraph/math/radical/math-radical.ts create mode 100644 src/file/paragraph/math/script/index.ts create mode 100644 src/file/paragraph/math/script/pre-sub-super-script/index.ts create mode 100644 src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts create mode 100644 src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.ts create mode 100644 src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts create mode 100644 src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts create mode 100644 src/file/paragraph/math/script/sub-script/index.ts create mode 100644 src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts create mode 100644 src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.ts create mode 100644 src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts create mode 100644 src/file/paragraph/math/script/sub-script/math-sub-script-function.ts create mode 100644 src/file/paragraph/math/script/sub-super-script/index.ts create mode 100644 src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts create mode 100644 src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.ts create mode 100644 src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts create mode 100644 src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts create mode 100644 src/file/paragraph/math/script/super-script/index.ts create mode 100644 src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts create mode 100644 src/file/paragraph/math/script/super-script/math-super-script-function-properties.ts create mode 100644 src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts create mode 100644 src/file/paragraph/math/script/super-script/math-super-script-function.ts diff --git a/demo/47-math.ts b/demo/47-math.ts deleted file mode 100644 index 5cad1707de..0000000000 --- a/demo/47-math.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Simple example to add text to a document -// Import from 'docx' rather than '../build' if you install from npm -import * as fs from "fs"; -import { Document, Math, MathDenominator, MathFraction, MathNumerator, MathRun, MathSum, Packer, Paragraph, TextRun } from "../build"; - -const doc = new Document(); - -doc.addSection({ - properties: {}, - children: [ - new Paragraph({ - children: [ - new Math({ - children: [ - new MathRun("2+2"), - new MathFraction({ - numerator: new MathNumerator("hi"), - denominator: new MathDenominator("2"), - }), - ], - }), - new TextRun({ - text: "Foo Bar", - bold: true, - }), - ], - }), - new Paragraph({ - children: [ - new Math({ - children: [ - new MathSum({ - child: new MathRun("test"), - }), - ], - }), - ], - }), - ], -}); - -Packer.toBuffer(doc).then((buffer) => { - fs.writeFileSync("My Document.docx", buffer); -}); diff --git a/demo/55-math.ts b/demo/55-math.ts new file mode 100644 index 0000000000..92993a695a --- /dev/null +++ b/demo/55-math.ts @@ -0,0 +1,259 @@ +// Simple example to add text to a document +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { + Document, + Math, + MathAngledBrackets, + MathCurlyBrackets, + MathDenominator, + MathFraction, + MathFunction, + MathNumerator, + MathPreSubSuperScript, + MathRadical, + MathRoundBrackets, + MathRun, + MathSquareBrackets, + MathSubScript, + MathSubSuperScript, + MathSum, + MathSuperScript, + Packer, + Paragraph, + TextRun, +} from "../build"; + +const doc = new Document(); + +doc.addSection({ + properties: {}, + children: [ + new Paragraph({ + children: [ + new Math({ + children: [ + new MathRun("2+2"), + new MathFraction({ + numerator: new MathNumerator("hi"), + denominator: new MathDenominator("2"), + }), + ], + }), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSum({ + child: new MathRun("test"), + }), + new MathSum({ + child: new MathSuperScript({ + child: new MathRun("e"), + superScript: new MathRun("2"), + }), + subScript: new MathRun("i"), + }), + new MathSum({ + child: new MathRadical({ + child: new MathRun("i"), + }), + subScript: new MathRun("i"), + superScript: new MathRun("10"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSuperScript({ + child: new MathRun("test"), + superScript: new MathRun("hello"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSubScript({ + child: new MathRun("test"), + subScript: new MathRun("hello"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSubScript({ + child: new MathRun("x"), + subScript: new MathSuperScript({ + child: new MathRun("y"), + superScript: new MathRun("2"), + }), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSubSuperScript({ + child: new MathRun("test"), + superScript: new MathRun("hello"), + subScript: new MathRun("world"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathPreSubSuperScript({ + child: new MathRun("test"), + superScript: new MathRun("hello"), + subScript: new MathRun("world"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSubScript({ + child: new MathFraction({ + numerator: new MathNumerator("1"), + denominator: new MathDenominator("2"), + }), + subScript: new MathRun("4"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSubScript({ + child: new MathRadical({ + child: new MathFraction({ + numerator: new MathNumerator("1"), + denominator: new MathDenominator("2"), + }), + degree: new MathRun("4"), + }), + subScript: new MathRun("x"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathRadical({ + child: new MathRun("4"), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathFunction({ + name: new MathSuperScript({ + child: new MathRun("cos"), + superScript: new MathRun("-1"), + }), + child: new MathRun("100"), + }), + new MathRun("×"), + new MathFunction({ + name: new MathRun("sin"), + child: new MathRun("360"), + }), + new MathRun("= x"), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathRoundBrackets({ + child: new MathFraction({ + numerator: new MathNumerator("1"), + denominator: new MathDenominator("2"), + }), + }), + new MathSquareBrackets({ + child: new MathFraction({ + numerator: new MathNumerator("1"), + denominator: new MathDenominator("2"), + }), + }), + new MathCurlyBrackets({ + child: new MathFraction({ + numerator: new MathNumerator("1"), + denominator: new MathDenominator("2"), + }), + }), + new MathAngledBrackets({ + child: new MathFraction({ + numerator: new MathNumerator("1"), + denominator: new MathDenominator("2"), + }), + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathFraction({ + numerator: new Math({ + children: [ + new MathRadical({ + child: new MathRun("4"), + }), + ], + }), + demoninator: new MathRun("2a"), + }), + ], + }), + ], + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); diff --git a/package-lock.json b/package-lock.json index d73f9f5d71..7d28a68d7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1088,7 +1088,7 @@ }, "awesome-typescript-loader": { "version": "3.5.0", - "resolved": "http://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-3.5.0.tgz", + "resolved": "https://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-3.5.0.tgz", "integrity": "sha512-qzgm9SEvodVkSi9QY7Me1/rujg+YBNMjayNSAyzNghwTEez++gXoPCwMvpbHRG7wrOkDCiF6dquvv9ESmUBAuw==", "dev": true, "requires": { @@ -1665,7 +1665,7 @@ }, "chai": { "version": "3.5.0", - "resolved": "http://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", "dev": true, "requires": { @@ -2153,7 +2153,7 @@ }, "deep-eql": { "version": "0.1.3", - "resolved": "http://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", "dev": true, "requires": { @@ -4373,7 +4373,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "dev": true }, "is-ci": { @@ -4843,7 +4843,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -5098,7 +5098,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -5395,7 +5395,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -5585,7 +5585,7 @@ }, "ncp": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz", "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=", "dev": true }, @@ -5603,7 +5603,7 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, @@ -7116,7 +7116,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -7719,7 +7719,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, @@ -7996,10 +7996,13 @@ } }, "tslint-immutable": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/tslint-immutable/-/tslint-immutable-4.9.1.tgz", - "integrity": "sha512-iIFCq08H4YyNIX0bV5N6fGQtAmjc4OQZKQCgBP5WHgQaITyGAHPVmAw+Yf7qe0zbRCvCDZdrdEC/191fLGFiww==", - "dev": true + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/tslint-immutable/-/tslint-immutable-6.0.1.tgz", + "integrity": "sha512-3GQ6HffN64gLmT/N1YzyVMqyf6uBjMvhNaevK8B0K01/QC0OU5AQZrH4TjMHo1IdG3JpqsZvuRy9IW1LA3zjwA==", + "dev": true, + "requires": { + "tsutils": "^2.28.0 || ^3.0.0" + } }, "tsutils": { "version": "2.29.0", @@ -8654,7 +8657,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8855,7 +8858,7 @@ }, "winston": { "version": "2.1.1", - "resolved": "http://registry.npmjs.org/winston/-/winston-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz", "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=", "dev": true, "requires": { diff --git a/package.json b/package.json index 51e1b246c3..f9a27f0fcb 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "sinon": "^9.0.2", "ts-node": "^9.0.0", "tslint": "^6.1.3", - "tslint-immutable": "^4.9.0", + "tslint-immutable": "^6.0.1", "typedoc": "^0.16.11", "typescript": "2.9.2", "webpack": "^3.10.0" diff --git a/src/file/drawing/inline/inline.ts b/src/file/drawing/inline/inline.ts index 7c40e7c3b3..bf83e36764 100644 --- a/src/file/drawing/inline/inline.ts +++ b/src/file/drawing/inline/inline.ts @@ -12,7 +12,7 @@ export class Inline extends XmlComponent { private readonly extent: Extent; private readonly graphic: Graphic; - constructor(readonly mediaData: IMediaData, private readonly dimensions: IMediaDataDimensions) { + constructor(mediaData: IMediaData, private readonly dimensions: IMediaDataDimensions) { super("wp:inline"); this.root.push( diff --git a/src/file/paragraph/math/brackets/index.ts b/src/file/paragraph/math/brackets/index.ts new file mode 100644 index 0000000000..e6559cde29 --- /dev/null +++ b/src/file/paragraph/math/brackets/index.ts @@ -0,0 +1,4 @@ +export * from "./math-round-brackets"; +export * from "./math-square-brackets"; +export * from "./math-curly-brackets"; +export * from "./math-angled-brackets"; diff --git a/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts b/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts new file mode 100644 index 0000000000..735e0da272 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts @@ -0,0 +1,51 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathAngledBrackets } from "./math-angled-brackets"; + +describe("MathAngledBrackets", () => { + describe("#constructor()", () => { + it("should create a MathAngledBrackets with correct root key", () => { + const mathAngledBrackets = new MathAngledBrackets({ + child: new MathRun("60"), + }); + + const tree = new Formatter().format(mathAngledBrackets); + expect(tree).to.deep.equal({ + "m:d": [ + { + "m:dPr": [ + { + "m:begChr": { + _attr: { + "m:val": "〈", + }, + }, + }, + { + "m:endChr": { + _attr: { + "m:val": "〉", + }, + }, + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["60"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-angled-brackets.ts b/src/file/paragraph/math/brackets/math-angled-brackets.ts new file mode 100644 index 0000000000..fbafb7e738 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-angled-brackets.ts @@ -0,0 +1,20 @@ +// http://www.datypic.com/sc/ooxml/e-m_d-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../math-component"; +import { MathBase } from "../n-ary"; +import { MathBracketProperties } from "./math-bracket-properties"; + +export class MathAngledBrackets extends XmlComponent { + constructor(options: { readonly child: MathComponent }) { + super("m:d"); + + this.root.push( + new MathBracketProperties({ + beginningCharacter: "〈", + endingCharacter: "〉", + }), + ); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/brackets/math-beginning-character.spec.ts b/src/file/paragraph/math/brackets/math-beginning-character.spec.ts new file mode 100644 index 0000000000..bf9196c0a9 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-beginning-character.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathBeginningCharacter } from "./math-beginning-character"; + +describe("MathBeginningCharacter", () => { + describe("#constructor()", () => { + it("should create a MathBeginningCharacter with correct root key", () => { + const mathBeginningCharacter = new MathBeginningCharacter("["); + + const tree = new Formatter().format(mathBeginningCharacter); + expect(tree).to.deep.equal({ + "m:begChr": { + _attr: { + "m:val": "[", + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-beginning-character.ts b/src/file/paragraph/math/brackets/math-beginning-character.ts new file mode 100644 index 0000000000..aa9e06d87a --- /dev/null +++ b/src/file/paragraph/math/brackets/math-beginning-character.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_begChr-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathBeginningCharacterAttributes extends XmlAttributeComponent<{ readonly character: string }> { + protected readonly xmlKeys = { character: "m:val" }; +} + +export class MathBeginningCharacter extends XmlComponent { + constructor(character: string) { + super("m:begChr"); + + this.root.push(new MathBeginningCharacterAttributes({ character })); + } +} diff --git a/src/file/paragraph/math/brackets/math-bracket-properties.spec.ts b/src/file/paragraph/math/brackets/math-bracket-properties.spec.ts new file mode 100644 index 0000000000..d80976d8f6 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-bracket-properties.spec.ts @@ -0,0 +1,45 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathBracketProperties } from "./math-bracket-properties"; + +describe("MathBracketProperties", () => { + describe("#constructor()", () => { + it("should create a MathBracketProperties with correct root key", () => { + const mathBracketProperties = new MathBracketProperties(); + + const tree = new Formatter().format(mathBracketProperties); + expect(tree).to.deep.equal({ + "m:dPr": {}, + }); + }); + + it("should create a MathBracketProperties with correct root key and add brackets", () => { + const mathBracketProperties = new MathBracketProperties({ + beginningCharacter: "[", + endingCharacter: "]", + }); + + const tree = new Formatter().format(mathBracketProperties); + expect(tree).to.deep.equal({ + "m:dPr": [ + { + "m:begChr": { + _attr: { + "m:val": "[", + }, + }, + }, + { + "m:endChr": { + _attr: { + "m:val": "]", + }, + }, + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-bracket-properties.ts b/src/file/paragraph/math/brackets/math-bracket-properties.ts new file mode 100644 index 0000000000..5bba7bf935 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-bracket-properties.ts @@ -0,0 +1,16 @@ +// http://www.datypic.com/sc/ooxml/e-m_dPr-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathBeginningCharacter } from "./math-beginning-character"; +import { MathEndingCharacter } from "./math-ending-char"; + +export class MathBracketProperties extends XmlComponent { + constructor(options?: { readonly beginningCharacter: string; readonly endingCharacter: string }) { + super("m:dPr"); + + if (!!options) { + this.root.push(new MathBeginningCharacter(options.beginningCharacter)); + this.root.push(new MathEndingCharacter(options.endingCharacter)); + } + } +} diff --git a/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts b/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts new file mode 100644 index 0000000000..6e44621b21 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts @@ -0,0 +1,51 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathCurlyBrackets } from "./math-curly-brackets"; + +describe("MathCurlyBrackets", () => { + describe("#constructor()", () => { + it("should create a MathCurlyBrackets with correct root key", () => { + const mathCurlyBrackets = new MathCurlyBrackets({ + child: new MathRun("60"), + }); + + const tree = new Formatter().format(mathCurlyBrackets); + expect(tree).to.deep.equal({ + "m:d": [ + { + "m:dPr": [ + { + "m:begChr": { + _attr: { + "m:val": "{", + }, + }, + }, + { + "m:endChr": { + _attr: { + "m:val": "}", + }, + }, + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["60"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-curly-brackets.ts b/src/file/paragraph/math/brackets/math-curly-brackets.ts new file mode 100644 index 0000000000..4d540ec8bc --- /dev/null +++ b/src/file/paragraph/math/brackets/math-curly-brackets.ts @@ -0,0 +1,20 @@ +// http://www.datypic.com/sc/ooxml/e-m_d-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../math-component"; +import { MathBase } from "../n-ary"; +import { MathBracketProperties } from "./math-bracket-properties"; + +export class MathCurlyBrackets extends XmlComponent { + constructor(options: { readonly child: MathComponent }) { + super("m:d"); + + this.root.push( + new MathBracketProperties({ + beginningCharacter: "{", + endingCharacter: "}", + }), + ); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/brackets/math-ending-char.ts b/src/file/paragraph/math/brackets/math-ending-char.ts new file mode 100644 index 0000000000..86d0a0a58c --- /dev/null +++ b/src/file/paragraph/math/brackets/math-ending-char.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_endChr-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathEndingCharacterAttributes extends XmlAttributeComponent<{ readonly character: string }> { + protected readonly xmlKeys = { character: "m:val" }; +} + +export class MathEndingCharacter extends XmlComponent { + constructor(character: string) { + super("m:endChr"); + + this.root.push(new MathEndingCharacterAttributes({ character })); + } +} diff --git a/src/file/paragraph/math/brackets/math-ending-character.spec.ts b/src/file/paragraph/math/brackets/math-ending-character.spec.ts new file mode 100644 index 0000000000..ba28ac7840 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-ending-character.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathEndingCharacter } from "./math-ending-char"; + +describe("MathEndingCharacter", () => { + describe("#constructor()", () => { + it("should create a MathEndingCharacter with correct root key", () => { + const mathEndingCharacter = new MathEndingCharacter("]"); + + const tree = new Formatter().format(mathEndingCharacter); + expect(tree).to.deep.equal({ + "m:endChr": { + _attr: { + "m:val": "]", + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-round-brackets.spec.ts b/src/file/paragraph/math/brackets/math-round-brackets.spec.ts new file mode 100644 index 0000000000..cb28126a20 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-round-brackets.spec.ts @@ -0,0 +1,36 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathRoundBrackets } from "./math-round-brackets"; + +describe("MathRoundBrackets", () => { + describe("#constructor()", () => { + it("should create a MathRoundBrackets with correct root key", () => { + const mathRoundBrackets = new MathRoundBrackets({ + child: new MathRun("60"), + }); + + const tree = new Formatter().format(mathRoundBrackets); + expect(tree).to.deep.equal({ + "m:d": [ + { + "m:dPr": {}, + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["60"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-round-brackets.ts b/src/file/paragraph/math/brackets/math-round-brackets.ts new file mode 100644 index 0000000000..2302fa30f1 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-round-brackets.ts @@ -0,0 +1,15 @@ +// http://www.datypic.com/sc/ooxml/e-m_d-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../math-component"; +import { MathBase } from "../n-ary"; +import { MathBracketProperties } from "./math-bracket-properties"; + +export class MathRoundBrackets extends XmlComponent { + constructor(options: { readonly child: MathComponent }) { + super("m:d"); + + this.root.push(new MathBracketProperties()); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/brackets/math-square-brackets.spec.ts b/src/file/paragraph/math/brackets/math-square-brackets.spec.ts new file mode 100644 index 0000000000..03b8aef03d --- /dev/null +++ b/src/file/paragraph/math/brackets/math-square-brackets.spec.ts @@ -0,0 +1,51 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathSquareBrackets } from "./math-square-brackets"; + +describe("MathSquareBrackets", () => { + describe("#constructor()", () => { + it("should create a MathSquareBrackets with correct root key", () => { + const mathSquareBrackets = new MathSquareBrackets({ + child: new MathRun("60"), + }); + + const tree = new Formatter().format(mathSquareBrackets); + expect(tree).to.deep.equal({ + "m:d": [ + { + "m:dPr": [ + { + "m:begChr": { + _attr: { + "m:val": "[", + }, + }, + }, + { + "m:endChr": { + _attr: { + "m:val": "]", + }, + }, + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["60"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/brackets/math-square-brackets.ts b/src/file/paragraph/math/brackets/math-square-brackets.ts new file mode 100644 index 0000000000..3c3d385357 --- /dev/null +++ b/src/file/paragraph/math/brackets/math-square-brackets.ts @@ -0,0 +1,20 @@ +// http://www.datypic.com/sc/ooxml/e-m_d-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../math-component"; +import { MathBase } from "../n-ary"; +import { MathBracketProperties } from "./math-bracket-properties"; + +export class MathSquareBrackets extends XmlComponent { + constructor(options: { readonly child: MathComponent }) { + super("m:d"); + + this.root.push( + new MathBracketProperties({ + beginningCharacter: "[", + endingCharacter: "]", + }), + ); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/fraction/math-denominator.ts b/src/file/paragraph/math/fraction/math-denominator.ts index da9f283bdc..f640324c2e 100644 --- a/src/file/paragraph/math/fraction/math-denominator.ts +++ b/src/file/paragraph/math/fraction/math-denominator.ts @@ -3,7 +3,7 @@ import { XmlComponent } from "file/xml-components"; import { MathRun } from "../math-run"; export class MathDenominator extends XmlComponent { - constructor(readonly text: string) { + constructor(text: string) { super("m:den"); this.root.push(new MathRun(text)); diff --git a/src/file/paragraph/math/fraction/math-fraction.ts b/src/file/paragraph/math/fraction/math-fraction.ts index 062c3ef575..574a989bba 100644 --- a/src/file/paragraph/math/fraction/math-fraction.ts +++ b/src/file/paragraph/math/fraction/math-fraction.ts @@ -9,7 +9,7 @@ export interface IMathFractionOptions { } export class MathFraction extends XmlComponent { - constructor(readonly options: IMathFractionOptions) { + constructor(options: IMathFractionOptions) { super("m:f"); this.root.push(options.numerator); diff --git a/src/file/paragraph/math/fraction/math-numerator.ts b/src/file/paragraph/math/fraction/math-numerator.ts index 68799328cb..f7e68715b8 100644 --- a/src/file/paragraph/math/fraction/math-numerator.ts +++ b/src/file/paragraph/math/fraction/math-numerator.ts @@ -3,7 +3,7 @@ import { XmlComponent } from "file/xml-components"; import { MathRun } from "../math-run"; export class MathNumerator extends XmlComponent { - constructor(readonly text: string) { + constructor(text: string) { super("m:num"); this.root.push(new MathRun(text)); diff --git a/src/file/paragraph/math/function/index.ts b/src/file/paragraph/math/function/index.ts new file mode 100644 index 0000000000..58243c2710 --- /dev/null +++ b/src/file/paragraph/math/function/index.ts @@ -0,0 +1,3 @@ +export * from "./math-function"; +export * from "./math-function-name"; +export * from "./math-function-properties"; diff --git a/src/file/paragraph/math/function/math-function-name.spec.ts b/src/file/paragraph/math/function/math-function-name.spec.ts new file mode 100644 index 0000000000..bdb38d7596 --- /dev/null +++ b/src/file/paragraph/math/function/math-function-name.spec.ts @@ -0,0 +1,27 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathFunctionName } from "./math-function-name"; + +describe("MathFunctionName", () => { + describe("#constructor()", () => { + it("should create a MathFunctionName with correct root key", () => { + const mathFunctionName = new MathFunctionName(new MathRun("2")); + + const tree = new Formatter().format(mathFunctionName); + expect(tree).to.deep.equal({ + "m:fName": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/function/math-function-name.ts b/src/file/paragraph/math/function/math-function-name.ts new file mode 100644 index 0000000000..011e82133a --- /dev/null +++ b/src/file/paragraph/math/function/math-function-name.ts @@ -0,0 +1,11 @@ +// http://www.datypic.com/sc/ooxml/e-m_fName-1.html +import { XmlComponent } from "file/xml-components"; +import { MathComponent } from "../math-component"; + +export class MathFunctionName extends XmlComponent { + constructor(child: MathComponent) { + super("m:fName"); + + this.root.push(child); + } +} diff --git a/src/file/paragraph/math/function/math-function-properties.spec.ts b/src/file/paragraph/math/function/math-function-properties.spec.ts new file mode 100644 index 0000000000..63ec2e4f60 --- /dev/null +++ b/src/file/paragraph/math/function/math-function-properties.spec.ts @@ -0,0 +1,18 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathFunctionProperties } from "./math-function-properties"; + +describe("MathFunctionProperties", () => { + describe("#constructor()", () => { + it("should create a MathFunctionProperties with correct root key", () => { + const mathFunctionProperties = new MathFunctionProperties(); + + const tree = new Formatter().format(mathFunctionProperties); + expect(tree).to.deep.equal({ + "m:funcPr": {}, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/function/math-function-properties.ts b/src/file/paragraph/math/function/math-function-properties.ts new file mode 100644 index 0000000000..f6e8d608ac --- /dev/null +++ b/src/file/paragraph/math/function/math-function-properties.ts @@ -0,0 +1,8 @@ +// http://www.datypic.com/sc/ooxml/e-m_radPr-1.html +import { XmlComponent } from "file/xml-components"; + +export class MathFunctionProperties extends XmlComponent { + constructor() { + super("m:funcPr"); + } +} diff --git a/src/file/paragraph/math/function/math-function.spec.ts b/src/file/paragraph/math/function/math-function.spec.ts new file mode 100644 index 0000000000..4320a853c6 --- /dev/null +++ b/src/file/paragraph/math/function/math-function.spec.ts @@ -0,0 +1,48 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathFunction } from "./math-function"; + +describe("MathFunction", () => { + describe("#constructor()", () => { + it("should create a MathFunction with correct root key", () => { + const mathFunction = new MathFunction({ + name: new MathRun("sin"), + child: new MathRun("60"), + }); + + const tree = new Formatter().format(mathFunction); + expect(tree).to.deep.equal({ + "m:func": [ + { + "m:funcPr": {}, + }, + { + "m:fName": [ + { + "m:r": [ + { + "m:t": ["sin"], + }, + ], + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["60"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/function/math-function.ts b/src/file/paragraph/math/function/math-function.ts new file mode 100644 index 0000000000..b3de75ddb8 --- /dev/null +++ b/src/file/paragraph/math/function/math-function.ts @@ -0,0 +1,22 @@ +// http://www.datypic.com/sc/ooxml/e-m_func-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../math-component"; +import { MathBase } from "../n-ary"; +import { MathFunctionName } from "./math-function-name"; +import { MathFunctionProperties } from "./math-function-properties"; + +export interface IMathFunctionOptions { + readonly child: MathComponent; + readonly name: MathComponent; +} + +export class MathFunction extends XmlComponent { + constructor(options: IMathFunctionOptions) { + super("m:func"); + + this.root.push(new MathFunctionProperties()); + this.root.push(new MathFunctionName(options.name)); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/index.ts b/src/file/paragraph/math/index.ts index 063678689c..b42ec908f6 100644 --- a/src/file/paragraph/math/index.ts +++ b/src/file/paragraph/math/index.ts @@ -2,3 +2,8 @@ export * from "./math"; export * from "./math-run"; export * from "./fraction"; export * from "./n-ary"; +export * from "./script"; +export * from "./math-component"; +export * from "./radical"; +export * from "./function"; +export * from "./brackets"; diff --git a/src/file/paragraph/math/math-component.ts b/src/file/paragraph/math/math-component.ts new file mode 100644 index 0000000000..afe83235f4 --- /dev/null +++ b/src/file/paragraph/math/math-component.ts @@ -0,0 +1,21 @@ +import { MathAngledBrackets, MathCurlyBrackets, MathRoundBrackets, MathSquareBrackets } from "./brackets"; +import { MathFraction } from "./fraction"; +import { MathFunction } from "./function"; +import { MathRun } from "./math-run"; +import { MathSum } from "./n-ary"; +import { MathRadical } from "./radical"; +import { MathSubScript, MathSubSuperScript, MathSuperScript } from "./script"; + +export type MathComponent = + | MathRun + | MathFraction + | MathSum + | MathSuperScript + | MathSubScript + | MathSubSuperScript + | MathRadical + | MathFunction + | MathRoundBrackets + | MathCurlyBrackets + | MathAngledBrackets + | MathSquareBrackets; diff --git a/src/file/paragraph/math/math-run.ts b/src/file/paragraph/math/math-run.ts index 3b7cceb362..0d2c48910f 100644 --- a/src/file/paragraph/math/math-run.ts +++ b/src/file/paragraph/math/math-run.ts @@ -4,7 +4,7 @@ import { XmlComponent } from "file/xml-components"; import { MathText } from "./math-text"; export class MathRun extends XmlComponent { - constructor(readonly text: string) { + constructor(text: string) { super("m:r"); this.root.push(new MathText(text)); diff --git a/src/file/paragraph/math/math-text.ts b/src/file/paragraph/math/math-text.ts index 907294aab9..6087c7e611 100644 --- a/src/file/paragraph/math/math-text.ts +++ b/src/file/paragraph/math/math-text.ts @@ -1,7 +1,7 @@ import { XmlComponent } from "file/xml-components"; export class MathText extends XmlComponent { - constructor(readonly text: string) { + constructor(text: string) { super("m:t"); this.root.push(text); diff --git a/src/file/paragraph/math/math.ts b/src/file/paragraph/math/math.ts index 43272ed941..69ebae4dff 100644 --- a/src/file/paragraph/math/math.ts +++ b/src/file/paragraph/math/math.ts @@ -1,16 +1,14 @@ // http://www.datypic.com/sc/ooxml/e-m_oMath-1.html import { XmlComponent } from "file/xml-components"; -import { MathFraction } from "./fraction"; -import { MathRun } from "./math-run"; -import { MathSum } from "./n-ary"; +import { MathComponent } from "./math-component"; export interface IMathOptions { - readonly children: Array; + readonly children: MathComponent[]; } export class Math extends XmlComponent { - constructor(readonly options: IMathOptions) { + constructor(options: IMathOptions) { super("m:oMath"); for (const child of options.children) { diff --git a/src/file/paragraph/math/n-ary/math-accent-character.ts b/src/file/paragraph/math/n-ary/math-accent-character.ts index 3a5a10d7d2..00182bd1f2 100644 --- a/src/file/paragraph/math/n-ary/math-accent-character.ts +++ b/src/file/paragraph/math/n-ary/math-accent-character.ts @@ -6,7 +6,7 @@ class MathAccentCharacterAttributes extends XmlAttributeComponent<{ readonly acc } export class MathAccentCharacter extends XmlComponent { - constructor(readonly accent: string) { + constructor(accent: string) { super("m:chr"); this.root.push(new MathAccentCharacterAttributes({ accent })); diff --git a/src/file/paragraph/math/n-ary/math-base.ts b/src/file/paragraph/math/n-ary/math-base.ts index e75231cdb2..7c06a67c23 100644 --- a/src/file/paragraph/math/n-ary/math-base.ts +++ b/src/file/paragraph/math/n-ary/math-base.ts @@ -1,10 +1,10 @@ // http://www.datypic.com/sc/ooxml/e-m_e-1.html import { XmlComponent } from "file/xml-components"; -import { MathRun } from "../math-run"; +import { MathComponent } from "../math-component"; export class MathBase extends XmlComponent { - constructor(readonly run: MathRun) { + constructor(run: MathComponent) { super("m:e"); this.root.push(run); diff --git a/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts b/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts index 01ac55fb03..70aa74a1c4 100644 --- a/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts +++ b/src/file/paragraph/math/n-ary/math-naray-properties.spec.ts @@ -7,7 +7,7 @@ import { MathNArayProperties } from "./math-naray-properties"; describe("MathNArayProperties", () => { describe("#constructor()", () => { it("should create a MathNArayProperties with correct root key", () => { - const mathNArayProperties = new MathNArayProperties("∑"); + const mathNArayProperties = new MathNArayProperties("∑", true, true); const tree = new Formatter().format(mathNArayProperties); expect(tree).to.deep.equal({ @@ -29,5 +29,105 @@ describe("MathNArayProperties", () => { ], }); }); + + it("should add super-script hide attributes", () => { + const mathNArayProperties = new MathNArayProperties("∑", false, true); + + const tree = new Formatter().format(mathNArayProperties); + expect(tree).to.deep.equal({ + "m:naryPr": [ + { + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }, + { + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }, + { + "m:supHide": { + _attr: { + "m:val": 1, + }, + }, + }, + ], + }); + }); + + it("should add sub-script hide attributes", () => { + const mathNArayProperties = new MathNArayProperties("∑", true, false); + + const tree = new Formatter().format(mathNArayProperties); + expect(tree).to.deep.equal({ + "m:naryPr": [ + { + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }, + { + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }, + { + "m:subHide": { + _attr: { + "m:val": 1, + }, + }, + }, + ], + }); + }); + + it("should add both super-script and sub-script hide attributes", () => { + const mathNArayProperties = new MathNArayProperties("∑", false, false); + + const tree = new Formatter().format(mathNArayProperties); + expect(tree).to.deep.equal({ + "m:naryPr": [ + { + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }, + { + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }, + { + "m:supHide": { + _attr: { + "m:val": 1, + }, + }, + }, + { + "m:subHide": { + _attr: { + "m:val": 1, + }, + }, + }, + ], + }); + }); }); }); diff --git a/src/file/paragraph/math/n-ary/math-naray-properties.ts b/src/file/paragraph/math/n-ary/math-naray-properties.ts index 4b28b58794..f8e91e746a 100644 --- a/src/file/paragraph/math/n-ary/math-naray-properties.ts +++ b/src/file/paragraph/math/n-ary/math-naray-properties.ts @@ -3,12 +3,22 @@ import { XmlComponent } from "file/xml-components"; import { MathAccentCharacter } from "./math-accent-character"; import { MathLimitLocation } from "./math-limit-location"; +import { MathSubScriptHide } from "./math-sub-script-hide"; +import { MathSuperScriptHide } from "./math-super-script-hide"; export class MathNArayProperties extends XmlComponent { - constructor(readonly accent: string) { + constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean) { super("m:naryPr"); this.root.push(new MathAccentCharacter(accent)); this.root.push(new MathLimitLocation()); + + if (!hasSuperScript) { + this.root.push(new MathSuperScriptHide()); + } + + if (!hasSubScript) { + this.root.push(new MathSubScriptHide()); + } } } diff --git a/src/file/paragraph/math/n-ary/math-sub-script-hide.spec.ts b/src/file/paragraph/math/n-ary/math-sub-script-hide.spec.ts new file mode 100644 index 0000000000..2e9845172f --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-sub-script-hide.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathSubScriptHide } from "./math-sub-script-hide"; + +describe("MathSubScriptHide", () => { + describe("#constructor()", () => { + it("should create a MathSubScriptHide with correct root key", () => { + const mathSubScriptHide = new MathSubScriptHide(); + + const tree = new Formatter().format(mathSubScriptHide); + expect(tree).to.deep.equal({ + "m:subHide": { + _attr: { + "m:val": 1, + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-sub-script-hide.ts b/src/file/paragraph/math/n-ary/math-sub-script-hide.ts new file mode 100644 index 0000000000..ef735744e0 --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-sub-script-hide.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_subHide-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathSubScriptHideAttributes extends XmlAttributeComponent<{ readonly hide: number }> { + protected readonly xmlKeys = { hide: "m:val" }; +} + +export class MathSubScriptHide extends XmlComponent { + constructor() { + super("m:subHide"); + + this.root.push(new MathSubScriptHideAttributes({ hide: 1 })); + } +} diff --git a/src/file/paragraph/math/n-ary/math-sub-script.spec.ts b/src/file/paragraph/math/n-ary/math-sub-script.spec.ts index d09908b192..5a4009811e 100644 --- a/src/file/paragraph/math/n-ary/math-sub-script.spec.ts +++ b/src/file/paragraph/math/n-ary/math-sub-script.spec.ts @@ -3,14 +3,14 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; import { MathRun } from "../math-run"; -import { MathSubScript } from "./math-sub-script"; +import { MathSubScriptElement } from "./math-sub-script"; -describe("MathSubScript", () => { +describe("MathSubScriptElement", () => { describe("#constructor()", () => { - it("should create a MathSubScript with correct root key", () => { - const mathSubScript = new MathSubScript(new MathRun("2+2")); + it("should create a MathSubScriptElement with correct root key", () => { + const mathSubScriptElement = new MathSubScriptElement(new MathRun("2+2")); - const tree = new Formatter().format(mathSubScript); + const tree = new Formatter().format(mathSubScriptElement); expect(tree).to.deep.equal({ "m:sub": [ { diff --git a/src/file/paragraph/math/n-ary/math-sub-script.ts b/src/file/paragraph/math/n-ary/math-sub-script.ts index 25fe8da894..aaa8530e74 100644 --- a/src/file/paragraph/math/n-ary/math-sub-script.ts +++ b/src/file/paragraph/math/n-ary/math-sub-script.ts @@ -1,12 +1,12 @@ -// http://www.datypic.com/sc/ooxml/e-m_e-1.html +// http://www.datypic.com/sc/ooxml/e-m_sub-3.html import { XmlComponent } from "file/xml-components"; -import { MathRun } from "../math-run"; +import { MathComponent } from "../math-component"; -export class MathSubScript extends XmlComponent { - constructor(readonly run: MathRun) { +export class MathSubScriptElement extends XmlComponent { + constructor(child: MathComponent) { super("m:sub"); - this.root.push(run); + this.root.push(child); } } diff --git a/src/file/paragraph/math/n-ary/math-sum.spec.ts b/src/file/paragraph/math/n-ary/math-sum.spec.ts index e168792b1f..9f0d213aa4 100644 --- a/src/file/paragraph/math/n-ary/math-sum.spec.ts +++ b/src/file/paragraph/math/n-ary/math-sum.spec.ts @@ -40,7 +40,7 @@ describe("MathSum", () => { { "m:r": [ { - "m:t": ["1"], + "m:t": ["2"], }, ], }, @@ -51,7 +51,7 @@ describe("MathSum", () => { { "m:r": [ { - "m:t": ["1"], + "m:t": ["3"], }, ], }, diff --git a/src/file/paragraph/math/n-ary/math-sum.ts b/src/file/paragraph/math/n-ary/math-sum.ts index 2664b87fad..a16603982d 100644 --- a/src/file/paragraph/math/n-ary/math-sum.ts +++ b/src/file/paragraph/math/n-ary/math-sum.ts @@ -1,25 +1,32 @@ // http://www.datypic.com/sc/ooxml/e-m_nary-1.html import { XmlComponent } from "file/xml-components"; -import { MathRun } from "../math-run"; +import { MathComponent } from "../math-component"; import { MathBase } from "./math-base"; import { MathNArayProperties } from "./math-naray-properties"; -import { MathSubScript } from "./math-sub-script"; -import { MathSuperScript } from "./math-super-script"; +import { MathSubScriptElement } from "./math-sub-script"; +import { MathSuperScriptElement } from "./math-super-script"; export interface IMathSumOptions { - readonly child: MathRun; - readonly subScript?: MathRun; - readonly superScript?: MathRun; + readonly child: MathComponent; + readonly subScript?: MathComponent; + readonly superScript?: MathComponent; } export class MathSum extends XmlComponent { - constructor(readonly options: IMathSumOptions) { + constructor(options: IMathSumOptions) { super("m:nary"); - this.root.push(new MathNArayProperties("∑")); - this.root.push(new MathSubScript(options.child)); - this.root.push(new MathSuperScript(options.child)); + this.root.push(new MathNArayProperties("∑", !!options.superScript, !!options.subScript)); + + if (!!options.subScript) { + this.root.push(new MathSubScriptElement(options.subScript)); + } + + if (!!options.superScript) { + this.root.push(new MathSuperScriptElement(options.superScript)); + } + this.root.push(new MathBase(options.child)); } } diff --git a/src/file/paragraph/math/n-ary/math-super-script-hide.spec.ts b/src/file/paragraph/math/n-ary/math-super-script-hide.spec.ts new file mode 100644 index 0000000000..89a28564ac --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-super-script-hide.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathSuperScriptHide } from "./math-super-script-hide"; + +describe("MathSuperScriptHide", () => { + describe("#constructor()", () => { + it("should create a MathSuperScriptHide with correct root key", () => { + const mathSuperScriptHide = new MathSuperScriptHide(); + + const tree = new Formatter().format(mathSuperScriptHide); + expect(tree).to.deep.equal({ + "m:supHide": { + _attr: { + "m:val": 1, + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/n-ary/math-super-script-hide.ts b/src/file/paragraph/math/n-ary/math-super-script-hide.ts new file mode 100644 index 0000000000..a55c15a7ad --- /dev/null +++ b/src/file/paragraph/math/n-ary/math-super-script-hide.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_subHide-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathSuperScriptHideAttributes extends XmlAttributeComponent<{ readonly hide: number }> { + protected readonly xmlKeys = { hide: "m:val" }; +} + +export class MathSuperScriptHide extends XmlComponent { + constructor() { + super("m:supHide"); + + this.root.push(new MathSuperScriptHideAttributes({ hide: 1 })); + } +} diff --git a/src/file/paragraph/math/n-ary/math-super-script.spec.ts b/src/file/paragraph/math/n-ary/math-super-script.spec.ts index 7270276c28..85a5195c0f 100644 --- a/src/file/paragraph/math/n-ary/math-super-script.spec.ts +++ b/src/file/paragraph/math/n-ary/math-super-script.spec.ts @@ -3,14 +3,14 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; import { MathRun } from "../math-run"; -import { MathSuperScript } from "./math-super-script"; +import { MathSuperScriptElement } from "./math-super-script"; -describe("MathSuperScript", () => { +describe("MathSuperScriptElement", () => { describe("#constructor()", () => { - it("should create a MathSuperScript with correct root key", () => { - const mathSuperScript = new MathSuperScript(new MathRun("2+2")); + it("should create a MathSuperScriptElement with correct root key", () => { + const mathSuperScriptElement = new MathSuperScriptElement(new MathRun("2+2")); - const tree = new Formatter().format(mathSuperScript); + const tree = new Formatter().format(mathSuperScriptElement); expect(tree).to.deep.equal({ "m:sup": [ { diff --git a/src/file/paragraph/math/n-ary/math-super-script.ts b/src/file/paragraph/math/n-ary/math-super-script.ts index 8296c59f6a..1d29bda52b 100644 --- a/src/file/paragraph/math/n-ary/math-super-script.ts +++ b/src/file/paragraph/math/n-ary/math-super-script.ts @@ -1,12 +1,12 @@ -// http://www.datypic.com/sc/ooxml/e-m_e-1.html +// http://www.datypic.com/sc/ooxml/e-m_sup-3.html import { XmlComponent } from "file/xml-components"; -import { MathRun } from "../math-run"; +import { MathComponent } from "../math-component"; -export class MathSuperScript extends XmlComponent { - constructor(readonly run: MathRun) { +export class MathSuperScriptElement extends XmlComponent { + constructor(child: MathComponent) { super("m:sup"); - this.root.push(run); + this.root.push(child); } } diff --git a/src/file/paragraph/math/radical/index.ts b/src/file/paragraph/math/radical/index.ts new file mode 100644 index 0000000000..78240ccd13 --- /dev/null +++ b/src/file/paragraph/math/radical/index.ts @@ -0,0 +1,3 @@ +export * from "./math-degree"; +export * from "./math-radical"; +export * from "./math-radical-properties"; diff --git a/src/file/paragraph/math/radical/math-degree-hide.spec.ts b/src/file/paragraph/math/radical/math-degree-hide.spec.ts new file mode 100644 index 0000000000..0c3f335a13 --- /dev/null +++ b/src/file/paragraph/math/radical/math-degree-hide.spec.ts @@ -0,0 +1,22 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathDegreeHide } from "./math-degree-hide"; + +describe("MathDegreeHide", () => { + describe("#constructor()", () => { + it("should create a MathDegreeHide with correct root key", () => { + const mathDegreeHide = new MathDegreeHide(); + + const tree = new Formatter().format(mathDegreeHide); + expect(tree).to.deep.equal({ + "m:degHide": { + _attr: { + "m:val": 1, + }, + }, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/radical/math-degree-hide.ts b/src/file/paragraph/math/radical/math-degree-hide.ts new file mode 100644 index 0000000000..c1b9dd2ae5 --- /dev/null +++ b/src/file/paragraph/math/radical/math-degree-hide.ts @@ -0,0 +1,14 @@ +// http://www.datypic.com/sc/ooxml/e-m_degHide-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +class MathDegreeHideAttributes extends XmlAttributeComponent<{ readonly hide: number }> { + protected readonly xmlKeys = { hide: "m:val" }; +} + +export class MathDegreeHide extends XmlComponent { + constructor() { + super("m:degHide"); + + this.root.push(new MathDegreeHideAttributes({ hide: 1 })); + } +} diff --git a/src/file/paragraph/math/radical/math-degree.spec.ts b/src/file/paragraph/math/radical/math-degree.spec.ts new file mode 100644 index 0000000000..6a1c28656b --- /dev/null +++ b/src/file/paragraph/math/radical/math-degree.spec.ts @@ -0,0 +1,36 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathDegree } from "./math-degree"; + +describe("MathDegree", () => { + describe("#constructor()", () => { + it("should create a MathDegree with correct root key", () => { + const mathDegree = new MathDegree(); + + const tree = new Formatter().format(mathDegree); + expect(tree).to.deep.equal({ + "m:deg": {}, + }); + }); + + it("should create a MathDegree with correct root key with child", () => { + const mathDegree = new MathDegree(new MathRun("2")); + + const tree = new Formatter().format(mathDegree); + expect(tree).to.deep.equal({ + "m:deg": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/radical/math-degree.ts b/src/file/paragraph/math/radical/math-degree.ts new file mode 100644 index 0000000000..402ee8ffda --- /dev/null +++ b/src/file/paragraph/math/radical/math-degree.ts @@ -0,0 +1,13 @@ +// http://www.datypic.com/sc/ooxml/e-m_deg-1.html +import { XmlComponent } from "file/xml-components"; +import { MathComponent } from "../math-component"; + +export class MathDegree extends XmlComponent { + constructor(child?: MathComponent) { + super("m:deg"); + + if (!!child) { + this.root.push(child); + } + } +} diff --git a/src/file/paragraph/math/radical/math-radical-properties.spec.ts b/src/file/paragraph/math/radical/math-radical-properties.spec.ts new file mode 100644 index 0000000000..12d29a2962 --- /dev/null +++ b/src/file/paragraph/math/radical/math-radical-properties.spec.ts @@ -0,0 +1,35 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRadicalProperties } from "./math-radical-properties"; + +describe("MathRadicalProperties", () => { + describe("#constructor()", () => { + it("should create a MathRadicalProperties with correct root key", () => { + const mathRadicalProperties = new MathRadicalProperties(true); + + const tree = new Formatter().format(mathRadicalProperties); + expect(tree).to.deep.equal({ + "m:radPr": {}, + }); + }); + + it("should create a MathRadicalProperties with correct root key with degree hide", () => { + const mathRadicalProperties = new MathRadicalProperties(false); + + const tree = new Formatter().format(mathRadicalProperties); + expect(tree).to.deep.equal({ + "m:radPr": [ + { + "m:degHide": { + _attr: { + "m:val": 1, + }, + }, + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/radical/math-radical-properties.ts b/src/file/paragraph/math/radical/math-radical-properties.ts new file mode 100644 index 0000000000..b4e90ed4df --- /dev/null +++ b/src/file/paragraph/math/radical/math-radical-properties.ts @@ -0,0 +1,13 @@ +// http://www.datypic.com/sc/ooxml/e-m_radPr-1.html +import { XmlComponent } from "file/xml-components"; +import { MathDegreeHide } from "./math-degree-hide"; + +export class MathRadicalProperties extends XmlComponent { + constructor(hasDegree: boolean) { + super("m:radPr"); + + if (!hasDegree) { + this.root.push(new MathDegreeHide()); + } + } +} diff --git a/src/file/paragraph/math/radical/math-radical.spec.ts b/src/file/paragraph/math/radical/math-radical.spec.ts new file mode 100644 index 0000000000..7d7d7c4225 --- /dev/null +++ b/src/file/paragraph/math/radical/math-radical.spec.ts @@ -0,0 +1,48 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../math-run"; +import { MathRadical } from "./math-radical"; + +describe("MathRadical", () => { + describe("#constructor()", () => { + it("should create a MathRadical with correct root key", () => { + const mathRadical = new MathRadical({ + child: new MathRun("e"), + degree: new MathRun("2"), + }); + + const tree = new Formatter().format(mathRadical); + expect(tree).to.deep.equal({ + "m:rad": [ + { + "m:radPr": {}, + }, + { + "m:deg": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["e"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/radical/math-radical.ts b/src/file/paragraph/math/radical/math-radical.ts new file mode 100644 index 0000000000..76fc2dc7ca --- /dev/null +++ b/src/file/paragraph/math/radical/math-radical.ts @@ -0,0 +1,22 @@ +// http://www.datypic.com/sc/ooxml/e-m_rad-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../math-component"; +import { MathBase } from "../n-ary"; +import { MathDegree } from "./math-degree"; +import { MathRadicalProperties } from "./math-radical-properties"; + +export interface IMathRadicalOptions { + readonly child: MathComponent; + readonly degree?: MathComponent; +} + +export class MathRadical extends XmlComponent { + constructor(options: IMathRadicalOptions) { + super("m:rad"); + + this.root.push(new MathRadicalProperties(!!options.degree)); + this.root.push(new MathDegree(options.degree)); + this.root.push(new MathBase(options.child)); + } +} diff --git a/src/file/paragraph/math/script/index.ts b/src/file/paragraph/math/script/index.ts new file mode 100644 index 0000000000..a83e54975e --- /dev/null +++ b/src/file/paragraph/math/script/index.ts @@ -0,0 +1,4 @@ +export * from "./super-script"; +export * from "./sub-script"; +export * from "./sub-super-script"; +export * from "./pre-sub-super-script"; diff --git a/src/file/paragraph/math/script/pre-sub-super-script/index.ts b/src/file/paragraph/math/script/pre-sub-super-script/index.ts new file mode 100644 index 0000000000..8660a75017 --- /dev/null +++ b/src/file/paragraph/math/script/pre-sub-super-script/index.ts @@ -0,0 +1,2 @@ +export * from "./math-pre-sub-super-script-function"; +export * from "./math-pre-sub-super-script-function-properties"; diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts new file mode 100644 index 0000000000..a6f1d5383e --- /dev/null +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts @@ -0,0 +1,17 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; +import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties"; + +describe("MathPreSubSuperScriptProperties", () => { + describe("#constructor()", () => { + it("should create a MathPreSubSuperScriptProperties with correct root key", () => { + const mathPreSubSuperScriptProperties = new MathPreSubSuperScriptProperties(); + + const tree = new Formatter().format(mathPreSubSuperScriptProperties); + expect(tree).to.deep.equal({ + "m:sPrePr": {}, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.ts new file mode 100644 index 0000000000..fed0cb3564 --- /dev/null +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.ts @@ -0,0 +1,8 @@ +// http://www.datypic.com/sc/ooxml/e-m_sPrePr-1.html +import { XmlComponent } from "file/xml-components"; + +export class MathPreSubSuperScriptProperties extends XmlComponent { + constructor() { + super("m:sPrePr"); + } +} diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts new file mode 100644 index 0000000000..956a2ff445 --- /dev/null +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts @@ -0,0 +1,60 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../../math-run"; +import { MathPreSubSuperScript } from "./math-pre-sub-super-script-function"; + +describe("MathPreSubScript", () => { + describe("#constructor()", () => { + it("should create a MathPreSubScript with correct root key", () => { + const mathPreSubScript = new MathPreSubSuperScript({ + child: new MathRun("e"), + subScript: new MathRun("2"), + superScript: new MathRun("5"), + }); + + const tree = new Formatter().format(mathPreSubScript); + expect(tree).to.deep.equal({ + "m:sPre": [ + { + "m:sPrePr": {}, + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["e"], + }, + ], + }, + ], + }, + { + "m:sub": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + { + "m:sup": [ + { + "m:r": [ + { + "m:t": ["5"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts new file mode 100644 index 0000000000..a0bdc321a0 --- /dev/null +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts @@ -0,0 +1,23 @@ +// http://www.datypic.com/sc/ooxml/e-m_sPre-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../../math-component"; +import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n-ary"; +import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties"; + +export interface IMathPreSubSuperScriptOptions { + readonly child: MathComponent; + readonly subScript: MathComponent; + readonly superScript: MathComponent; +} + +export class MathPreSubSuperScript extends XmlComponent { + constructor(options: IMathPreSubSuperScriptOptions) { + super("m:sPre"); + + this.root.push(new MathPreSubSuperScriptProperties()); + this.root.push(new MathBase(options.child)); + this.root.push(new MathSubScriptElement(options.subScript)); + this.root.push(new MathSuperScriptElement(options.superScript)); + } +} diff --git a/src/file/paragraph/math/script/sub-script/index.ts b/src/file/paragraph/math/script/sub-script/index.ts new file mode 100644 index 0000000000..0f1c27fe51 --- /dev/null +++ b/src/file/paragraph/math/script/sub-script/index.ts @@ -0,0 +1,2 @@ +export * from "./math-sub-script-function"; +export * from "./math-sub-script-function-properties"; diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts new file mode 100644 index 0000000000..be229e066b --- /dev/null +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts @@ -0,0 +1,17 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; +import { MathSubScriptProperties } from "./math-sub-script-function-properties"; + +describe("MathSubScriptProperties", () => { + describe("#constructor()", () => { + it("should create a MathSubScriptProperties with correct root key", () => { + const mathSubScriptProperties = new MathSubScriptProperties(); + + const tree = new Formatter().format(mathSubScriptProperties); + expect(tree).to.deep.equal({ + "m:sSubPr": {}, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.ts new file mode 100644 index 0000000000..bf37b1d885 --- /dev/null +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.ts @@ -0,0 +1,8 @@ +// http://www.datypic.com/sc/ooxml/e-m_sSubPr-1.html +import { XmlComponent } from "file/xml-components"; + +export class MathSubScriptProperties extends XmlComponent { + constructor() { + super("m:sSubPr"); + } +} diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts new file mode 100644 index 0000000000..dd33598d81 --- /dev/null +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts @@ -0,0 +1,48 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../../math-run"; +import { MathSubScript } from "./math-sub-script-function"; + +describe("MathSubScript", () => { + describe("#constructor()", () => { + it("should create a MathSubScript with correct root key", () => { + const mathSubScript = new MathSubScript({ + child: new MathRun("e"), + subScript: new MathRun("2"), + }); + + const tree = new Formatter().format(mathSubScript); + expect(tree).to.deep.equal({ + "m:sSub": [ + { + "m:sSubPr": {}, + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["e"], + }, + ], + }, + ], + }, + { + "m:sub": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts new file mode 100644 index 0000000000..a5c26cd06c --- /dev/null +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts @@ -0,0 +1,21 @@ +// http://www.datypic.com/sc/ooxml/e-m_sSub-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../../math-component"; +import { MathBase, MathSubScriptElement } from "../../n-ary"; +import { MathSubScriptProperties } from "./math-sub-script-function-properties"; + +export interface IMathSubScriptOptions { + readonly child: MathComponent; + readonly subScript: MathComponent; +} + +export class MathSubScript extends XmlComponent { + constructor(options: IMathSubScriptOptions) { + super("m:sSub"); + + this.root.push(new MathSubScriptProperties()); + this.root.push(new MathBase(options.child)); + this.root.push(new MathSubScriptElement(options.subScript)); + } +} diff --git a/src/file/paragraph/math/script/sub-super-script/index.ts b/src/file/paragraph/math/script/sub-super-script/index.ts new file mode 100644 index 0000000000..88ddeb69fa --- /dev/null +++ b/src/file/paragraph/math/script/sub-super-script/index.ts @@ -0,0 +1,2 @@ +export * from "./math-sub-super-script-function"; +export * from "./math-sub-super-script-function-properties"; diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts new file mode 100644 index 0000000000..b0f934823a --- /dev/null +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts @@ -0,0 +1,17 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; +import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties"; + +describe("MathSubSuperScriptProperties", () => { + describe("#constructor()", () => { + it("should create a MathSubSuperScriptProperties with correct root key", () => { + const mathSubSuperScriptProperties = new MathSubSuperScriptProperties(); + + const tree = new Formatter().format(mathSubSuperScriptProperties); + expect(tree).to.deep.equal({ + "m:sSubSupPr": {}, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.ts new file mode 100644 index 0000000000..b3218a7d3a --- /dev/null +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.ts @@ -0,0 +1,8 @@ +// http://www.datypic.com/sc/ooxml/e-m_sSubSupPr-1.html +import { XmlComponent } from "file/xml-components"; + +export class MathSubSuperScriptProperties extends XmlComponent { + constructor() { + super("m:sSubSupPr"); + } +} diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts new file mode 100644 index 0000000000..5e7f976db7 --- /dev/null +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts @@ -0,0 +1,60 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../../math-run"; +import { MathSubSuperScript } from "./math-sub-super-script-function"; + +describe("MathSubScript", () => { + describe("#constructor()", () => { + it("should create a MathSubScript with correct root key", () => { + const mathSubScript = new MathSubSuperScript({ + child: new MathRun("e"), + subScript: new MathRun("2"), + superScript: new MathRun("5"), + }); + + const tree = new Formatter().format(mathSubScript); + expect(tree).to.deep.equal({ + "m:sSubSup": [ + { + "m:sSubSupPr": {}, + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["e"], + }, + ], + }, + ], + }, + { + "m:sub": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + { + "m:sup": [ + { + "m:r": [ + { + "m:t": ["5"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts new file mode 100644 index 0000000000..91bdfe6781 --- /dev/null +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts @@ -0,0 +1,23 @@ +// http://www.datypic.com/sc/ooxml/e-m_sSubSup-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../../math-component"; +import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n-ary"; +import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties"; + +export interface IMathSubSuperScriptOptions { + readonly child: MathComponent; + readonly subScript: MathComponent; + readonly superScript: MathComponent; +} + +export class MathSubSuperScript extends XmlComponent { + constructor(options: IMathSubSuperScriptOptions) { + super("m:sSubSup"); + + this.root.push(new MathSubSuperScriptProperties()); + this.root.push(new MathBase(options.child)); + this.root.push(new MathSubScriptElement(options.subScript)); + this.root.push(new MathSuperScriptElement(options.superScript)); + } +} diff --git a/src/file/paragraph/math/script/super-script/index.ts b/src/file/paragraph/math/script/super-script/index.ts new file mode 100644 index 0000000000..2864fe9ac5 --- /dev/null +++ b/src/file/paragraph/math/script/super-script/index.ts @@ -0,0 +1,2 @@ +export * from "./math-super-script-function"; +export * from "./math-super-script-function-properties"; diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts b/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts new file mode 100644 index 0000000000..f95920f152 --- /dev/null +++ b/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts @@ -0,0 +1,17 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; +import { MathSuperScriptProperties } from "./math-super-script-function-properties"; + +describe("MathSuperScriptProperties", () => { + describe("#constructor()", () => { + it("should create a MathSuperScriptProperties with correct root key", () => { + const mathSuperScriptProperties = new MathSuperScriptProperties(); + + const tree = new Formatter().format(mathSuperScriptProperties); + expect(tree).to.deep.equal({ + "m:sSupPr": {}, + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function-properties.ts b/src/file/paragraph/math/script/super-script/math-super-script-function-properties.ts new file mode 100644 index 0000000000..ea5dbac20b --- /dev/null +++ b/src/file/paragraph/math/script/super-script/math-super-script-function-properties.ts @@ -0,0 +1,8 @@ +// http://www.datypic.com/sc/ooxml/e-m_sSupPr-1.html +import { XmlComponent } from "file/xml-components"; + +export class MathSuperScriptProperties extends XmlComponent { + constructor() { + super("m:sSupPr"); + } +} diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts b/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts new file mode 100644 index 0000000000..6e6beb5e04 --- /dev/null +++ b/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts @@ -0,0 +1,48 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { MathRun } from "../../math-run"; +import { MathSuperScript } from "./math-super-script-function"; + +describe("MathSuperScript", () => { + describe("#constructor()", () => { + it("should create a MathSuperScript with correct root key", () => { + const mathSuperScript = new MathSuperScript({ + child: new MathRun("e"), + superScript: new MathRun("2"), + }); + + const tree = new Formatter().format(mathSuperScript); + expect(tree).to.deep.equal({ + "m:sSup": [ + { + "m:sSupPr": {}, + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["e"], + }, + ], + }, + ], + }, + { + "m:sup": [ + { + "m:r": [ + { + "m:t": ["2"], + }, + ], + }, + ], + }, + ], + }); + }); + }); +}); diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function.ts b/src/file/paragraph/math/script/super-script/math-super-script-function.ts new file mode 100644 index 0000000000..d48ece6985 --- /dev/null +++ b/src/file/paragraph/math/script/super-script/math-super-script-function.ts @@ -0,0 +1,21 @@ +// http://www.datypic.com/sc/ooxml/e-m_sSup-1.html +import { XmlComponent } from "file/xml-components"; + +import { MathComponent } from "../../math-component"; +import { MathBase, MathSuperScriptElement } from "../../n-ary"; +import { MathSuperScriptProperties } from "./math-super-script-function-properties"; + +export interface IMathSuperScriptOptions { + readonly child: MathComponent; + readonly superScript: MathComponent; +} + +export class MathSuperScript extends XmlComponent { + constructor(options: IMathSuperScriptOptions) { + super("m:sSup"); + + this.root.push(new MathSuperScriptProperties()); + this.root.push(new MathBase(options.child)); + this.root.push(new MathSuperScriptElement(options.superScript)); + } +} diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index 68fa7d00d4..60efb0da34 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -2,11 +2,11 @@ import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run"; import { IXmlableObject, XmlComponent } from "file/xml-components"; +import { File } from "../file"; +import { DeletedTextRun, InsertedTextRun } from "../track-revision"; import { PageBreak } from "./formatting/page-break"; import { Bookmark, HyperlinkRef } from "./links"; import { Math } from "./math"; -import { File } from "../file"; -import { InsertedTextRun, DeletedTextRun } from "../track-revision"; import { IParagraphPropertiesOptions, ParagraphProperties } from "./properties"; import { PictureRun, Run, SequentialIdentifier, SymbolRun, TextRun } from "./run"; diff --git a/src/file/settings/settings.ts b/src/file/settings/settings.ts index 2fa4a27f0a..d828d21fb5 100644 --- a/src/file/settings/settings.ts +++ b/src/file/settings/settings.ts @@ -1,7 +1,7 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; import { Compatibility } from "./compatibility"; -import { UpdateFields } from "./update-fields"; import { TrackRevisions } from "./track-revisions"; +import { UpdateFields } from "./update-fields"; export interface ISettingsAttributesProperties { readonly wpc?: string; @@ -46,8 +46,8 @@ export class SettingsAttributes extends XmlAttributeComponent { describe("#constructor", () => { diff --git a/src/file/track-revision/track-revision-components/deleted-text-run.ts b/src/file/track-revision/track-revision-components/deleted-text-run.ts index 2342f70104..56d384b31b 100644 --- a/src/file/track-revision/track-revision-components/deleted-text-run.ts +++ b/src/file/track-revision/track-revision-components/deleted-text-run.ts @@ -1,12 +1,11 @@ -import { IChangedAttributesProperties, ChangeAttributes } from "../track-revision"; import { XmlComponent } from "file/xml-components"; -import { IRunOptions, RunProperties, IRunPropertiesOptions, FootnoteReferenceRun } from "../../index"; +import { FootnoteReferenceRun, IRunOptions, IRunPropertiesOptions, RunProperties } from "../../index"; import { Break } from "../../paragraph/run/break"; -import { Begin, Separate, End } from "../../paragraph/run/field"; +import { Begin, End, Separate } from "../../paragraph/run/field"; import { PageNumber } from "../../paragraph/run/run"; - -import { DeletedPage, DeletedNumberOfPages, DeletedNumberOfPagesSection } from "./deleted-page-number"; +import { ChangeAttributes, IChangedAttributesProperties } from "../track-revision"; +import { DeletedNumberOfPages, DeletedNumberOfPagesSection, DeletedPage } from "./deleted-page-number"; import { DeletedText } from "./deleted-text"; interface IDeletedRunOptions extends IRunPropertiesOptions, IChangedAttributesProperties { diff --git a/src/file/track-revision/track-revision-components/inserted-text-run.ts b/src/file/track-revision/track-revision-components/inserted-text-run.ts index 49bd7f53ae..3d39e92c1c 100644 --- a/src/file/track-revision/track-revision-components/inserted-text-run.ts +++ b/src/file/track-revision/track-revision-components/inserted-text-run.ts @@ -1,6 +1,7 @@ -import { IChangedAttributesProperties, ChangeAttributes } from "../track-revision"; import { XmlComponent } from "file/xml-components"; -import { TextRun, IRunOptions } from "../../index"; + +import { IRunOptions, TextRun } from "../../index"; +import { ChangeAttributes, IChangedAttributesProperties } from "../track-revision"; interface IInsertedRunOptions extends IChangedAttributesProperties, IRunOptions {} diff --git a/tslint.json b/tslint.json index d6eb606eba..cb979f920a 100644 --- a/tslint.json +++ b/tslint.json @@ -21,6 +21,8 @@ "no-duplicate-imports": true, "unnecessary-constructor": true, "file-name-casing": [true, "kebab-case"], + "interface-name": [true, "always-prefix"], + "ordered-imports": true, // Functional Programming Rules "no-parameter-reassignment": true, "readonly-keyword": true, From daea8d286811baf336d938d2541fb9b550c21b91 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 12 Oct 2020 22:13:03 +0100 Subject: [PATCH 167/260] Make fractions take math component --- demo/55-math.ts | 40 ++++++++----------- .../math/fraction/math-denominator.spec.ts | 3 +- .../math/fraction/math-denominator.ts | 6 +-- .../math/fraction/math-fraction.spec.ts | 7 ++-- .../paragraph/math/fraction/math-fraction.ts | 9 +++-- .../math/fraction/math-numerator.spec.ts | 3 +- .../paragraph/math/fraction/math-numerator.ts | 6 +-- 7 files changed, 35 insertions(+), 39 deletions(-) diff --git a/demo/55-math.ts b/demo/55-math.ts index 92993a695a..ad7473915c 100644 --- a/demo/55-math.ts +++ b/demo/55-math.ts @@ -6,10 +6,8 @@ import { Math, MathAngledBrackets, MathCurlyBrackets, - MathDenominator, MathFraction, MathFunction, - MathNumerator, MathPreSubSuperScript, MathRadical, MathRoundBrackets, @@ -35,8 +33,8 @@ doc.addSection({ children: [ new MathRun("2+2"), new MathFraction({ - numerator: new MathNumerator("hi"), - denominator: new MathDenominator("2"), + numerator: new MathRun("hi"), + denominator: new MathRun("2"), }), ], }), @@ -142,8 +140,8 @@ doc.addSection({ children: [ new MathSubScript({ child: new MathFraction({ - numerator: new MathNumerator("1"), - denominator: new MathDenominator("2"), + numerator: new MathRun("1"), + denominator: new MathRun("2"), }), subScript: new MathRun("4"), }), @@ -158,8 +156,8 @@ doc.addSection({ new MathSubScript({ child: new MathRadical({ child: new MathFraction({ - numerator: new MathNumerator("1"), - denominator: new MathDenominator("2"), + numerator: new MathRun("1"), + denominator: new MathRun("2"), }), degree: new MathRun("4"), }), @@ -207,26 +205,26 @@ doc.addSection({ children: [ new MathRoundBrackets({ child: new MathFraction({ - numerator: new MathNumerator("1"), - denominator: new MathDenominator("2"), + numerator: new MathRun("1"), + denominator: new MathRun("2"), }), }), new MathSquareBrackets({ child: new MathFraction({ - numerator: new MathNumerator("1"), - denominator: new MathDenominator("2"), + numerator: new MathRun("1"), + denominator: new MathRun("2"), }), }), new MathCurlyBrackets({ child: new MathFraction({ - numerator: new MathNumerator("1"), - denominator: new MathDenominator("2"), + numerator: new MathRun("1"), + denominator: new MathRun("2"), }), }), new MathAngledBrackets({ child: new MathFraction({ - numerator: new MathNumerator("1"), - denominator: new MathDenominator("2"), + numerator: new MathRun("1"), + denominator: new MathRun("2"), }), }), ], @@ -238,14 +236,10 @@ doc.addSection({ new Math({ children: [ new MathFraction({ - numerator: new Math({ - children: [ - new MathRadical({ - child: new MathRun("4"), - }), - ], + numerator: new MathRadical({ + child: new MathRun("4"), }), - demoninator: new MathRun("2a"), + denominator: new MathRun("2a"), }), ], }), diff --git a/src/file/paragraph/math/fraction/math-denominator.spec.ts b/src/file/paragraph/math/fraction/math-denominator.spec.ts index cca8ae0ee1..a5f50ce1ad 100644 --- a/src/file/paragraph/math/fraction/math-denominator.spec.ts +++ b/src/file/paragraph/math/fraction/math-denominator.spec.ts @@ -2,12 +2,13 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; +import { MathRun } from "../math-run"; import { MathDenominator } from "./math-denominator"; describe("MathDenominator", () => { describe("#constructor()", () => { it("should create a MathDenominator with correct root key", () => { - const mathDenominator = new MathDenominator("2+2"); + const mathDenominator = new MathDenominator(new MathRun("2+2")); const tree = new Formatter().format(mathDenominator); expect(tree).to.deep.equal({ "m:den": [ diff --git a/src/file/paragraph/math/fraction/math-denominator.ts b/src/file/paragraph/math/fraction/math-denominator.ts index f640324c2e..db59eabc8c 100644 --- a/src/file/paragraph/math/fraction/math-denominator.ts +++ b/src/file/paragraph/math/fraction/math-denominator.ts @@ -1,11 +1,11 @@ import { XmlComponent } from "file/xml-components"; -import { MathRun } from "../math-run"; +import { MathComponent } from "../math-component"; export class MathDenominator extends XmlComponent { - constructor(text: string) { + constructor(child: MathComponent) { super("m:den"); - this.root.push(new MathRun(text)); + this.root.push(child); } } diff --git a/src/file/paragraph/math/fraction/math-fraction.spec.ts b/src/file/paragraph/math/fraction/math-fraction.spec.ts index 9a7386e85e..9ebd3c4bcd 100644 --- a/src/file/paragraph/math/fraction/math-fraction.spec.ts +++ b/src/file/paragraph/math/fraction/math-fraction.spec.ts @@ -2,16 +2,15 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; -import { MathDenominator } from "./math-denominator"; +import { MathRun } from "../math-run"; import { MathFraction } from "./math-fraction"; -import { MathNumerator } from "./math-numerator"; describe("MathFraction", () => { describe("#constructor()", () => { it("should create a MathFraction with correct root key", () => { const mathFraction = new MathFraction({ - numerator: new MathNumerator("2"), - denominator: new MathDenominator("2"), + numerator: new MathRun("2"), + denominator: new MathRun("2"), }); const tree = new Formatter().format(mathFraction); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/fraction/math-fraction.ts b/src/file/paragraph/math/fraction/math-fraction.ts index 574a989bba..65768a1fca 100644 --- a/src/file/paragraph/math/fraction/math-fraction.ts +++ b/src/file/paragraph/math/fraction/math-fraction.ts @@ -1,18 +1,19 @@ import { XmlComponent } from "file/xml-components"; +import { MathComponent } from "../math-component"; import { MathDenominator } from "./math-denominator"; import { MathNumerator } from "./math-numerator"; export interface IMathFractionOptions { - readonly numerator: MathNumerator; - readonly denominator: MathDenominator; + readonly numerator: MathComponent; + readonly denominator: MathComponent; } export class MathFraction extends XmlComponent { constructor(options: IMathFractionOptions) { super("m:f"); - this.root.push(options.numerator); - this.root.push(options.denominator); + this.root.push(new MathNumerator(options.numerator)); + this.root.push(new MathDenominator(options.denominator)); } } diff --git a/src/file/paragraph/math/fraction/math-numerator.spec.ts b/src/file/paragraph/math/fraction/math-numerator.spec.ts index 1cc5fc4aa4..862dc18938 100644 --- a/src/file/paragraph/math/fraction/math-numerator.spec.ts +++ b/src/file/paragraph/math/fraction/math-numerator.spec.ts @@ -2,12 +2,13 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; +import { MathRun } from "../math-run"; import { MathNumerator } from "./math-numerator"; describe("MathNumerator", () => { describe("#constructor()", () => { it("should create a MathNumerator with correct root key", () => { - const mathNumerator = new MathNumerator("2+2"); + const mathNumerator = new MathNumerator(new MathRun("2+2")); const tree = new Formatter().format(mathNumerator); expect(tree).to.deep.equal({ "m:num": [ diff --git a/src/file/paragraph/math/fraction/math-numerator.ts b/src/file/paragraph/math/fraction/math-numerator.ts index f7e68715b8..bad0ace36f 100644 --- a/src/file/paragraph/math/fraction/math-numerator.ts +++ b/src/file/paragraph/math/fraction/math-numerator.ts @@ -1,11 +1,11 @@ import { XmlComponent } from "file/xml-components"; -import { MathRun } from "../math-run"; +import { MathComponent } from "../math-component"; export class MathNumerator extends XmlComponent { - constructor(text: string) { + constructor(child: MathComponent) { super("m:num"); - this.root.push(new MathRun(text)); + this.root.push(child); } } From 102d6aa55c6341a372c5e7c73cec7b9c71a32e3b Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 12 Oct 2020 22:48:38 +0100 Subject: [PATCH 168/260] Add prepForXml test --- src/file/paragraph/paragraph.spec.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index 04cc8af8e4..0b8e9acd00 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -5,8 +5,9 @@ import { stub } from "sinon"; import { Formatter } from "export/formatter"; import { EMPTY_OBJECT } from "file/xml-components"; +import { File } from "../file"; import { AlignmentType, HeadingLevel, LeaderType, PageBreak, TabStopPosition, TabStopType } from "./formatting"; -import { Bookmark } from "./links"; +import { Bookmark, HyperlinkRef } from "./links"; import { Paragraph } from "./paragraph"; describe("Paragraph", () => { @@ -759,4 +760,23 @@ describe("Paragraph", () => { }); }); }); + + describe("#prepForXml", () => { + it("should set paragraph outline level to the given value", () => { + const paragraph = new Paragraph({ + children: [new HyperlinkRef("myAnchorId")], + }); + const fileMock = ({ + HyperlinkCache: { + myAnchorId: "test", + }, + // tslint:disable-next-line: no-any + } as any) as File; + paragraph.prepForXml(fileMock); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": ["test"], + }); + }); + }); }); From e36e9e1cf4e3f8a86646e44862295b4e15072dce Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 13 Oct 2020 01:23:27 +0100 Subject: [PATCH 169/260] Add initial math documentation --- docs/_sidebar.md | 1 + docs/images/math-example.png | Bin 0 -> 16782 bytes docs/usage/math.md | 126 +++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 docs/images/math-example.png create mode 100644 docs/usage/math.md diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 5d2ba31551..bcdb03c55f 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -21,6 +21,7 @@ * [Table of Contents](usage/table-of-contents.md) * [Page Numbers](usage/page-numbers.md) * [Change Tracking](usage/change-tracking.md) + * [Math](usage/math.md) * Styling * [Styling with JS](usage/styling-with-js.md) * [Styling with XML](usage/styling-with-xml.md) diff --git a/docs/images/math-example.png b/docs/images/math-example.png new file mode 100644 index 0000000000000000000000000000000000000000..c92f8806f93c1639be5750c3252766494b53d83e GIT binary patch literal 16782 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 literal 0 HcmV?d00001 diff --git a/docs/usage/math.md b/docs/usage/math.md new file mode 100644 index 0000000000..e38f393ac9 --- /dev/null +++ b/docs/usage/math.md @@ -0,0 +1,126 @@ +# Math + +!> Math requires an understanding of [Sections](usage/sections.md) and [Paragraphs](usage/paragraph.md). + +## Intro + +- To add math, create a `Math` object +- Add `MathComponents` inside `Math` +- `MathComponents` can have nested `MathComponents` inside. e.g. A fraction where the numerator is a square root, and the demoninator as another fraction. More on `MathComponents` below + +## Example + +```ts +new Math({ + children: [ + new MathRun("2+2"), + new MathFraction({ + numerator: [new MathRun("hi")], + denominator: [new MathRun("2")], + }), + ], +}), +``` + +This will produce: + +

+ clippy the assistant +

+ +## Math Components + +`MathComponents` are the unit sized building blocks of an equation in `docx`. A `MathComponent` takes in more nested `MathComponents` until you reach `MathRun`, which has no children. `MathRun` is similar to a [TextRun](usage/text.md). + +### Math Run + +`MathRun` is the most basic `MathComponent`. + +#### Example + +```ts +new MathRun("2+2"); +``` + +```ts +new MathRun("hello"); +``` + +An example of it being used inside `Math`: + +```ts +new Math({ + children: [ + new MathRun("2"), + new MathRun("+"), + new MathRun("2"), + ], +}), +``` + +### Math Fraction + +`MathFractions` require a `numerator` and a `demoninator`, which are both a list of `MathComponents` + +#### Example + +```ts +new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], +}), +``` + +```ts +new MathFraction({ + numerator: [ + new MathRun("1"), + new MathRadical({ + child: [new MathRun("2")], + }), + ], + denominator: [new MathRun("2")], +}), +``` + +An example of it being used inside `Math`: + +```ts +new Math({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + new MathText("+"), + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + new MathText("= 1"), + ], +}), +``` + +### Sum + +A `MathComponent` for `Σ`. It can take a `superScript` and/or `subScript` as arguments to add `MathComponents` (usually limits) on the top and bottom + +```ts +new MathSum({ + child: [new MathRun("i")], +}), +``` + +```ts +new MathSum({ + child: [ + new MathSuperScript({ + child: new MathRun("e"), + superScript: new MathRun("2"), + }) + ], + subScript: [new MathRun("i")], + superScript: [new MathRun("10")], +}), +``` From 5be195fd9115beaad6d1100bd83d88612e096bdd Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 13 Oct 2020 02:06:27 +0100 Subject: [PATCH 170/260] Turn math component into array --- demo/55-math.ts | 193 +++++++++++------- .../brackets/math-angled-brackets.spec.ts | 2 +- .../math/brackets/math-angled-brackets.ts | 4 +- .../math/brackets/math-curly-brackets.spec.ts | 2 +- .../math/brackets/math-curly-brackets.ts | 4 +- .../math/brackets/math-round-brackets.spec.ts | 2 +- .../math/brackets/math-round-brackets.ts | 4 +- .../brackets/math-square-brackets.spec.ts | 2 +- .../math/brackets/math-square-brackets.ts | 4 +- .../math/fraction/math-denominator.spec.ts | 2 +- .../math/fraction/math-denominator.ts | 6 +- .../math/fraction/math-fraction.spec.ts | 4 +- .../paragraph/math/fraction/math-fraction.ts | 4 +- .../math/fraction/math-numerator.spec.ts | 2 +- .../paragraph/math/fraction/math-numerator.ts | 6 +- .../math/function/math-function-name.spec.ts | 2 +- .../math/function/math-function-name.ts | 6 +- .../math/function/math-function.spec.ts | 4 +- .../paragraph/math/function/math-function.ts | 6 +- .../paragraph/math/n-ary/math-base.spec.ts | 2 +- src/file/paragraph/math/n-ary/math-base.ts | 6 +- .../math/n-ary/math-sub-script.spec.ts | 2 +- .../paragraph/math/n-ary/math-sub-script.ts | 6 +- .../paragraph/math/n-ary/math-sum.spec.ts | 6 +- src/file/paragraph/math/n-ary/math-sum.ts | 8 +- .../math/n-ary/math-super-script.spec.ts | 2 +- .../paragraph/math/n-ary/math-super-script.ts | 6 +- .../math/radical/math-degree.spec.ts | 2 +- .../paragraph/math/radical/math-degree.ts | 8 +- .../math/radical/math-radical.spec.ts | 4 +- .../paragraph/math/radical/math-radical.ts | 6 +- ...math-pre-sub-super-script-function.spec.ts | 6 +- .../math-pre-sub-super-script-function.ts | 8 +- .../math-sub-script-function.spec.ts | 4 +- .../sub-script/math-sub-script-function.ts | 6 +- .../math-sub-super-script-function.spec.ts | 6 +- .../math-sub-super-script-function.ts | 8 +- .../math-super-script-function.spec.ts | 4 +- .../math-super-script-function.ts | 6 +- 39 files changed, 208 insertions(+), 157 deletions(-) diff --git a/demo/55-math.ts b/demo/55-math.ts index ad7473915c..3dc6c1a17c 100644 --- a/demo/55-math.ts +++ b/demo/55-math.ts @@ -33,8 +33,8 @@ doc.addSection({ children: [ new MathRun("2+2"), new MathFraction({ - numerator: new MathRun("hi"), - denominator: new MathRun("2"), + numerator: [new MathRun("hi")], + denominator: [new MathRun("2")], }), ], }), @@ -44,26 +44,43 @@ doc.addSection({ }), ], }), + // new Paragraph({ + // children: [ + // new MathFraction({ + // numerator: [ + // new MathRun("1"), + // new MathRadical({ + // children: [new MathRun("2")], + // }), + // ], + // denominator: [new MathRun("2")], + // }), + // ], + // }), new Paragraph({ children: [ new Math({ children: [ new MathSum({ - child: new MathRun("test"), + children: [new MathRun("test")], }), new MathSum({ - child: new MathSuperScript({ - child: new MathRun("e"), - superScript: new MathRun("2"), - }), - subScript: new MathRun("i"), + children: [ + new MathSuperScript({ + children: [new MathRun("e")], + superScript: [new MathRun("2")], + }), + ], + subScript: [new MathRun("i")], }), new MathSum({ - child: new MathRadical({ - child: new MathRun("i"), - }), - subScript: new MathRun("i"), - superScript: new MathRun("10"), + children: [ + new MathRadical({ + children: [new MathRun("i")], + }), + ], + subScript: [new MathRun("i")], + superScript: [new MathRun("10")], }), ], }), @@ -74,8 +91,8 @@ doc.addSection({ new Math({ children: [ new MathSuperScript({ - child: new MathRun("test"), - superScript: new MathRun("hello"), + children: [new MathRun("test")], + superScript: [new MathRun("hello")], }), ], }), @@ -86,8 +103,8 @@ doc.addSection({ new Math({ children: [ new MathSubScript({ - child: new MathRun("test"), - subScript: new MathRun("hello"), + children: [new MathRun("test")], + subScript: [new MathRun("hello")], }), ], }), @@ -98,11 +115,13 @@ doc.addSection({ new Math({ children: [ new MathSubScript({ - child: new MathRun("x"), - subScript: new MathSuperScript({ - child: new MathRun("y"), - superScript: new MathRun("2"), - }), + children: [new MathRun("x")], + subScript: [ + new MathSuperScript({ + children: [new MathRun("y")], + superScript: [new MathRun("2")], + }), + ], }), ], }), @@ -113,9 +132,9 @@ doc.addSection({ new Math({ children: [ new MathSubSuperScript({ - child: new MathRun("test"), - superScript: new MathRun("hello"), - subScript: new MathRun("world"), + children: [new MathRun("test")], + superScript: [new MathRun("hello")], + subScript: [new MathRun("world")], }), ], }), @@ -126,9 +145,9 @@ doc.addSection({ new Math({ children: [ new MathPreSubSuperScript({ - child: new MathRun("test"), - superScript: new MathRun("hello"), - subScript: new MathRun("world"), + children: [new MathRun("test")], + superScript: [new MathRun("hello")], + subScript: [new MathRun("world")], }), ], }), @@ -139,29 +158,35 @@ doc.addSection({ new Math({ children: [ new MathSubScript({ - child: new MathFraction({ - numerator: new MathRun("1"), - denominator: new MathRun("2"), - }), - subScript: new MathRun("4"), - }), - ], - }), - ], - }), - new Paragraph({ - children: [ - new Math({ - children: [ - new MathSubScript({ - child: new MathRadical({ - child: new MathFraction({ - numerator: new MathRun("1"), - denominator: new MathRun("2"), + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], }), - degree: new MathRun("4"), - }), - subScript: new MathRun("x"), + ], + subScript: [new MathRun("4")], + }), + ], + }), + ], + }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathSubScript({ + children: [ + new MathRadical({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], + degree: [new MathRun("4")], + }), + ], + subScript: [new MathRun("x")], }), ], }), @@ -172,7 +197,7 @@ doc.addSection({ new Math({ children: [ new MathRadical({ - child: new MathRun("4"), + children: [new MathRun("4")], }), ], }), @@ -183,16 +208,18 @@ doc.addSection({ new Math({ children: [ new MathFunction({ - name: new MathSuperScript({ - child: new MathRun("cos"), - superScript: new MathRun("-1"), - }), - child: new MathRun("100"), + name: [ + new MathSuperScript({ + children: [new MathRun("cos")], + superScript: [new MathRun("-1")], + }), + ], + children: [new MathRun("100")], }), new MathRun("×"), new MathFunction({ - name: new MathRun("sin"), - child: new MathRun("360"), + name: [new MathRun("sin")], + children: [new MathRun("360")], }), new MathRun("= x"), ], @@ -204,28 +231,36 @@ doc.addSection({ new Math({ children: [ new MathRoundBrackets({ - child: new MathFraction({ - numerator: new MathRun("1"), - denominator: new MathRun("2"), - }), + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], }), new MathSquareBrackets({ - child: new MathFraction({ - numerator: new MathRun("1"), - denominator: new MathRun("2"), - }), + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], }), new MathCurlyBrackets({ - child: new MathFraction({ - numerator: new MathRun("1"), - denominator: new MathRun("2"), - }), + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], }), new MathAngledBrackets({ - child: new MathFraction({ - numerator: new MathRun("1"), - denominator: new MathRun("2"), - }), + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], }), ], }), @@ -236,10 +271,12 @@ doc.addSection({ new Math({ children: [ new MathFraction({ - numerator: new MathRadical({ - child: new MathRun("4"), - }), - denominator: new MathRun("2a"), + numerator: [ + new MathRadical({ + children: [new MathRun("4")], + }), + ], + denominator: [new MathRun("2a")], }), ], }), diff --git a/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts b/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts index 735e0da272..ccd73b192b 100644 --- a/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts +++ b/src/file/paragraph/math/brackets/math-angled-brackets.spec.ts @@ -9,7 +9,7 @@ describe("MathAngledBrackets", () => { describe("#constructor()", () => { it("should create a MathAngledBrackets with correct root key", () => { const mathAngledBrackets = new MathAngledBrackets({ - child: new MathRun("60"), + children: [new MathRun("60")], }); const tree = new Formatter().format(mathAngledBrackets); diff --git a/src/file/paragraph/math/brackets/math-angled-brackets.ts b/src/file/paragraph/math/brackets/math-angled-brackets.ts index fbafb7e738..48fe0d415d 100644 --- a/src/file/paragraph/math/brackets/math-angled-brackets.ts +++ b/src/file/paragraph/math/brackets/math-angled-brackets.ts @@ -6,7 +6,7 @@ import { MathBase } from "../n-ary"; import { MathBracketProperties } from "./math-bracket-properties"; export class MathAngledBrackets extends XmlComponent { - constructor(options: { readonly child: MathComponent }) { + constructor(options: { readonly children: MathComponent[] }) { super("m:d"); this.root.push( @@ -15,6 +15,6 @@ export class MathAngledBrackets extends XmlComponent { endingCharacter: "〉", }), ); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts b/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts index 6e44621b21..d6defd57ef 100644 --- a/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts +++ b/src/file/paragraph/math/brackets/math-curly-brackets.spec.ts @@ -9,7 +9,7 @@ describe("MathCurlyBrackets", () => { describe("#constructor()", () => { it("should create a MathCurlyBrackets with correct root key", () => { const mathCurlyBrackets = new MathCurlyBrackets({ - child: new MathRun("60"), + children: [new MathRun("60")], }); const tree = new Formatter().format(mathCurlyBrackets); diff --git a/src/file/paragraph/math/brackets/math-curly-brackets.ts b/src/file/paragraph/math/brackets/math-curly-brackets.ts index 4d540ec8bc..ccce71e6a7 100644 --- a/src/file/paragraph/math/brackets/math-curly-brackets.ts +++ b/src/file/paragraph/math/brackets/math-curly-brackets.ts @@ -6,7 +6,7 @@ import { MathBase } from "../n-ary"; import { MathBracketProperties } from "./math-bracket-properties"; export class MathCurlyBrackets extends XmlComponent { - constructor(options: { readonly child: MathComponent }) { + constructor(options: { readonly children: MathComponent[] }) { super("m:d"); this.root.push( @@ -15,6 +15,6 @@ export class MathCurlyBrackets extends XmlComponent { endingCharacter: "}", }), ); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/brackets/math-round-brackets.spec.ts b/src/file/paragraph/math/brackets/math-round-brackets.spec.ts index cb28126a20..5138e9d085 100644 --- a/src/file/paragraph/math/brackets/math-round-brackets.spec.ts +++ b/src/file/paragraph/math/brackets/math-round-brackets.spec.ts @@ -9,7 +9,7 @@ describe("MathRoundBrackets", () => { describe("#constructor()", () => { it("should create a MathRoundBrackets with correct root key", () => { const mathRoundBrackets = new MathRoundBrackets({ - child: new MathRun("60"), + children: [new MathRun("60")], }); const tree = new Formatter().format(mathRoundBrackets); diff --git a/src/file/paragraph/math/brackets/math-round-brackets.ts b/src/file/paragraph/math/brackets/math-round-brackets.ts index 2302fa30f1..6fe60318a4 100644 --- a/src/file/paragraph/math/brackets/math-round-brackets.ts +++ b/src/file/paragraph/math/brackets/math-round-brackets.ts @@ -6,10 +6,10 @@ import { MathBase } from "../n-ary"; import { MathBracketProperties } from "./math-bracket-properties"; export class MathRoundBrackets extends XmlComponent { - constructor(options: { readonly child: MathComponent }) { + constructor(options: { readonly children: MathComponent[] }) { super("m:d"); this.root.push(new MathBracketProperties()); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/brackets/math-square-brackets.spec.ts b/src/file/paragraph/math/brackets/math-square-brackets.spec.ts index 03b8aef03d..b0e2ec9e26 100644 --- a/src/file/paragraph/math/brackets/math-square-brackets.spec.ts +++ b/src/file/paragraph/math/brackets/math-square-brackets.spec.ts @@ -9,7 +9,7 @@ describe("MathSquareBrackets", () => { describe("#constructor()", () => { it("should create a MathSquareBrackets with correct root key", () => { const mathSquareBrackets = new MathSquareBrackets({ - child: new MathRun("60"), + children: [new MathRun("60")], }); const tree = new Formatter().format(mathSquareBrackets); diff --git a/src/file/paragraph/math/brackets/math-square-brackets.ts b/src/file/paragraph/math/brackets/math-square-brackets.ts index 3c3d385357..fdfe88a004 100644 --- a/src/file/paragraph/math/brackets/math-square-brackets.ts +++ b/src/file/paragraph/math/brackets/math-square-brackets.ts @@ -6,7 +6,7 @@ import { MathBase } from "../n-ary"; import { MathBracketProperties } from "./math-bracket-properties"; export class MathSquareBrackets extends XmlComponent { - constructor(options: { readonly child: MathComponent }) { + constructor(options: { readonly children: MathComponent[] }) { super("m:d"); this.root.push( @@ -15,6 +15,6 @@ export class MathSquareBrackets extends XmlComponent { endingCharacter: "]", }), ); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/fraction/math-denominator.spec.ts b/src/file/paragraph/math/fraction/math-denominator.spec.ts index a5f50ce1ad..f2e7459e1e 100644 --- a/src/file/paragraph/math/fraction/math-denominator.spec.ts +++ b/src/file/paragraph/math/fraction/math-denominator.spec.ts @@ -8,7 +8,7 @@ import { MathDenominator } from "./math-denominator"; describe("MathDenominator", () => { describe("#constructor()", () => { it("should create a MathDenominator with correct root key", () => { - const mathDenominator = new MathDenominator(new MathRun("2+2")); + const mathDenominator = new MathDenominator([new MathRun("2+2")]); const tree = new Formatter().format(mathDenominator); expect(tree).to.deep.equal({ "m:den": [ diff --git a/src/file/paragraph/math/fraction/math-denominator.ts b/src/file/paragraph/math/fraction/math-denominator.ts index db59eabc8c..8df68bf4b0 100644 --- a/src/file/paragraph/math/fraction/math-denominator.ts +++ b/src/file/paragraph/math/fraction/math-denominator.ts @@ -3,9 +3,11 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathDenominator extends XmlComponent { - constructor(child: MathComponent) { + constructor(children: MathComponent[]) { super("m:den"); - this.root.push(child); + for (const child of children) { + this.root.push(child); + } } } diff --git a/src/file/paragraph/math/fraction/math-fraction.spec.ts b/src/file/paragraph/math/fraction/math-fraction.spec.ts index 9ebd3c4bcd..51cac646bf 100644 --- a/src/file/paragraph/math/fraction/math-fraction.spec.ts +++ b/src/file/paragraph/math/fraction/math-fraction.spec.ts @@ -9,8 +9,8 @@ describe("MathFraction", () => { describe("#constructor()", () => { it("should create a MathFraction with correct root key", () => { const mathFraction = new MathFraction({ - numerator: new MathRun("2"), - denominator: new MathRun("2"), + numerator: [new MathRun("2")], + denominator: [new MathRun("2")], }); const tree = new Formatter().format(mathFraction); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/fraction/math-fraction.ts b/src/file/paragraph/math/fraction/math-fraction.ts index 65768a1fca..84a803a872 100644 --- a/src/file/paragraph/math/fraction/math-fraction.ts +++ b/src/file/paragraph/math/fraction/math-fraction.ts @@ -5,8 +5,8 @@ import { MathDenominator } from "./math-denominator"; import { MathNumerator } from "./math-numerator"; export interface IMathFractionOptions { - readonly numerator: MathComponent; - readonly denominator: MathComponent; + readonly numerator: MathComponent[]; + readonly denominator: MathComponent[]; } export class MathFraction extends XmlComponent { diff --git a/src/file/paragraph/math/fraction/math-numerator.spec.ts b/src/file/paragraph/math/fraction/math-numerator.spec.ts index 862dc18938..e3aaf35c0e 100644 --- a/src/file/paragraph/math/fraction/math-numerator.spec.ts +++ b/src/file/paragraph/math/fraction/math-numerator.spec.ts @@ -8,7 +8,7 @@ import { MathNumerator } from "./math-numerator"; describe("MathNumerator", () => { describe("#constructor()", () => { it("should create a MathNumerator with correct root key", () => { - const mathNumerator = new MathNumerator(new MathRun("2+2")); + const mathNumerator = new MathNumerator([new MathRun("2+2")]); const tree = new Formatter().format(mathNumerator); expect(tree).to.deep.equal({ "m:num": [ diff --git a/src/file/paragraph/math/fraction/math-numerator.ts b/src/file/paragraph/math/fraction/math-numerator.ts index bad0ace36f..b7a49d9a75 100644 --- a/src/file/paragraph/math/fraction/math-numerator.ts +++ b/src/file/paragraph/math/fraction/math-numerator.ts @@ -3,9 +3,11 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathNumerator extends XmlComponent { - constructor(child: MathComponent) { + constructor(children: MathComponent[]) { super("m:num"); - this.root.push(child); + for (const child of children) { + this.root.push(child); + } } } diff --git a/src/file/paragraph/math/function/math-function-name.spec.ts b/src/file/paragraph/math/function/math-function-name.spec.ts index bdb38d7596..8a37ee998e 100644 --- a/src/file/paragraph/math/function/math-function-name.spec.ts +++ b/src/file/paragraph/math/function/math-function-name.spec.ts @@ -8,7 +8,7 @@ import { MathFunctionName } from "./math-function-name"; describe("MathFunctionName", () => { describe("#constructor()", () => { it("should create a MathFunctionName with correct root key", () => { - const mathFunctionName = new MathFunctionName(new MathRun("2")); + const mathFunctionName = new MathFunctionName([new MathRun("2")]); const tree = new Formatter().format(mathFunctionName); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/function/math-function-name.ts b/src/file/paragraph/math/function/math-function-name.ts index 011e82133a..e58488dd28 100644 --- a/src/file/paragraph/math/function/math-function-name.ts +++ b/src/file/paragraph/math/function/math-function-name.ts @@ -3,9 +3,11 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathFunctionName extends XmlComponent { - constructor(child: MathComponent) { + constructor(children: MathComponent[]) { super("m:fName"); - this.root.push(child); + for (const child of children) { + this.root.push(child); + } } } diff --git a/src/file/paragraph/math/function/math-function.spec.ts b/src/file/paragraph/math/function/math-function.spec.ts index 4320a853c6..6ea02b6c9d 100644 --- a/src/file/paragraph/math/function/math-function.spec.ts +++ b/src/file/paragraph/math/function/math-function.spec.ts @@ -9,8 +9,8 @@ describe("MathFunction", () => { describe("#constructor()", () => { it("should create a MathFunction with correct root key", () => { const mathFunction = new MathFunction({ - name: new MathRun("sin"), - child: new MathRun("60"), + name: [new MathRun("sin")], + children: [new MathRun("60")], }); const tree = new Formatter().format(mathFunction); diff --git a/src/file/paragraph/math/function/math-function.ts b/src/file/paragraph/math/function/math-function.ts index b3de75ddb8..86b66392cc 100644 --- a/src/file/paragraph/math/function/math-function.ts +++ b/src/file/paragraph/math/function/math-function.ts @@ -7,8 +7,8 @@ import { MathFunctionName } from "./math-function-name"; import { MathFunctionProperties } from "./math-function-properties"; export interface IMathFunctionOptions { - readonly child: MathComponent; - readonly name: MathComponent; + readonly children: MathComponent[]; + readonly name: MathComponent[]; } export class MathFunction extends XmlComponent { @@ -17,6 +17,6 @@ export class MathFunction extends XmlComponent { this.root.push(new MathFunctionProperties()); this.root.push(new MathFunctionName(options.name)); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/n-ary/math-base.spec.ts b/src/file/paragraph/math/n-ary/math-base.spec.ts index 012147c4d9..c282537970 100644 --- a/src/file/paragraph/math/n-ary/math-base.spec.ts +++ b/src/file/paragraph/math/n-ary/math-base.spec.ts @@ -8,7 +8,7 @@ import { MathBase } from "./math-base"; describe("MathBase", () => { describe("#constructor()", () => { it("should create a MathBase with correct root key", () => { - const mathBase = new MathBase(new MathRun("2+2")); + const mathBase = new MathBase([new MathRun("2+2")]); const tree = new Formatter().format(mathBase); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/n-ary/math-base.ts b/src/file/paragraph/math/n-ary/math-base.ts index 7c06a67c23..6c2320439f 100644 --- a/src/file/paragraph/math/n-ary/math-base.ts +++ b/src/file/paragraph/math/n-ary/math-base.ts @@ -4,9 +4,11 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathBase extends XmlComponent { - constructor(run: MathComponent) { + constructor(children: MathComponent[]) { super("m:e"); - this.root.push(run); + for (const child of children) { + this.root.push(child); + } } } diff --git a/src/file/paragraph/math/n-ary/math-sub-script.spec.ts b/src/file/paragraph/math/n-ary/math-sub-script.spec.ts index 5a4009811e..d342946b74 100644 --- a/src/file/paragraph/math/n-ary/math-sub-script.spec.ts +++ b/src/file/paragraph/math/n-ary/math-sub-script.spec.ts @@ -8,7 +8,7 @@ import { MathSubScriptElement } from "./math-sub-script"; describe("MathSubScriptElement", () => { describe("#constructor()", () => { it("should create a MathSubScriptElement with correct root key", () => { - const mathSubScriptElement = new MathSubScriptElement(new MathRun("2+2")); + const mathSubScriptElement = new MathSubScriptElement([new MathRun("2+2")]); const tree = new Formatter().format(mathSubScriptElement); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/n-ary/math-sub-script.ts b/src/file/paragraph/math/n-ary/math-sub-script.ts index aaa8530e74..48268312cf 100644 --- a/src/file/paragraph/math/n-ary/math-sub-script.ts +++ b/src/file/paragraph/math/n-ary/math-sub-script.ts @@ -4,9 +4,11 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathSubScriptElement extends XmlComponent { - constructor(child: MathComponent) { + constructor(children: MathComponent[]) { super("m:sub"); - this.root.push(child); + for (const child of children) { + this.root.push(child); + } } } diff --git a/src/file/paragraph/math/n-ary/math-sum.spec.ts b/src/file/paragraph/math/n-ary/math-sum.spec.ts index 9f0d213aa4..1e76815147 100644 --- a/src/file/paragraph/math/n-ary/math-sum.spec.ts +++ b/src/file/paragraph/math/n-ary/math-sum.spec.ts @@ -9,9 +9,9 @@ describe("MathSum", () => { describe("#constructor()", () => { it("should create a MathSum with correct root key", () => { const mathSum = new MathSum({ - child: new MathRun("1"), - subScript: new MathRun("2"), - superScript: new MathRun("3"), + children: [new MathRun("1")], + subScript: [new MathRun("2")], + superScript: [new MathRun("3")], }); const tree = new Formatter().format(mathSum); diff --git a/src/file/paragraph/math/n-ary/math-sum.ts b/src/file/paragraph/math/n-ary/math-sum.ts index a16603982d..af14730bbf 100644 --- a/src/file/paragraph/math/n-ary/math-sum.ts +++ b/src/file/paragraph/math/n-ary/math-sum.ts @@ -8,9 +8,9 @@ import { MathSubScriptElement } from "./math-sub-script"; import { MathSuperScriptElement } from "./math-super-script"; export interface IMathSumOptions { - readonly child: MathComponent; - readonly subScript?: MathComponent; - readonly superScript?: MathComponent; + readonly children: MathComponent[]; + readonly subScript?: MathComponent[]; + readonly superScript?: MathComponent[]; } export class MathSum extends XmlComponent { @@ -27,6 +27,6 @@ export class MathSum extends XmlComponent { this.root.push(new MathSuperScriptElement(options.superScript)); } - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/n-ary/math-super-script.spec.ts b/src/file/paragraph/math/n-ary/math-super-script.spec.ts index 85a5195c0f..10e037eba3 100644 --- a/src/file/paragraph/math/n-ary/math-super-script.spec.ts +++ b/src/file/paragraph/math/n-ary/math-super-script.spec.ts @@ -8,7 +8,7 @@ import { MathSuperScriptElement } from "./math-super-script"; describe("MathSuperScriptElement", () => { describe("#constructor()", () => { it("should create a MathSuperScriptElement with correct root key", () => { - const mathSuperScriptElement = new MathSuperScriptElement(new MathRun("2+2")); + const mathSuperScriptElement = new MathSuperScriptElement([new MathRun("2+2")]); const tree = new Formatter().format(mathSuperScriptElement); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/n-ary/math-super-script.ts b/src/file/paragraph/math/n-ary/math-super-script.ts index 1d29bda52b..8d8386addc 100644 --- a/src/file/paragraph/math/n-ary/math-super-script.ts +++ b/src/file/paragraph/math/n-ary/math-super-script.ts @@ -4,9 +4,11 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathSuperScriptElement extends XmlComponent { - constructor(child: MathComponent) { + constructor(children: MathComponent[]) { super("m:sup"); - this.root.push(child); + for (const child of children) { + this.root.push(child); + } } } diff --git a/src/file/paragraph/math/radical/math-degree.spec.ts b/src/file/paragraph/math/radical/math-degree.spec.ts index 6a1c28656b..3d1f17dfa8 100644 --- a/src/file/paragraph/math/radical/math-degree.spec.ts +++ b/src/file/paragraph/math/radical/math-degree.spec.ts @@ -17,7 +17,7 @@ describe("MathDegree", () => { }); it("should create a MathDegree with correct root key with child", () => { - const mathDegree = new MathDegree(new MathRun("2")); + const mathDegree = new MathDegree([new MathRun("2")]); const tree = new Formatter().format(mathDegree); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/math/radical/math-degree.ts b/src/file/paragraph/math/radical/math-degree.ts index 402ee8ffda..79923bbde8 100644 --- a/src/file/paragraph/math/radical/math-degree.ts +++ b/src/file/paragraph/math/radical/math-degree.ts @@ -3,11 +3,13 @@ import { XmlComponent } from "file/xml-components"; import { MathComponent } from "../math-component"; export class MathDegree extends XmlComponent { - constructor(child?: MathComponent) { + constructor(children?: MathComponent[]) { super("m:deg"); - if (!!child) { - this.root.push(child); + if (!!children) { + for (const child of children) { + this.root.push(child); + } } } } diff --git a/src/file/paragraph/math/radical/math-radical.spec.ts b/src/file/paragraph/math/radical/math-radical.spec.ts index 7d7d7c4225..e388edece4 100644 --- a/src/file/paragraph/math/radical/math-radical.spec.ts +++ b/src/file/paragraph/math/radical/math-radical.spec.ts @@ -9,8 +9,8 @@ describe("MathRadical", () => { describe("#constructor()", () => { it("should create a MathRadical with correct root key", () => { const mathRadical = new MathRadical({ - child: new MathRun("e"), - degree: new MathRun("2"), + children: [new MathRun("e")], + degree: [new MathRun("2")], }); const tree = new Formatter().format(mathRadical); diff --git a/src/file/paragraph/math/radical/math-radical.ts b/src/file/paragraph/math/radical/math-radical.ts index 76fc2dc7ca..1469867a5f 100644 --- a/src/file/paragraph/math/radical/math-radical.ts +++ b/src/file/paragraph/math/radical/math-radical.ts @@ -7,8 +7,8 @@ import { MathDegree } from "./math-degree"; import { MathRadicalProperties } from "./math-radical-properties"; export interface IMathRadicalOptions { - readonly child: MathComponent; - readonly degree?: MathComponent; + readonly children: MathComponent[]; + readonly degree?: MathComponent[]; } export class MathRadical extends XmlComponent { @@ -17,6 +17,6 @@ export class MathRadical extends XmlComponent { this.root.push(new MathRadicalProperties(!!options.degree)); this.root.push(new MathDegree(options.degree)); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); } } diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts index 956a2ff445..20d00a639d 100644 --- a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts @@ -9,9 +9,9 @@ describe("MathPreSubScript", () => { describe("#constructor()", () => { it("should create a MathPreSubScript with correct root key", () => { const mathPreSubScript = new MathPreSubSuperScript({ - child: new MathRun("e"), - subScript: new MathRun("2"), - superScript: new MathRun("5"), + children: [new MathRun("e")], + subScript: [new MathRun("2")], + superScript: [new MathRun("5")], }); const tree = new Formatter().format(mathPreSubScript); diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts index a0bdc321a0..3a58675b0f 100644 --- a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts @@ -6,9 +6,9 @@ import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n- import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties"; export interface IMathPreSubSuperScriptOptions { - readonly child: MathComponent; - readonly subScript: MathComponent; - readonly superScript: MathComponent; + readonly children: MathComponent[]; + readonly subScript: MathComponent[]; + readonly superScript: MathComponent[]; } export class MathPreSubSuperScript extends XmlComponent { @@ -16,7 +16,7 @@ export class MathPreSubSuperScript extends XmlComponent { super("m:sPre"); this.root.push(new MathPreSubSuperScriptProperties()); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); this.root.push(new MathSubScriptElement(options.subScript)); this.root.push(new MathSuperScriptElement(options.superScript)); } diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts index dd33598d81..a3ea8d680c 100644 --- a/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts @@ -9,8 +9,8 @@ describe("MathSubScript", () => { describe("#constructor()", () => { it("should create a MathSubScript with correct root key", () => { const mathSubScript = new MathSubScript({ - child: new MathRun("e"), - subScript: new MathRun("2"), + children: [new MathRun("e")], + subScript: [new MathRun("2")], }); const tree = new Formatter().format(mathSubScript); diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts index a5c26cd06c..319d4d1f1a 100644 --- a/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts @@ -6,8 +6,8 @@ import { MathBase, MathSubScriptElement } from "../../n-ary"; import { MathSubScriptProperties } from "./math-sub-script-function-properties"; export interface IMathSubScriptOptions { - readonly child: MathComponent; - readonly subScript: MathComponent; + readonly children: MathComponent[]; + readonly subScript: MathComponent[]; } export class MathSubScript extends XmlComponent { @@ -15,7 +15,7 @@ export class MathSubScript extends XmlComponent { super("m:sSub"); this.root.push(new MathSubScriptProperties()); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); this.root.push(new MathSubScriptElement(options.subScript)); } } diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts index 5e7f976db7..68a86fb26b 100644 --- a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts @@ -9,9 +9,9 @@ describe("MathSubScript", () => { describe("#constructor()", () => { it("should create a MathSubScript with correct root key", () => { const mathSubScript = new MathSubSuperScript({ - child: new MathRun("e"), - subScript: new MathRun("2"), - superScript: new MathRun("5"), + children: [new MathRun("e")], + subScript: [new MathRun("2")], + superScript: [new MathRun("5")], }); const tree = new Formatter().format(mathSubScript); diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts index 91bdfe6781..c382c9ff4c 100644 --- a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts @@ -6,9 +6,9 @@ import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n- import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties"; export interface IMathSubSuperScriptOptions { - readonly child: MathComponent; - readonly subScript: MathComponent; - readonly superScript: MathComponent; + readonly children: MathComponent[]; + readonly subScript: MathComponent[]; + readonly superScript: MathComponent[]; } export class MathSubSuperScript extends XmlComponent { @@ -16,7 +16,7 @@ export class MathSubSuperScript extends XmlComponent { super("m:sSubSup"); this.root.push(new MathSubSuperScriptProperties()); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); this.root.push(new MathSubScriptElement(options.subScript)); this.root.push(new MathSuperScriptElement(options.superScript)); } diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts b/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts index 6e6beb5e04..ae3740360b 100644 --- a/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts +++ b/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts @@ -9,8 +9,8 @@ describe("MathSuperScript", () => { describe("#constructor()", () => { it("should create a MathSuperScript with correct root key", () => { const mathSuperScript = new MathSuperScript({ - child: new MathRun("e"), - superScript: new MathRun("2"), + children: [new MathRun("e")], + superScript: [new MathRun("2")], }); const tree = new Formatter().format(mathSuperScript); diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function.ts b/src/file/paragraph/math/script/super-script/math-super-script-function.ts index d48ece6985..eeffdf124a 100644 --- a/src/file/paragraph/math/script/super-script/math-super-script-function.ts +++ b/src/file/paragraph/math/script/super-script/math-super-script-function.ts @@ -6,8 +6,8 @@ import { MathBase, MathSuperScriptElement } from "../../n-ary"; import { MathSuperScriptProperties } from "./math-super-script-function-properties"; export interface IMathSuperScriptOptions { - readonly child: MathComponent; - readonly superScript: MathComponent; + readonly children: MathComponent[]; + readonly superScript: MathComponent[]; } export class MathSuperScript extends XmlComponent { @@ -15,7 +15,7 @@ export class MathSuperScript extends XmlComponent { super("m:sSup"); this.root.push(new MathSuperScriptProperties()); - this.root.push(new MathBase(options.child)); + this.root.push(new MathBase(options.children)); this.root.push(new MathSuperScriptElement(options.superScript)); } } From 19d9619785a7c9c40d2a75e22361d3c70620e6fd Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 13 Oct 2020 03:00:14 +0100 Subject: [PATCH 171/260] Add more math documentation --- demo/55-math.ts | 30 +++++---- docs/usage/math.md | 155 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 164 insertions(+), 21 deletions(-) diff --git a/demo/55-math.ts b/demo/55-math.ts index 3dc6c1a17c..2a240986d0 100644 --- a/demo/55-math.ts +++ b/demo/55-math.ts @@ -44,19 +44,23 @@ doc.addSection({ }), ], }), - // new Paragraph({ - // children: [ - // new MathFraction({ - // numerator: [ - // new MathRun("1"), - // new MathRadical({ - // children: [new MathRun("2")], - // }), - // ], - // denominator: [new MathRun("2")], - // }), - // ], - // }), + new Paragraph({ + children: [ + new Math({ + children: [ + new MathFraction({ + numerator: [ + new MathRun("1"), + new MathRadical({ + children: [new MathRun("2")], + }), + ], + denominator: [new MathRun("2")], + }), + ], + }), + ], + }), new Paragraph({ children: [ new Math({ diff --git a/docs/usage/math.md b/docs/usage/math.md index e38f393ac9..1e8ab4f894 100644 --- a/docs/usage/math.md +++ b/docs/usage/math.md @@ -4,9 +4,10 @@ ## Intro -- To add math, create a `Math` object -- Add `MathComponents` inside `Math` -- `MathComponents` can have nested `MathComponents` inside. e.g. A fraction where the numerator is a square root, and the demoninator as another fraction. More on `MathComponents` below +1. To add math, create a `Math` object +2. Add `MathComponents` inside `Math` +3. `MathComponents` can have nested `MathComponents` inside. e.g. A fraction where the numerator is a square root, and the demoninator as another fraction. More on `MathComponents` below +4. Make sure to add the `Math` object inside a `Paragraph` ## Example @@ -76,7 +77,7 @@ new MathFraction({ numerator: [ new MathRun("1"), new MathRadical({ - child: [new MathRun("2")], + children: [new MathRun("2")], }), ], denominator: [new MathRun("2")], @@ -108,19 +109,157 @@ A `MathComponent` for `Σ`. It can take a `superScript` and/or `subScript` as ar ```ts new MathSum({ - child: [new MathRun("i")], + children: [new MathRun("i")], }), ``` ```ts new MathSum({ - child: [ + children: [ new MathSuperScript({ - child: new MathRun("e"), - superScript: new MathRun("2"), + children: [new MathRun("e")], + superScript: [new MathRun("2")], }) ], subScript: [new MathRun("i")], superScript: [new MathRun("10")], }), ``` + +### Radicals + +A `MathComponent` for the `√` symbol. Examples include, square root, cube root etc. There is an optional `degree` parameter to specify the number of times the radicand is multiplied by itself. For example, `3` for cube root. + +```ts +new MathRadical({ + children: [new MathRun("2")], +}), +``` + +Cube root example: + +```ts +new MathRadical({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + new MathRun('+ 1'), + ], + degree: [new MathRun("3")], +}), +``` + +### Super Script + +`MathSuperScripts` are the little numbers written to the top right of numbers or variables. It means the exponent or power if written by itself with the number or variable. + +```ts +new MathSuperScript({ + children: [new MathRun("x")], + superScript: [new MathRun("2")], +}), +``` + +An example with cosine: + +```ts +new MathSuperScript({ + children: [new MathRun("cos")], + superScript: [new MathRun("-1")], +}), +``` + +### Sub Script + +`MathSubScripts` are similar to `MathSuperScripts`, except the little number is written below. + +```ts +new MathSubScript({ + children: [new MathRun("F")], + subScript: [new MathRun("n-1")], +}), +``` + +### Sub-Super Script + +`MathSubSuperScripts` are a combination of both `MathSuperScript` and `MathSubScript`. + +```ts +new MathSubSuperScript({ + children: [new MathRun("test")], + superScript: [new MathRun("hello")], + subScript: [new MathRun("world")], +}), +``` + +### Function + +`MathFunctions` are a way of describing what happens to an input variable, in order to get the output result. It takes a `name` parameter to specify the name of the function. + +```ts +new MathFunction({ + name: [ + new MathSuperScript({ + children: [new MathRun("cos")], + superScript: [new MathRun("-1")], + }), + ], + children: [new MathRun("100")], +}), +``` + +### Brackets + +#### Square brackets + +```ts +new MathSquareBrackets({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], +}), +``` + +#### Round brackets + +```ts +new MathRoundBrackets({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], +}), +``` + +#### Curly brackets + +```ts +new MathCurlyBrackets({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], +}), +``` + +#### Angled brackets + +```ts +new MathAngledBrackets({ + children: [ + new MathFraction({ + numerator: [new MathRun("1")], + denominator: [new MathRun("2")], + }), + ], +}), +``` From ae37b1980f7a5f8d6be3ec5d2e791c6f01605a97 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 16 Oct 2020 16:20:04 +0100 Subject: [PATCH 172/260] Update Prettier --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f9a27f0fcb..b5d29a3384 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "mocha-webpack": "^1.0.1", "nyc": "^15.1.0", "pre-commit": "^1.2.2", - "prettier": "^2.0.5", + "prettier": "^2.1.2", "prompt": "^1.0.0", "replace-in-file": "^3.1.0", "request": "^2.88.0", From 6db0449ed0d849cffaef108b8d0543eb8e668283 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 11:55:53 +0000 Subject: [PATCH 173/260] build(deps-dev): bump @types/webpack from 4.41.22 to 4.41.23 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.41.22 to 4.41.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d28a68d7d..79614df1c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -661,18 +661,18 @@ "dev": true }, "@types/uglify-js": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.9.3.tgz", - "integrity": "sha512-KswB5C7Kwduwjj04Ykz+AjvPcfgv/37Za24O2EDzYNbwyzOo8+ydtvzUfZ5UMguiVu29Gx44l1A6VsPPcmYu9w==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.11.0.tgz", + "integrity": "sha512-I0Yd8TUELTbgRHq2K65j8rnDPAzAP+DiaF/syLem7yXwYLsHZhPd+AM2iXsWmf9P2F2NlFCgl5erZPQx9IbM9Q==", "dev": true, "requires": { "source-map": "^0.6.1" } }, "@types/webpack": { - "version": "4.41.22", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.22.tgz", - "integrity": "sha512-JQDJK6pj8OMV9gWOnN1dcLCyU9Hzs6lux0wBO4lr1+gyEhIBR9U3FMrz12t2GPkg110XAxEAw2WHF6g7nZIbRQ==", + "version": "4.41.23", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.23.tgz", + "integrity": "sha512-ojA4CupZg8RCzVJLugWlvqrHpT59GWhqFxbinlsnvk10MjQCWB+ot7XDACctbWhnhtdhYK7+HOH1JxkVLiZhMg==", "dev": true, "requires": { "@types/anymatch": "*", @@ -684,9 +684,9 @@ } }, "@types/webpack-sources": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-1.4.2.tgz", - "integrity": "sha512-77T++JyKow4BQB/m9O96n9d/UUHWLQHlcqXb9Vsf4F1+wKNrrlWNFPDLKNT92RJnCSL6CieTc+NDXtCVZswdTw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.0.0.tgz", + "integrity": "sha512-a5kPx98CNFRKQ+wqawroFunvFqv7GHm/3KOI52NY9xWADgc8smu4R6prt4EU/M4QfVjvgBkMqU4fBhw3QfMVkg==", "dev": true, "requires": { "@types/node": "*", @@ -4843,7 +4843,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, From dcf755e75639239d8b5501bacf7bd948c3dbf13e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2020 00:40:43 +0000 Subject: [PATCH 174/260] build(deps): bump shortid from 2.2.15 to 2.2.16 Bumps [shortid](https://github.com/dylang/shortid) from 2.2.15 to 2.2.16. - [Release notes](https://github.com/dylang/shortid/releases) - [Changelog](https://github.com/dylang/shortid/blob/master/CHANGELOG.md) - [Commits](https://github.com/dylang/shortid/compare/2.2.15...2.2.16) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 79614df1c7..77132c4a3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5560,9 +5560,9 @@ "optional": true }, "nanoid": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.6.tgz", - "integrity": "sha512-2NDzpiuEy3+H0AVtdt8LoFi7PnqkOnIzYmJQp7xsEU6VexLluHQwKREuiz57XaQC5006seIadPrIZJhyS2n7aw==" + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" }, "nanomatch": { "version": "1.2.13", @@ -7289,9 +7289,9 @@ } }, "shortid": { - "version": "2.2.15", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.15.tgz", - "integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==", + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", + "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", "requires": { "nanoid": "^2.1.0" } From ea5f9a48ab16bdc20748e74c46052946f51f2fee Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 24 Oct 2020 20:24:10 +0100 Subject: [PATCH 175/260] Fix cantSplit documentation --- docs/usage/tables.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage/tables.md b/docs/usage/tables.md index 38a74f8ba7..8d10b55ca3 100644 --- a/docs/usage/tables.md +++ b/docs/usage/tables.md @@ -51,19 +51,6 @@ const table = new Table({ }); ``` -### Pagination - -#### Prevent row pagination - -To prevent breaking contents of a row across multiple pages, call `cantSplit`: - -```ts -const table = new Table({ - rows: [], - cantSplit: true, -}); -``` - ## Table Row A table consists of multiple `table rows`. Table rows have a list of `children` which accepts a list of `table cells` explained below. You can create a simple `table row` like so: @@ -116,6 +103,19 @@ const row = new TableRow({ }); ``` +### Pagination + +#### Prevent row pagination + +To prevent breaking contents of a row across multiple pages, call `cantSplit`: + +```ts +const row = new Row({ + ..., + cantSplit: true, +}); +``` + ## Table Cells Cells need to be added in the `table row`, you can create a table cell like: From 18a1677588bc2b331f73ba21e738b92b0d74218e Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 24 Oct 2020 21:38:20 +0100 Subject: [PATCH 176/260] Add documentation reference --- src/file/table/table-row/table-row-properties.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/file/table/table-row/table-row-properties.ts b/src/file/table/table-row/table-row-properties.ts index c9b60c13f4..8e4d518e6f 100644 --- a/src/file/table/table-row/table-row-properties.ts +++ b/src/file/table/table-row/table-row-properties.ts @@ -1,6 +1,8 @@ -import { HeightRule, TableRowHeight } from "file/table/table-row/table-row-height"; +// http://officeopenxml.com/WPtableRowProperties.php import { IgnoreIfEmptyXmlComponent, XmlAttributeComponent, XmlComponent } from "file/xml-components"; +import { HeightRule, TableRowHeight } from "./table-row-height"; + export class TableRowProperties extends IgnoreIfEmptyXmlComponent { constructor() { super("w:trPr"); From ed52ef358be1750508e5b632241dce5104bd0239 Mon Sep 17 00:00:00 2001 From: Dolan Date: Tue, 27 Oct 2020 01:54:40 +0000 Subject: [PATCH 177/260] Background color for document --- demo/56-background-color.ts | 33 ++++++++++++ docs/usage/document.md | 18 +++++++ src/file/core-properties/properties.ts | 2 + .../document-background.spec.ts | 53 +++++++++++++++++++ .../document-background.ts | 39 ++++++++++++++ .../document/document-background/index.ts | 1 + src/file/document/document.spec.ts | 9 +++- src/file/document/document.ts | 8 ++- src/file/document/index.ts | 1 + src/file/file.ts | 2 +- .../settings/display-background-shape.spec.ts | 17 ++++++ src/file/settings/display-background-shape.ts | 9 ++++ src/file/settings/settings.spec.ts | 21 ++++---- src/file/settings/settings.ts | 4 ++ 14 files changed, 203 insertions(+), 14 deletions(-) create mode 100644 demo/56-background-color.ts create mode 100644 src/file/document/document-background/document-background.spec.ts create mode 100644 src/file/document/document-background/document-background.ts create mode 100644 src/file/document/document-background/index.ts create mode 100644 src/file/settings/display-background-shape.spec.ts create mode 100644 src/file/settings/display-background-shape.ts diff --git a/demo/56-background-color.ts b/demo/56-background-color.ts new file mode 100644 index 0000000000..6e8658fd00 --- /dev/null +++ b/demo/56-background-color.ts @@ -0,0 +1,33 @@ +// Change background colour of whole document +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, Packer, Paragraph, TextRun } from "../build"; + +const doc = new Document({ + background: { + color: "C45911", + }, +}); + +doc.addSection({ + properties: {}, + children: [ + new Paragraph({ + children: [ + new TextRun("Hello World"), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + new TextRun({ + text: "\tGithub is the best", + bold: true, + }), + ], + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); diff --git a/docs/usage/document.md b/docs/usage/document.md index bf06d30613..37c8eb1fdb 100644 --- a/docs/usage/document.md +++ b/docs/usage/document.md @@ -30,6 +30,24 @@ const doc = new docx.Document({ * keywords * lastModifiedBy * revision +* externalStyles +* styles +* numbering +* footnotes +* hyperlinks +* background + +### Change background color of Document + +Set the hax value in the document like so: + +```ts +const doc = new docx.Document({ + background: { + color: "C45911", + }, +}); +``` You can mix and match whatever properties you want, or provide no properties. diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index ceddff39e0..96e9785175 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "file/xml-components"; +import { IDocumentBackgroundOptions } from "../document"; import { DocumentAttributes } from "../document/document-attributes"; import { INumberingOptions } from "../numbering"; @@ -32,6 +33,7 @@ export interface IPropertiesOptions { readonly hyperlinks?: { readonly [key: string]: IInternalHyperlinkDefinition | IExternalHyperlinkDefinition; }; + readonly background?: IDocumentBackgroundOptions; } export class CoreProperties extends XmlComponent { diff --git a/src/file/document/document-background/document-background.spec.ts b/src/file/document/document-background/document-background.spec.ts new file mode 100644 index 0000000000..fb7444feb2 --- /dev/null +++ b/src/file/document/document-background/document-background.spec.ts @@ -0,0 +1,53 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { DocumentBackground } from "./document-background"; + +describe("DocumentBackground", () => { + describe("#constructor()", () => { + it("should create a DocumentBackground with no options and set color to auto", () => { + const documentBackground = new DocumentBackground({}); + const tree = new Formatter().format(documentBackground); + expect(tree).to.deep.equal({ + "w:background": { + _attr: { + "w:color": "auto", + }, + }, + }); + }); + + it("should create a DocumentBackground with no options and set color to value", () => { + const documentBackground = new DocumentBackground({ color: "ffffff" }); + const tree = new Formatter().format(documentBackground); + expect(tree).to.deep.equal({ + "w:background": { + _attr: { + "w:color": "ffffff", + }, + }, + }); + }); + + it("should create a DocumentBackground with no options and set other values", () => { + const documentBackground = new DocumentBackground({ + color: "ffffff", + themeColor: "test", + themeShade: "test", + themeTint: "test", + }); + const tree = new Formatter().format(documentBackground); + expect(tree).to.deep.equal({ + "w:background": { + _attr: { + "w:color": "ffffff", + "w:themeColor": "test", + "w:themeShade": "test", + "w:themeTint": "test", + }, + }, + }); + }); + }); +}); diff --git a/src/file/document/document-background/document-background.ts b/src/file/document/document-background/document-background.ts new file mode 100644 index 0000000000..82814c573f --- /dev/null +++ b/src/file/document/document-background/document-background.ts @@ -0,0 +1,39 @@ +// http://officeopenxml.com/WPdocument.php +// http://www.datypic.com/sc/ooxml/e-w_background-1.html +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +export class DocumentBackgroundAttributes extends XmlAttributeComponent<{ + readonly color: string; + readonly themeColor?: string; + readonly themeShade?: string; + readonly themeTint?: string; +}> { + protected readonly xmlKeys = { + color: "w:color", + themeColor: "w:themeColor", + themeShade: "w:themeShade", + themeTint: "w:themeTint", + }; +} + +export interface IDocumentBackgroundOptions { + readonly color?: string; + readonly themeColor?: string; + readonly themeShade?: string; + readonly themeTint?: string; +} + +export class DocumentBackground extends XmlComponent { + constructor(options: IDocumentBackgroundOptions) { + super("w:background"); + + this.root.push( + new DocumentBackgroundAttributes({ + color: options.color ? options.color : "auto", + themeColor: options.themeColor, + themeShade: options.themeShade, + themeTint: options.themeTint, + }), + ); + } +} diff --git a/src/file/document/document-background/index.ts b/src/file/document/document-background/index.ts new file mode 100644 index 0000000000..604f3da1f2 --- /dev/null +++ b/src/file/document/document-background/index.ts @@ -0,0 +1 @@ +export * from "./document-background"; diff --git a/src/file/document/document.spec.ts b/src/file/document/document.spec.ts index dba489601e..429825cfa4 100644 --- a/src/file/document/document.spec.ts +++ b/src/file/document/document.spec.ts @@ -8,7 +8,7 @@ describe("Document", () => { let document: Document; beforeEach(() => { - document = new Document(); + document = new Document({ background: {} }); }); describe("#constructor()", () => { @@ -38,6 +38,13 @@ describe("Document", () => { "mc:Ignorable": "w14 w15 wp14", }, }, + { + "w:background": { + _attr: { + "w:color": "auto", + }, + }, + }, { "w:body": {} }, ], }); diff --git a/src/file/document/document.ts b/src/file/document/document.ts index 80b04a379c..fb0f579568 100644 --- a/src/file/document/document.ts +++ b/src/file/document/document.ts @@ -5,11 +5,16 @@ import { Table } from "../table"; import { TableOfContents } from "../table-of-contents"; import { Body } from "./body"; import { DocumentAttributes } from "./document-attributes"; +import { DocumentBackground, IDocumentBackgroundOptions } from "./document-background"; + +interface IDocumentOptions { + readonly background: IDocumentBackgroundOptions; +} export class Document extends XmlComponent { private readonly body: Body; - constructor() { + constructor(options: IDocumentOptions) { super("w:document"); this.root.push( new DocumentAttributes({ @@ -33,6 +38,7 @@ export class Document extends XmlComponent { }), ); this.body = new Body(); + this.root.push(new DocumentBackground(options.background)); this.root.push(this.body); } diff --git a/src/file/document/index.ts b/src/file/document/index.ts index 3430666623..a93dd86f99 100644 --- a/src/file/document/index.ts +++ b/src/file/document/index.ts @@ -1,3 +1,4 @@ export * from "./document"; export * from "./document-attributes"; export * from "./body"; +export * from "./document-background"; diff --git a/src/file/file.ts b/src/file/file.ts index 270714ed17..15a4dc9739 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -85,7 +85,7 @@ export class File { this.appProperties = new AppProperties(); this.footNotes = new FootNotes(); this.contentTypes = new ContentTypes(); - this.document = new Document(); + this.document = new Document({ background: options.background || {} }); this.settings = new Settings(); this.media = fileProperties.template && fileProperties.template.media ? fileProperties.template.media : new Media(); diff --git a/src/file/settings/display-background-shape.spec.ts b/src/file/settings/display-background-shape.spec.ts new file mode 100644 index 0000000000..34c23b65db --- /dev/null +++ b/src/file/settings/display-background-shape.spec.ts @@ -0,0 +1,17 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { DisplayBackgroundShape } from "./display-background-shape"; + +describe("DisplayBackgroundShape", () => { + describe("#constructor()", () => { + it("should create", () => { + const displayBackgroundShape = new DisplayBackgroundShape(); + const tree = new Formatter().format(displayBackgroundShape); + expect(tree).to.deep.equal({ + "w:displayBackgroundShape": {}, + }); + }); + }); +}); diff --git a/src/file/settings/display-background-shape.ts b/src/file/settings/display-background-shape.ts new file mode 100644 index 0000000000..bd0cd15675 --- /dev/null +++ b/src/file/settings/display-background-shape.ts @@ -0,0 +1,9 @@ +// http://officeopenxml.com/WPdocument.php +// http://www.datypic.com/sc/ooxml/e-w_background-1.html +import { XmlComponent } from "file/xml-components"; + +export class DisplayBackgroundShape extends XmlComponent { + constructor() { + super("w:displayBackgroundShape"); + } +} diff --git a/src/file/settings/settings.spec.ts b/src/file/settings/settings.spec.ts index 9be90669aa..69c7c089d5 100644 --- a/src/file/settings/settings.spec.ts +++ b/src/file/settings/settings.spec.ts @@ -15,8 +15,7 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); keys = Object.keys(tree["w:settings"]); expect(keys).is.an.instanceof(Array); - expect(keys).has.length(1); - expect(keys[0]).to.be.equal("_attr"); + expect(keys).has.length(2); }); }); describe("#addUpdateFields", () => { @@ -28,16 +27,16 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(2); + expect(rootArray).has.length(3); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[1]); + keys = Object.keys(rootArray[2]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:updateFields"); - const updateFields = rootArray[1]["w:updateFields"]; + const updateFields = rootArray[2]["w:updateFields"]; keys = Object.keys(updateFields); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); @@ -68,12 +67,12 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(2); + expect(rootArray).has.length(3); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[1]); + keys = Object.keys(rootArray[2]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:compat"); @@ -89,12 +88,12 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(2); + expect(rootArray).has.length(3); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[1]); + keys = Object.keys(rootArray[2]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:trackRevisions"); @@ -111,12 +110,12 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(2); + expect(rootArray).has.length(3); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[1]); + keys = Object.keys(rootArray[2]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:trackRevisions"); diff --git a/src/file/settings/settings.ts b/src/file/settings/settings.ts index d828d21fb5..d838e8ccc7 100644 --- a/src/file/settings/settings.ts +++ b/src/file/settings/settings.ts @@ -1,5 +1,6 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; import { Compatibility } from "./compatibility"; +import { DisplayBackgroundShape } from "./display-background-shape"; import { TrackRevisions } from "./track-revisions"; import { UpdateFields } from "./update-fields"; @@ -72,8 +73,11 @@ export class Settings extends XmlComponent { Ignorable: "w14 w15 wp14", }), ); + this.compatibility = new Compatibility(); this.trackRevisions = new TrackRevisions(); + + this.root.push(new DisplayBackgroundShape()); } public addUpdateFields(): void { From 60eb686d05ee3cd0004ad5b2d405fd75d98588d3 Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 28 Oct 2020 01:05:31 +0000 Subject: [PATCH 178/260] Add shading to paragraph --- demo/46-shading-text.ts | 12 ++++ docs/usage/paragraph.md | 15 +++++ docs/usage/text.md | 63 ++++++++++++++----- .../document-background.spec.ts | 10 +-- .../document-background.ts | 2 +- src/file/document/document.spec.ts | 2 +- src/file/paragraph/paragraph.spec.ts | 31 +++++++++ src/file/paragraph/properties.ts | 11 ++++ 8 files changed, 124 insertions(+), 22 deletions(-) diff --git a/demo/46-shading-text.ts b/demo/46-shading-text.ts index 61f3f3d984..e662e6dffe 100644 --- a/demo/46-shading-text.ts +++ b/demo/46-shading-text.ts @@ -28,6 +28,18 @@ doc.addSection({ }), ], }), + new Paragraph({ + shading: { + type: ShadingType.DIAGONAL_CROSS, + color: "00FFFF", + fill: "FF0000", + }, + children: [ + new TextRun({ + text: "Hello World for entire paragraph", + }), + ], + }), ], }), }, diff --git a/docs/usage/paragraph.md b/docs/usage/paragraph.md index f6da3ec963..ceb4e0aa34 100644 --- a/docs/usage/paragraph.md +++ b/docs/usage/paragraph.md @@ -142,6 +142,21 @@ const paragraph = new Paragraph({ }); ``` +## Shading + +Add color to an entire paragraph block + +```ts +const paragraph = new Paragraph({ + text: "shading", + shading: { + type: ShadingType.REVERSE_DIAGONAL_STRIPE, + color: "00FFFF", + fill: "FF0000", + }, +}); +``` + ## Spacing Adding spacing between paragraphs diff --git a/docs/usage/text.md b/docs/usage/text.md index 4816959eb6..3ae388f780 100644 --- a/docs/usage/text.md +++ b/docs/usage/text.md @@ -77,40 +77,78 @@ const text = new TextRun({ }); ``` +### Shading and Highlighting + +```ts +const text = new TextRun({ + text: "shading", + shading: { + type: ShadingType.REVERSE_DIAGONAL_STRIPE, + color: "00FFFF", + fill: "FF0000", + }, +}); +``` + +```ts +const text = new TextRun({ + text: "highlighting", + highlight: "yellow", +}); +``` + ### Strike through ```ts -text.strike(); +const text = new TextRun({ + text: "strike", + strike: true, +}); ``` ### Double strike through ```ts -text.doubleStrike(); +const text = new TextRun({ + text: "doubleStrike", + doubleStrike: true, +}); ``` ### Superscript ```ts -text.superScript(); +const text = new TextRun({ + text: "superScript", + superScript: true, +}); ``` ### Subscript ```ts -text.subScript(); +const text = new TextRun({ + text: "subScript", + subScript: true, +}); ``` ### All Capitals ```ts -text.allCaps(); +const text = new TextRun({ + text: "allCaps", + allCaps: true, +}); ``` ### Small Capitals ```ts -text.smallCaps(); +const text = new TextRun({ + text: "smallCaps", + smallCaps: true, +}); ``` ## Break @@ -118,13 +156,8 @@ text.smallCaps(); Sometimes you would want to put text underneath another line of text but inside the same paragraph. ```ts -text.break(); -``` - -## Chaining - -What if you want to create a paragraph which is **_bold_** and **_italic_**? - -```ts -paragraph.bold().italics(); +const text = new TextRun({ + text: "break", + break: true, +}); ``` diff --git a/src/file/document/document-background/document-background.spec.ts b/src/file/document/document-background/document-background.spec.ts index fb7444feb2..83d1fb36b1 100644 --- a/src/file/document/document-background/document-background.spec.ts +++ b/src/file/document/document-background/document-background.spec.ts @@ -12,19 +12,19 @@ describe("DocumentBackground", () => { expect(tree).to.deep.equal({ "w:background": { _attr: { - "w:color": "auto", + "w:color": "FFFFFF", }, }, }); }); it("should create a DocumentBackground with no options and set color to value", () => { - const documentBackground = new DocumentBackground({ color: "ffffff" }); + const documentBackground = new DocumentBackground({ color: "ffff00" }); const tree = new Formatter().format(documentBackground); expect(tree).to.deep.equal({ "w:background": { _attr: { - "w:color": "ffffff", + "w:color": "ffff00", }, }, }); @@ -32,7 +32,7 @@ describe("DocumentBackground", () => { it("should create a DocumentBackground with no options and set other values", () => { const documentBackground = new DocumentBackground({ - color: "ffffff", + color: "ffff00", themeColor: "test", themeShade: "test", themeTint: "test", @@ -41,7 +41,7 @@ describe("DocumentBackground", () => { expect(tree).to.deep.equal({ "w:background": { _attr: { - "w:color": "ffffff", + "w:color": "ffff00", "w:themeColor": "test", "w:themeShade": "test", "w:themeTint": "test", diff --git a/src/file/document/document-background/document-background.ts b/src/file/document/document-background/document-background.ts index 82814c573f..44b04aabe6 100644 --- a/src/file/document/document-background/document-background.ts +++ b/src/file/document/document-background/document-background.ts @@ -29,7 +29,7 @@ export class DocumentBackground extends XmlComponent { this.root.push( new DocumentBackgroundAttributes({ - color: options.color ? options.color : "auto", + color: options.color ? options.color : "FFFFFF", themeColor: options.themeColor, themeShade: options.themeShade, themeTint: options.themeTint, diff --git a/src/file/document/document.spec.ts b/src/file/document/document.spec.ts index 429825cfa4..d903ff78aa 100644 --- a/src/file/document/document.spec.ts +++ b/src/file/document/document.spec.ts @@ -41,7 +41,7 @@ describe("Document", () => { { "w:background": { _attr: { - "w:color": "auto", + "w:color": "FFFFFF", }, }, }, diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index 0b8e9acd00..ced4355869 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -9,6 +9,7 @@ import { File } from "../file"; import { AlignmentType, HeadingLevel, LeaderType, PageBreak, TabStopPosition, TabStopType } from "./formatting"; import { Bookmark, HyperlinkRef } from "./links"; import { Paragraph } from "./paragraph"; +import { ShadingType } from "../table/shading"; describe("Paragraph", () => { describe("#constructor()", () => { @@ -761,6 +762,36 @@ describe("Paragraph", () => { }); }); + describe("#shading", () => { + it("should set paragraph outline level to the given value", () => { + const paragraph = new Paragraph({ + shading: { + type: ShadingType.REVERSE_DIAGONAL_STRIPE, + color: "00FFFF", + fill: "FF0000", + }, + }); + const tree = new Formatter().format(paragraph); + expect(tree).to.deep.equal({ + "w:p": [ + { + "w:pPr": [ + { + "w:shd": { + _attr: { + "w:color": "00FFFF", + "w:fill": "FF0000", + "w:val": "reverseDiagStripe", + }, + }, + }, + ], + }, + ], + }); + }); + }); + describe("#prepForXml", () => { it("should set paragraph outline level to the given value", () => { const paragraph = new Paragraph({ diff --git a/src/file/paragraph/properties.ts b/src/file/paragraph/properties.ts index af97e2c684..b12bfedd8e 100644 --- a/src/file/paragraph/properties.ts +++ b/src/file/paragraph/properties.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/WPparagraphProperties.php import { IgnoreIfEmptyXmlComponent, XmlComponent } from "file/xml-components"; +import { ShadingType } from "../table/shading"; import { Alignment, AlignmentType } from "./formatting/alignment"; import { Bidirectional } from "./formatting/bidirectional"; import { Border, IBorderOptions, ThematicBreak } from "./formatting/border"; @@ -11,6 +12,7 @@ import { HeadingLevel, Style } from "./formatting/style"; import { LeaderType, TabStop, TabStopPosition, TabStopType } from "./formatting/tab-stop"; import { NumberProperties } from "./formatting/unordered-list"; import { OutlineLevel } from "./links"; +import { Shading } from "./run/formatting"; export interface IParagraphStylePropertiesOptions { readonly alignment?: AlignmentType; @@ -44,6 +46,11 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp readonly level: number; readonly custom?: boolean; }; + readonly shading?: { + readonly type: ShadingType; + readonly fill: string; + readonly color: string; + }; } export class ParagraphProperties extends IgnoreIfEmptyXmlComponent { @@ -131,6 +138,10 @@ export class ParagraphProperties extends IgnoreIfEmptyXmlComponent { if (options.leftTabStop) { this.push(new TabStop(TabStopType.LEFT, options.leftTabStop)); } + + if (options.shading) { + this.push(new Shading(options.shading.type, options.shading.fill, options.shading.color)); + } } public push(item: XmlComponent): void { From 0f3afd94f3907c852956563d520893cf076858d9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 15:28:10 +0000 Subject: [PATCH 179/260] build(deps-dev): bump sinon from 9.2.0 to 9.2.1 Bumps [sinon](https://github.com/sinonjs/sinon) from 9.2.0 to 9.2.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 77132c4a3c..a3d87f539d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7303,9 +7303,9 @@ "dev": true }, "sinon": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.0.tgz", - "integrity": "sha512-eSNXz1XMcGEMHw08NJXSyTHIu6qTCOiN8x9ODACmZpNQpr0aXTBXBnI4xTzQzR+TEpOmLiKowGf9flCuKIzsbw==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.1.tgz", + "integrity": "sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.1", From 610b2388bb2e10d844cebebf7cb84c988a164a25 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 29 Oct 2020 00:39:45 +0000 Subject: [PATCH 180/260] Fix linting --- src/file/paragraph/paragraph.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index ced4355869..a368684d40 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -6,10 +6,10 @@ import { Formatter } from "export/formatter"; import { EMPTY_OBJECT } from "file/xml-components"; import { File } from "../file"; +import { ShadingType } from "../table/shading"; import { AlignmentType, HeadingLevel, LeaderType, PageBreak, TabStopPosition, TabStopType } from "./formatting"; import { Bookmark, HyperlinkRef } from "./links"; import { Paragraph } from "./paragraph"; -import { ShadingType } from "../table/shading"; describe("Paragraph", () => { describe("#constructor()", () => { From 1552ebde1116a8e2e020b09725d8a72a284241e0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 22:54:05 +0000 Subject: [PATCH 181/260] build(deps-dev): bump @types/webpack from 4.41.23 to 4.41.24 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.41.23 to 4.41.24. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3d87f539d..e0566ca4d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -661,18 +661,18 @@ "dev": true }, "@types/uglify-js": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.11.0.tgz", - "integrity": "sha512-I0Yd8TUELTbgRHq2K65j8rnDPAzAP+DiaF/syLem7yXwYLsHZhPd+AM2iXsWmf9P2F2NlFCgl5erZPQx9IbM9Q==", + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.11.1.tgz", + "integrity": "sha512-7npvPKV+jINLu1SpSYVWG8KvyJBhBa8tmzMMdDoVc2pWUYHN8KIXlPJhjJ4LT97c4dXJA2SHL/q6ADbDriZN+Q==", "dev": true, "requires": { "source-map": "^0.6.1" } }, "@types/webpack": { - "version": "4.41.23", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.23.tgz", - "integrity": "sha512-ojA4CupZg8RCzVJLugWlvqrHpT59GWhqFxbinlsnvk10MjQCWB+ot7XDACctbWhnhtdhYK7+HOH1JxkVLiZhMg==", + "version": "4.41.24", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.24.tgz", + "integrity": "sha512-1A0MXPwZiMOD3DPMuOKUKcpkdPo8Lq33UGggZ7xio6wJ/jV1dAu5cXDrOfGDnldUroPIRLsr/DT43/GqOA4RFQ==", "dev": true, "requires": { "@types/anymatch": "*", From 37e610d2b3beacef8d6f64f0890f74a4d387a4b9 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 30 Oct 2020 00:13:52 +0000 Subject: [PATCH 182/260] Fix typo --- docs/usage/document.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/document.md b/docs/usage/document.md index 37c8eb1fdb..0f1a12486a 100644 --- a/docs/usage/document.md +++ b/docs/usage/document.md @@ -39,7 +39,7 @@ const doc = new docx.Document({ ### Change background color of Document -Set the hax value in the document like so: +Set the hex value in the document like so: ```ts const doc = new docx.Document({ From 34b2029efeae9accc40f776f5b17a90cf7e1e62a Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 4 Nov 2020 00:00:16 +0000 Subject: [PATCH 183/260] Change API of track revisions to declarative --- demo/54-track-revisions.ts | 31 ++++++++++++++++++-------- docs/usage/change-tracking.md | 9 +++++--- src/file/core-properties/properties.ts | 3 +++ src/file/file.ts | 6 +++++ 4 files changed, 37 insertions(+), 12 deletions(-) diff --git a/demo/54-track-revisions.ts b/demo/54-track-revisions.ts index 01d96082b8..a0cc47a03b 100644 --- a/demo/54-track-revisions.ts +++ b/demo/54-track-revisions.ts @@ -1,7 +1,19 @@ // Track Revisions aka. "Track Changes" // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, Packer, Paragraph, TextRun, ShadingType, DeletedTextRun, InsertedTextRun, Footer, PageNumber, AlignmentType, FootnoteReferenceRun } from "../build"; +import { + AlignmentType, + DeletedTextRun, + Document, + Footer, + FootnoteReferenceRun, + InsertedTextRun, + Packer, + PageNumber, + Paragraph, + ShadingType, + TextRun, +} from "../build"; /* For reference, see @@ -17,7 +29,7 @@ import { Document, Packer, Paragraph, TextRun, ShadingType, DeletedTextRun, Inse const doc = new Document({ footnotes: [ new Paragraph({ - children:[ + children: [ new TextRun("This is a footnote"), new DeletedTextRun({ text: " with some extra text which was deleted", @@ -30,19 +42,20 @@ const doc = new Document({ id: 1, author: "Firstname Lastname", date: "2020-10-06T09:05:00Z", - }) - ] + }), + ], }), ], + features: { + trackRevisions: true, + }, }); -doc.Settings.addTrackRevisions() - const paragraph = new Paragraph({ children: [ new TextRun("This is a simple demo "), new TextRun({ - text: "on how to " + text: "on how to ", }), new InsertedTextRun({ text: "mark a text as an insertion ", @@ -55,7 +68,7 @@ const paragraph = new Paragraph({ id: 1, author: "Firstname Lastname", date: "2020-10-06T09:00:00Z", - }) + }), ], }); @@ -92,7 +105,7 @@ doc.addSection({ }), new TextRun({ bold: true, - children: [ "\tuse Inserted and Deleted TextRuns.", new FootnoteReferenceRun(1) ], + children: ["\tuse Inserted and Deleted TextRuns.", new FootnoteReferenceRun(1)], }), ], }), diff --git a/docs/usage/change-tracking.md b/docs/usage/change-tracking.md index 6f81e4d0d7..a5ca66ebb3 100644 --- a/docs/usage/change-tracking.md +++ b/docs/usage/change-tracking.md @@ -53,6 +53,9 @@ In addtion to marking text as inserted or deleted, change tracking can also be a ```ts import { Document } from "docx"; -const doc = new Document({}); -doc.Settings.addTrackRevisions() -``` \ No newline at end of file +const doc = new Document({ + features: { + trackRevisions: true, + }, +}); +``` diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index 96e9785175..ae9f227ad5 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -34,6 +34,9 @@ export interface IPropertiesOptions { readonly [key: string]: IInternalHyperlinkDefinition | IExternalHyperlinkDefinition; }; readonly background?: IDocumentBackgroundOptions; + readonly features?: { + readonly trackRevisions?: boolean; + }; } export class CoreProperties extends XmlComponent { diff --git a/src/file/file.ts b/src/file/file.ts index 15a4dc9739..1c655253de 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -170,6 +170,12 @@ export class File { this.hyperlinkCache = cache; } + + if (options.features) { + if (options.features.trackRevisions) { + this.settings.addTrackRevisions(); + } + } } public addSection({ From c7ea26e422ed41b51ff8366fde59f205e4ca88a1 Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 4 Nov 2020 01:28:46 +0000 Subject: [PATCH 184/260] Add tests --- src/file/file.spec.ts | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/file/file.spec.ts b/src/file/file.spec.ts index 6ec30e1be9..9b93a63db1 100644 --- a/src/file/file.spec.ts +++ b/src/file/file.spec.ts @@ -5,7 +5,7 @@ import { Formatter } from "export/formatter"; import { File } from "./file"; import { Footer, Header } from "./header"; -import { HyperlinkRef, Paragraph } from "./paragraph"; +import { HyperlinkRef, HyperlinkType, Paragraph } from "./paragraph"; import { Table, TableCell, TableRow } from "./table"; import { TableOfContents } from "./table-of-contents"; @@ -243,12 +243,40 @@ describe("File", () => { }); }); + describe("#addTrackRevisionsFeature", () => { + it("should call the underlying document's add", () => { + const file = new File({ + features: { + trackRevisions: true, + }, + }); + + // tslint:disable-next-line: no-unused-expression no-string-literal + expect(file.Settings["trackRevisions"]).to.exist; + }); + }); + describe("#HyperlinkCache", () => { it("should initially have empty hyperlink cache", () => { const file = new File(); expect(file.HyperlinkCache).to.deep.equal({}); }); + + it("should have hyperlink cache when option is added", () => { + const file = new File({ + hyperlinks: { + myCoolLink: { + link: "http://www.example.com", + text: "Hyperlink", + type: HyperlinkType.EXTERNAL, + }, + }, + }); + + // tslint:disable-next-line: no-unused-expression no-string-literal + expect(file.HyperlinkCache["myCoolLink"]).to.exist; + }); }); describe("#createFootnote", () => { From 82bdb301f9588d9e8f02de6b946e7a4b9453118a Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 4 Nov 2020 02:52:28 +0000 Subject: [PATCH 185/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5d29a3384..0e3a678600 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.3.0", + "version": "5.4.0", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From e0b2f59c2fcd28f3a340922f4f1b0051a04b8d43 Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 4 Nov 2020 23:36:28 +0000 Subject: [PATCH 186/260] Add initial GitHub Actions workflow --- .github/workflows/default.yml | 99 +++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/default.yml diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000000..b3d4aab0a9 --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,99 @@ +name: Default +on: + push: + branches: + - master + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Install Dependencies + run: npm ci + - name: Build + run: npm run build + - name: Archive Production Artifact + uses: actions/upload-artifact@master + with: + name: build + path: build + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Install Dependencies + run: npm ci + - name: Test + run: npm run test.coverage + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Install Dependencies + run: npm ci + - name: Lint + run: npm run lint + prettier: + name: Prettier + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Install Dependencies + run: npm ci + - name: Prettier + run: npm run prettier + demos: + name: Run Demos + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Install Dependencies + run: npm ci + - name: Prettier + run: | + npm run ts-node -- ./demo/1-basic.ts + # - npm run e2e "My Document.docx" + npm run ts-node -- ./demo/2-declaritive-styles.ts + npm run ts-node -- ./demo/3-numbering-and-bullet-points.ts + npm run ts-node -- ./demo/4-basic-table.ts + npm run ts-node -- ./demo/5-images.ts + npm run ts-node -- ./demo/6-page-borders.ts + npm run ts-node -- ./demo/7-landscape.ts + npm run ts-node -- ./demo/8-header-footer.ts + npm run ts-node -- ./demo/9-images-in-header-and-footer.ts + npm run ts-node -- ./demo/10-my-cv.ts + # - npm run e2e "My Document.docx" + npm run ts-node -- ./demo/11-declaritive-styles-2.ts + npm run ts-node -- ./demo/12-scaling-images.ts + npm run ts-node -- ./demo/13-xml-styles.ts + npm run ts-node -- ./demo/14-page-numbers.ts + npm run ts-node -- ./demo/15-page-break-before.ts + npm run ts-node -- ./demo/16-multiple-sections.ts + npm run ts-node -- ./demo/17-footnotes.ts + npm run ts-node -- ./demo/18-image-from-buffer.ts + npm run ts-node -- ./demo/19-export-to-base64.ts + npm run ts-node -- ./demo/20-table-cell-borders.ts + npm run ts-node -- ./demo/21-bookmarks.ts + npm run ts-node -- ./demo/22-right-to-left-text.ts + npm run ts-node -- ./demo/23-base64-images.ts + npm run ts-node -- ./demo/24-images-to-table-cell.ts + # - npm run ts-node -- ./demo/demo25.ts + npm run ts-node -- ./demo/26-paragraph-borders.ts + npm run ts-node -- ./demo/27-declaritive-styles-3.ts + npm run ts-node -- ./demo/28-table-of-contents.ts + npm run ts-node -- ./demo/29-numbered-lists.ts + npm run ts-node -- ./demo/30-template-document.ts + npm run ts-node -- ./demo/31-tables.ts + npm run ts-node -- ./demo/32-merge-and-shade-table-cells.ts + # - npm run e2e "My Document.docx" // Need to fix + npm run ts-node -- ./demo/33-sequential-captions.ts + npm run ts-node -- ./demo/34-floating-tables.ts From ef747486c006b8c3db429d686ad08e67dd76fd32 Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 4 Nov 2020 23:40:59 +0000 Subject: [PATCH 187/260] Remove comments --- .github/workflows/default.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index b3d4aab0a9..794503ddc0 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -61,7 +61,6 @@ jobs: - name: Prettier run: | npm run ts-node -- ./demo/1-basic.ts - # - npm run e2e "My Document.docx" npm run ts-node -- ./demo/2-declaritive-styles.ts npm run ts-node -- ./demo/3-numbering-and-bullet-points.ts npm run ts-node -- ./demo/4-basic-table.ts @@ -71,7 +70,6 @@ jobs: npm run ts-node -- ./demo/8-header-footer.ts npm run ts-node -- ./demo/9-images-in-header-and-footer.ts npm run ts-node -- ./demo/10-my-cv.ts - # - npm run e2e "My Document.docx" npm run ts-node -- ./demo/11-declaritive-styles-2.ts npm run ts-node -- ./demo/12-scaling-images.ts npm run ts-node -- ./demo/13-xml-styles.ts @@ -86,7 +84,6 @@ jobs: npm run ts-node -- ./demo/22-right-to-left-text.ts npm run ts-node -- ./demo/23-base64-images.ts npm run ts-node -- ./demo/24-images-to-table-cell.ts - # - npm run ts-node -- ./demo/demo25.ts npm run ts-node -- ./demo/26-paragraph-borders.ts npm run ts-node -- ./demo/27-declaritive-styles-3.ts npm run ts-node -- ./demo/28-table-of-contents.ts @@ -94,6 +91,5 @@ jobs: npm run ts-node -- ./demo/30-template-document.ts npm run ts-node -- ./demo/31-tables.ts npm run ts-node -- ./demo/32-merge-and-shade-table-cells.ts - # - npm run e2e "My Document.docx" // Need to fix npm run ts-node -- ./demo/33-sequential-captions.ts npm run ts-node -- ./demo/34-floating-tables.ts From 0165cfb3e5f1905984f4ad6f6be73ba62407857a Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 5 Nov 2020 00:11:02 +0000 Subject: [PATCH 188/260] Fix typo --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 794503ddc0..148cfcc4b7 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -49,7 +49,7 @@ jobs: - name: Install Dependencies run: npm ci - name: Prettier - run: npm run prettier + run: npm run style demos: name: Run Demos runs-on: ubuntu-latest From f72f7e751486b80d5136638db35cc68e6c065d74 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 5 Nov 2020 00:17:55 +0000 Subject: [PATCH 189/260] Add build files to demo workflow --- .github/workflows/default.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 148cfcc4b7..f2605597d6 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -52,13 +52,19 @@ jobs: run: npm run style demos: name: Run Demos + needs: [build] runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@master - name: Install Dependencies run: npm ci - - name: Prettier + - name: Download Artifact + uses: actions/download-artifact@master + with: + name: build + path: build + - name: Run demos run: | npm run ts-node -- ./demo/1-basic.ts npm run ts-node -- ./demo/2-declaritive-styles.ts From d1b45d416bd3ad492130280873f2a1bcbc90c03b Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 5 Nov 2020 00:33:54 +0000 Subject: [PATCH 190/260] Fix spacing issue --- .github/workflows/default.yml | 70 +++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index f2605597d6..77744603c6 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -62,40 +62,40 @@ jobs: - name: Download Artifact uses: actions/download-artifact@master with: - name: build - path: build + name: build + path: build - name: Run demos run: | - npm run ts-node -- ./demo/1-basic.ts - npm run ts-node -- ./demo/2-declaritive-styles.ts - npm run ts-node -- ./demo/3-numbering-and-bullet-points.ts - npm run ts-node -- ./demo/4-basic-table.ts - npm run ts-node -- ./demo/5-images.ts - npm run ts-node -- ./demo/6-page-borders.ts - npm run ts-node -- ./demo/7-landscape.ts - npm run ts-node -- ./demo/8-header-footer.ts - npm run ts-node -- ./demo/9-images-in-header-and-footer.ts - npm run ts-node -- ./demo/10-my-cv.ts - npm run ts-node -- ./demo/11-declaritive-styles-2.ts - npm run ts-node -- ./demo/12-scaling-images.ts - npm run ts-node -- ./demo/13-xml-styles.ts - npm run ts-node -- ./demo/14-page-numbers.ts - npm run ts-node -- ./demo/15-page-break-before.ts - npm run ts-node -- ./demo/16-multiple-sections.ts - npm run ts-node -- ./demo/17-footnotes.ts - npm run ts-node -- ./demo/18-image-from-buffer.ts - npm run ts-node -- ./demo/19-export-to-base64.ts - npm run ts-node -- ./demo/20-table-cell-borders.ts - npm run ts-node -- ./demo/21-bookmarks.ts - npm run ts-node -- ./demo/22-right-to-left-text.ts - npm run ts-node -- ./demo/23-base64-images.ts - npm run ts-node -- ./demo/24-images-to-table-cell.ts - npm run ts-node -- ./demo/26-paragraph-borders.ts - npm run ts-node -- ./demo/27-declaritive-styles-3.ts - npm run ts-node -- ./demo/28-table-of-contents.ts - npm run ts-node -- ./demo/29-numbered-lists.ts - npm run ts-node -- ./demo/30-template-document.ts - npm run ts-node -- ./demo/31-tables.ts - npm run ts-node -- ./demo/32-merge-and-shade-table-cells.ts - npm run ts-node -- ./demo/33-sequential-captions.ts - npm run ts-node -- ./demo/34-floating-tables.ts + npm run ts-node -- ./demo/1-basic.ts + npm run ts-node -- ./demo/2-declaritive-styles.ts + npm run ts-node -- ./demo/3-numbering-and-bullet-points.ts + npm run ts-node -- ./demo/4-basic-table.ts + npm run ts-node -- ./demo/5-images.ts + npm run ts-node -- ./demo/6-page-borders.ts + npm run ts-node -- ./demo/7-landscape.ts + npm run ts-node -- ./demo/8-header-footer.ts + npm run ts-node -- ./demo/9-images-in-header-and-footer.ts + npm run ts-node -- ./demo/10-my-cv.ts + npm run ts-node -- ./demo/11-declaritive-styles-2.ts + npm run ts-node -- ./demo/12-scaling-images.ts + npm run ts-node -- ./demo/13-xml-styles.ts + npm run ts-node -- ./demo/14-page-numbers.ts + npm run ts-node -- ./demo/15-page-break-before.ts + npm run ts-node -- ./demo/16-multiple-sections.ts + npm run ts-node -- ./demo/17-footnotes.ts + npm run ts-node -- ./demo/18-image-from-buffer.ts + npm run ts-node -- ./demo/19-export-to-base64.ts + npm run ts-node -- ./demo/20-table-cell-borders.ts + npm run ts-node -- ./demo/21-bookmarks.ts + npm run ts-node -- ./demo/22-right-to-left-text.ts + npm run ts-node -- ./demo/23-base64-images.ts + npm run ts-node -- ./demo/24-images-to-table-cell.ts + npm run ts-node -- ./demo/26-paragraph-borders.ts + npm run ts-node -- ./demo/27-declaritive-styles-3.ts + npm run ts-node -- ./demo/28-table-of-contents.ts + npm run ts-node -- ./demo/29-numbered-lists.ts + npm run ts-node -- ./demo/30-template-document.ts + npm run ts-node -- ./demo/31-tables.ts + npm run ts-node -- ./demo/32-merge-and-shade-table-cells.ts + npm run ts-node -- ./demo/33-sequential-captions.ts + npm run ts-node -- ./demo/34-floating-tables.ts From 2213eb28cb10e181cc9f2c11f05239cdf95086ea Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 5 Nov 2020 02:44:05 +0000 Subject: [PATCH 191/260] Add Github Actions badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 84469fa454..8db7237c59 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ [![NPM version][npm-image]][npm-url] [![Downloads per month][downloads-image]][downloads-url] [![Build Status][travis-image]][travis-url] +[![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Known Vulnerabilities][snky-image]][snky-url] [![Chat on Gitter][gitter-image]][gitter-url] @@ -102,6 +103,8 @@ Made with 💖 [downloads-url]: https://npmjs.org/package/docx [travis-image]: https://travis-ci.org/dolanmiu/docx.svg?branch=master [travis-url]: https://travis-ci.org/dolanmiu/docx +[github-actions-workflow-image]: https://github.com/dolanmiu/docx/workflows/Default/badge.svg +[github-actions-workflow-url]: https://github.com/dolanmiu/docx/actions [daviddm-image]: https://david-dm.org/dolanmiu/docx.svg?theme=shields.io [daviddm-url]: https://david-dm.org/dolanmiu/docx [snky-image]: https://snyk.io/test/github/dolanmiu/docx/badge.svg From 74db67689fb42575dd573c39ec8892fa166db1bb Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 6 Nov 2020 00:27:57 +0000 Subject: [PATCH 192/260] Re-name paragraph styles --- src/file/styles/style/character-style.spec.ts | 52 +++++------ src/file/styles/style/character-style.ts | 2 +- src/file/styles/style/default-styles.ts | 16 ++-- src/file/styles/style/paragraph-style.spec.ts | 86 +++++++++---------- src/file/styles/style/paragraph-style.ts | 2 +- src/file/styles/styles.ts | 8 +- 6 files changed, 83 insertions(+), 83 deletions(-) diff --git a/src/file/styles/style/character-style.spec.ts b/src/file/styles/style/character-style.spec.ts index 2fddce1c1b..c7adf4ff97 100644 --- a/src/file/styles/style/character-style.spec.ts +++ b/src/file/styles/style/character-style.spec.ts @@ -6,12 +6,12 @@ import { UnderlineType } from "file/paragraph/run/underline"; import { ShadingType } from "file/table"; import { EMPTY_OBJECT } from "file/xml-components"; -import { CharacterStyle } from "./character-style"; +import { StyleForCharacter } from "./character-style"; describe("CharacterStyle", () => { describe("#constructor", () => { it("should set the style type to character and use the given style id", () => { - const style = new CharacterStyle({ id: "myStyleId" }); + const style = new StyleForCharacter({ id: "myStyleId" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -31,7 +31,7 @@ describe("CharacterStyle", () => { }); it("should set the name of the style, if given", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", name: "Style Name", }); @@ -55,7 +55,7 @@ describe("CharacterStyle", () => { }); it("should add smallCaps", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { smallCaps: true, @@ -83,7 +83,7 @@ describe("CharacterStyle", () => { }); it("should add allCaps", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { allCaps: true, @@ -111,7 +111,7 @@ describe("CharacterStyle", () => { }); it("should add strike", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { strike: true, @@ -139,7 +139,7 @@ describe("CharacterStyle", () => { }); it("should add double strike", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { doubleStrike: true, @@ -167,7 +167,7 @@ describe("CharacterStyle", () => { }); it("should add sub script", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { subScript: true, @@ -203,7 +203,7 @@ describe("CharacterStyle", () => { }); it("should add font by name", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { font: "test font", @@ -242,7 +242,7 @@ describe("CharacterStyle", () => { }); it("should add font for ascii and eastAsia", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { font: { @@ -282,7 +282,7 @@ describe("CharacterStyle", () => { }); it("should add character spacing", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { characterSpacing: 100, @@ -312,7 +312,7 @@ describe("CharacterStyle", () => { describe("formatting methods: style attributes", () => { it("#basedOn", () => { - const style = new CharacterStyle({ id: "myStyleId", basedOn: "otherId" }); + const style = new StyleForCharacter({ id: "myStyleId", basedOn: "otherId" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -357,7 +357,7 @@ describe("CharacterStyle", () => { ]; sizeTests.forEach(({ size, sizeComplexScript, expected }) => { it(`#size ${size} cs ${sizeComplexScript}`, () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { size, sizeComplexScript }, }); @@ -385,7 +385,7 @@ describe("CharacterStyle", () => { describe("#underline", () => { it("should set underline to 'single' if no arguments are given", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { underline: {}, @@ -413,7 +413,7 @@ describe("CharacterStyle", () => { }); it("should set the style if given", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { underline: { @@ -443,7 +443,7 @@ describe("CharacterStyle", () => { }); it("should set the style and color if given", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { underline: { @@ -476,7 +476,7 @@ describe("CharacterStyle", () => { describe("#emphasisMark", () => { it("should set emphasisMark to 'dot' if no arguments are given", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { emphasisMark: {}, @@ -504,7 +504,7 @@ describe("CharacterStyle", () => { }); it("should set the style if given", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { emphasisMark: { @@ -535,7 +535,7 @@ describe("CharacterStyle", () => { }); it("#superScript", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { superScript: true, @@ -571,7 +571,7 @@ describe("CharacterStyle", () => { }); it("#color", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { color: "123456", @@ -616,7 +616,7 @@ describe("CharacterStyle", () => { ]; boldTests.forEach(({ bold, boldComplexScript, expected }) => { it(`#bold ${bold} cs ${boldComplexScript}`, () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { bold, boldComplexScript }, }); @@ -660,7 +660,7 @@ describe("CharacterStyle", () => { ]; italicsTests.forEach(({ italics, italicsComplexScript, expected }) => { it(`#italics ${italics} cs ${italicsComplexScript}`, () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { italics, italicsComplexScript }, }); @@ -687,7 +687,7 @@ describe("CharacterStyle", () => { }); it("#link", () => { - const style = new CharacterStyle({ id: "myStyleId", link: "MyLink" }); + const style = new StyleForCharacter({ id: "myStyleId", link: "MyLink" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -708,7 +708,7 @@ describe("CharacterStyle", () => { }); it("#semiHidden", () => { - const style = new CharacterStyle({ id: "myStyleId", semiHidden: true }); + const style = new StyleForCharacter({ id: "myStyleId", semiHidden: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -749,7 +749,7 @@ describe("CharacterStyle", () => { ]; highlightTests.forEach(({ highlight, highlightComplexScript, expected }) => { it(`#highlight ${highlight} cs ${highlightComplexScript}`, () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { highlight, highlightComplexScript }, }); @@ -838,7 +838,7 @@ describe("CharacterStyle", () => { ]; shadingTests.forEach(({ shadow, shading, shadingComplexScript, expected }) => { it("#shadow correctly", () => { - const style = new CharacterStyle({ + const style = new StyleForCharacter({ id: "myStyleId", run: { shadow, shading, shadingComplexScript }, }); diff --git a/src/file/styles/style/character-style.ts b/src/file/styles/style/character-style.ts index 0191a0460e..63252bddd5 100644 --- a/src/file/styles/style/character-style.ts +++ b/src/file/styles/style/character-style.ts @@ -15,7 +15,7 @@ export interface ICharacterStyleOptions extends IBaseCharacterStyleOptions { readonly name?: string; } -export class CharacterStyle extends Style { +export class StyleForCharacter extends Style { private readonly runProperties: RunProperties; constructor(options: ICharacterStyleOptions) { diff --git a/src/file/styles/style/default-styles.ts b/src/file/styles/style/default-styles.ts index 8974435a95..b1de98e076 100644 --- a/src/file/styles/style/default-styles.ts +++ b/src/file/styles/style/default-styles.ts @@ -1,9 +1,9 @@ import { UnderlineType } from "file/paragraph/run/underline"; -import { CharacterStyle, IBaseCharacterStyleOptions } from "./character-style"; -import { IBaseParagraphStyleOptions, IParagraphStyleOptions, ParagraphStyle } from "./paragraph-style"; +import { IBaseCharacterStyleOptions, StyleForCharacter } from "./character-style"; +import { IBaseParagraphStyleOptions, IParagraphStyleOptions, StyleForParagraph } from "./paragraph-style"; -export class HeadingStyle extends ParagraphStyle { +export class HeadingStyle extends StyleForParagraph { constructor(options: IParagraphStyleOptions) { super({ ...options, @@ -84,7 +84,7 @@ export class Heading6Style extends HeadingStyle { } } -export class ListParagraph extends ParagraphStyle { +export class ListParagraph extends StyleForParagraph { constructor(options: IBaseParagraphStyleOptions) { super({ ...options, @@ -96,7 +96,7 @@ export class ListParagraph extends ParagraphStyle { } } -export class FootnoteText extends ParagraphStyle { +export class FootnoteText extends StyleForParagraph { constructor(options: IBaseParagraphStyleOptions) { super({ ...options, @@ -121,7 +121,7 @@ export class FootnoteText extends ParagraphStyle { } } -export class FootnoteReferenceStyle extends CharacterStyle { +export class FootnoteReferenceStyle extends StyleForCharacter { constructor(options: IBaseCharacterStyleOptions) { super({ ...options, @@ -136,7 +136,7 @@ export class FootnoteReferenceStyle extends CharacterStyle { } } -export class FootnoteTextChar extends CharacterStyle { +export class FootnoteTextChar extends StyleForCharacter { constructor(options: IBaseCharacterStyleOptions) { super({ ...options, @@ -152,7 +152,7 @@ export class FootnoteTextChar extends CharacterStyle { } } -export class HyperlinkStyle extends CharacterStyle { +export class HyperlinkStyle extends StyleForCharacter { constructor(options: IBaseCharacterStyleOptions) { super({ ...options, diff --git a/src/file/styles/style/paragraph-style.spec.ts b/src/file/styles/style/paragraph-style.spec.ts index 92b798f862..8683234793 100644 --- a/src/file/styles/style/paragraph-style.spec.ts +++ b/src/file/styles/style/paragraph-style.spec.ts @@ -6,12 +6,12 @@ import { UnderlineType } from "file/paragraph/run/underline"; import { ShadingType } from "file/table"; import { EMPTY_OBJECT } from "file/xml-components"; -import { ParagraphStyle } from "./paragraph-style"; +import { StyleForParagraph } from "./paragraph-style"; describe("ParagraphStyle", () => { describe("#constructor", () => { it("should set the style type to paragraph and use the given style id", () => { - const style = new ParagraphStyle({ id: "myStyleId" }); + const style = new StyleForParagraph({ id: "myStyleId" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } }, @@ -19,7 +19,7 @@ describe("ParagraphStyle", () => { }); it("should set the name of the style, if given", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", name: "Style Name", }); @@ -35,7 +35,7 @@ describe("ParagraphStyle", () => { describe("formatting methods: style attributes", () => { it("#basedOn", () => { - const style = new ParagraphStyle({ id: "myStyleId", basedOn: "otherId" }); + const style = new StyleForParagraph({ id: "myStyleId", basedOn: "otherId" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -46,7 +46,7 @@ describe("ParagraphStyle", () => { }); it("#quickFormat", () => { - const style = new ParagraphStyle({ id: "myStyleId", quickFormat: true }); + const style = new StyleForParagraph({ id: "myStyleId", quickFormat: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -62,7 +62,7 @@ describe("ParagraphStyle", () => { }); it("#next", () => { - const style = new ParagraphStyle({ id: "myStyleId", next: "otherId" }); + const style = new StyleForParagraph({ id: "myStyleId", next: "otherId" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -75,7 +75,7 @@ describe("ParagraphStyle", () => { describe("formatting methods: paragraph properties", () => { it("#indent", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { indent: { left: 720 }, @@ -93,7 +93,7 @@ describe("ParagraphStyle", () => { }); it("#spacing", () => { - const style = new ParagraphStyle({ id: "myStyleId", paragraph: { spacing: { before: 50, after: 150 } } }); + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { spacing: { before: 50, after: 150 } } }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -106,7 +106,7 @@ describe("ParagraphStyle", () => { }); it("#center", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { alignment: AlignmentType.CENTER, @@ -124,7 +124,7 @@ describe("ParagraphStyle", () => { }); it("#character spacing", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { characterSpacing: 24, @@ -142,7 +142,7 @@ describe("ParagraphStyle", () => { }); it("#left", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { alignment: AlignmentType.LEFT, @@ -160,7 +160,7 @@ describe("ParagraphStyle", () => { }); it("#right", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { alignment: AlignmentType.RIGHT, @@ -178,7 +178,7 @@ describe("ParagraphStyle", () => { }); it("#justified", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { alignment: AlignmentType.JUSTIFIED, @@ -196,7 +196,7 @@ describe("ParagraphStyle", () => { }); it("#thematicBreak", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { thematicBreak: true, @@ -229,7 +229,7 @@ describe("ParagraphStyle", () => { }); it("#contextualSpacing", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { contextualSpacing: true, @@ -255,7 +255,7 @@ describe("ParagraphStyle", () => { }); it("#leftTabStop", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { leftTabStop: 1200, @@ -277,7 +277,7 @@ describe("ParagraphStyle", () => { }); it("#maxRightTabStop", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { rightTabStop: TabStopPosition.MAX, @@ -299,7 +299,7 @@ describe("ParagraphStyle", () => { }); it("#keepLines", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { keepLines: true, @@ -320,7 +320,7 @@ describe("ParagraphStyle", () => { }); it("#keepNext", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { keepNext: true, @@ -341,7 +341,7 @@ describe("ParagraphStyle", () => { }); it("#outlineLevel", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", paragraph: { outlineLevel: 1, @@ -381,7 +381,7 @@ describe("ParagraphStyle", () => { ]; sizeTests.forEach(({ size, sizeComplexScript, expected }) => { it(`#size ${size} cs ${sizeComplexScript}`, () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { size, sizeComplexScript }, }); @@ -393,7 +393,7 @@ describe("ParagraphStyle", () => { }); it("#smallCaps", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { smallCaps: true, @@ -411,7 +411,7 @@ describe("ParagraphStyle", () => { }); it("#allCaps", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { allCaps: true, @@ -429,7 +429,7 @@ describe("ParagraphStyle", () => { }); it("#strike", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { strike: true, @@ -447,7 +447,7 @@ describe("ParagraphStyle", () => { }); it("#doubleStrike", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { doubleStrike: true, @@ -465,7 +465,7 @@ describe("ParagraphStyle", () => { }); it("#subScript", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { subScript: true, @@ -483,7 +483,7 @@ describe("ParagraphStyle", () => { }); it("#superScript", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { superScript: true, @@ -501,7 +501,7 @@ describe("ParagraphStyle", () => { }); it("#font by name", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { font: "Times", @@ -530,7 +530,7 @@ describe("ParagraphStyle", () => { }); it("#font for ascii and eastAsia", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { font: { @@ -577,7 +577,7 @@ describe("ParagraphStyle", () => { ]; boldTests.forEach(({ bold, boldComplexScript, expected }) => { it(`#bold ${bold} cs ${boldComplexScript}`, () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { bold, boldComplexScript }, }); @@ -606,7 +606,7 @@ describe("ParagraphStyle", () => { ]; italicsTests.forEach(({ italics, italicsComplexScript, expected }) => { it(`#italics ${italics} cs ${italicsComplexScript}`, () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { italics, italicsComplexScript }, }); @@ -640,7 +640,7 @@ describe("ParagraphStyle", () => { ]; highlightTests.forEach(({ highlight, highlightComplexScript, expected }) => { it(`#highlight ${highlight} cs ${highlightComplexScript}`, () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { highlight, highlightComplexScript }, }); @@ -714,7 +714,7 @@ describe("ParagraphStyle", () => { ]; shadingTests.forEach(({ shadow, shading, shadingComplexScript, expected }) => { it("#shadow correctly", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { shadow, shading, shadingComplexScript }, }); @@ -727,7 +727,7 @@ describe("ParagraphStyle", () => { describe("#underline", () => { it("should set underline to 'single' if no arguments are given", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { underline: {}, @@ -745,7 +745,7 @@ describe("ParagraphStyle", () => { }); it("should set the style if given", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { underline: { @@ -765,7 +765,7 @@ describe("ParagraphStyle", () => { }); it("should set the style and color if given", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { underline: { @@ -788,7 +788,7 @@ describe("ParagraphStyle", () => { describe("#emphasisMark", () => { it("should set emphasisMark to 'dot' if no arguments are given", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { emphasisMark: {}, @@ -806,7 +806,7 @@ describe("ParagraphStyle", () => { }); it("should set the style if given", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { emphasisMark: { @@ -827,7 +827,7 @@ describe("ParagraphStyle", () => { }); it("#color", () => { - const style = new ParagraphStyle({ + const style = new StyleForParagraph({ id: "myStyleId", run: { color: "123456", @@ -845,7 +845,7 @@ describe("ParagraphStyle", () => { }); it("#link", () => { - const style = new ParagraphStyle({ id: "myStyleId", link: "MyLink" }); + const style = new StyleForParagraph({ id: "myStyleId", link: "MyLink" }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -861,7 +861,7 @@ describe("ParagraphStyle", () => { }); it("#semiHidden", () => { - const style = new ParagraphStyle({ id: "myStyleId", semiHidden: true }); + const style = new StyleForParagraph({ id: "myStyleId", semiHidden: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -877,7 +877,7 @@ describe("ParagraphStyle", () => { }); it("#uiPriority", () => { - const style = new ParagraphStyle({ id: "myStyleId", uiPriority: 99 }); + const style = new StyleForParagraph({ id: "myStyleId", uiPriority: 99 }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ @@ -894,7 +894,7 @@ describe("ParagraphStyle", () => { }); it("#unhideWhenUsed", () => { - const style = new ParagraphStyle({ id: "myStyleId", unhideWhenUsed: true }); + const style = new StyleForParagraph({ id: "myStyleId", unhideWhenUsed: true }); const tree = new Formatter().format(style); expect(tree).to.deep.equal({ "w:style": [ diff --git a/src/file/styles/style/paragraph-style.ts b/src/file/styles/style/paragraph-style.ts index 635e7b7e2f..25c035e514 100644 --- a/src/file/styles/style/paragraph-style.ts +++ b/src/file/styles/style/paragraph-style.ts @@ -21,7 +21,7 @@ export interface IParagraphStyleOptions extends IBaseParagraphStyleOptions { readonly name?: string; } -export class ParagraphStyle extends Style { +export class StyleForParagraph extends Style { private readonly paragraphProperties: ParagraphProperties; private readonly runProperties: RunProperties; diff --git a/src/file/styles/styles.ts b/src/file/styles/styles.ts index 45efe9f784..1fbc4b5e50 100644 --- a/src/file/styles/styles.ts +++ b/src/file/styles/styles.ts @@ -1,6 +1,6 @@ import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "file/xml-components"; -import { CharacterStyle, ParagraphStyle } from "./style"; +import { StyleForCharacter, StyleForParagraph } from "./style"; import { ICharacterStyleOptions } from "./style/character-style"; import { IParagraphStyleOptions } from "./style/paragraph-style"; export * from "./border"; @@ -9,7 +9,7 @@ export interface IStylesOptions { readonly initialStyles?: BaseXmlComponent; readonly paragraphStyles?: IParagraphStyleOptions[]; readonly characterStyles?: ICharacterStyleOptions[]; - readonly importedStyles?: (XmlComponent | ParagraphStyle | CharacterStyle | ImportedXmlComponent)[]; + readonly importedStyles?: (XmlComponent | StyleForParagraph | StyleForCharacter | ImportedXmlComponent)[]; } export class Styles extends XmlComponent { @@ -28,13 +28,13 @@ export class Styles extends XmlComponent { if (options.paragraphStyles) { for (const style of options.paragraphStyles) { - this.root.push(new ParagraphStyle(style)); + this.root.push(new StyleForParagraph(style)); } } if (options.characterStyles) { for (const style of options.characterStyles) { - this.root.push(new CharacterStyle(style)); + this.root.push(new StyleForCharacter(style)); } } } From f6a4d78ab77c38792711ada866caaa0defb33481 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 6 Nov 2020 01:51:59 +0000 Subject: [PATCH 193/260] Add checks when submitting PR --- .github/workflows/default.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 77744603c6..a063d1ee1d 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -3,6 +3,9 @@ on: push: branches: - master + pull_request: + branches: + - master jobs: build: From 27638063c854dab5cf7cee5c5b1dbb6c3d15baf7 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 6 Nov 2020 02:08:09 +0000 Subject: [PATCH 194/260] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8db7237c59..2460a5d498 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ Read the contribution guidelines [here](https://docx.js.org/#/contribution-guide [drawing](https://www.beekast.com/) [drawing](https://herraizsoto.com/) [drawing](http://www.ativer.com.br/) +[drawing](https://www.arity.co/) ...and many more! From 5d6bc039d0053a58c5d43daee37637aa22ac64fe Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 07:56:26 +0000 Subject: [PATCH 195/260] build(deps-dev): bump @types/mocha from 8.0.3 to 8.0.4 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.3 to 8.0.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e0566ca4d6..4d034e41eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.3.0", + "version": "5.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -576,9 +576,9 @@ "dev": true }, "@types/mocha": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.3.tgz", - "integrity": "sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.4.tgz", + "integrity": "sha512-M4BwiTJjHmLq6kjON7ZoI2JMlBvpY3BYSdiP6s/qCT3jb1s9/DeJF0JELpAxiVSIxXDzfNKe+r7yedMIoLbknQ==", "dev": true }, "@types/node": { From e9adb8b0edf68c358b326abec22c8999f0e2c281 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2020 08:27:51 +0000 Subject: [PATCH 196/260] build(deps-dev): bump @types/webpack from 4.41.24 to 4.41.25 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.41.24 to 4.41.25. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e0566ca4d6..152f922515 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.3.0", + "version": "5.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -670,9 +670,9 @@ } }, "@types/webpack": { - "version": "4.41.24", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.24.tgz", - "integrity": "sha512-1A0MXPwZiMOD3DPMuOKUKcpkdPo8Lq33UGggZ7xio6wJ/jV1dAu5cXDrOfGDnldUroPIRLsr/DT43/GqOA4RFQ==", + "version": "4.41.25", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz", + "integrity": "sha512-cr6kZ+4m9lp86ytQc1jPOJXgINQyz3kLLunZ57jznW+WIAL0JqZbGubQk4GlD42MuQL5JGOABrxdpqqWeovlVQ==", "dev": true, "requires": { "@types/anymatch": "*", From b2fea471f181b9b1de5f09330c3c25d9158275e7 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sun, 15 Nov 2020 23:03:44 +0000 Subject: [PATCH 197/260] Add workaround to include file in build --- src/file/paragraph/math/math-component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/file/paragraph/math/math-component.ts b/src/file/paragraph/math/math-component.ts index afe83235f4..8251235455 100644 --- a/src/file/paragraph/math/math-component.ts +++ b/src/file/paragraph/math/math-component.ts @@ -19,3 +19,9 @@ export type MathComponent = | MathCurlyBrackets | MathAngledBrackets | MathSquareBrackets; + +// Needed because of: https://github.com/s-panferov/awesome-typescript-loader/issues/432 +/** + * @ignore + */ +export const WORKAROUND4 = ""; From 825136d1c9a9348936f4ac4faf124e09bcb10af0 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sun, 15 Nov 2020 23:04:27 +0000 Subject: [PATCH 198/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e3a678600..be21f2a5f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.4.0", + "version": "5.4.1", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From ffba276f0d1440520807ab21cac8161090c84306 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 11:13:13 +0000 Subject: [PATCH 199/260] build(deps-dev): bump docsify-cli from 4.4.1 to 4.4.2 Bumps [docsify-cli](https://github.com/docsifyjs/docsify-cli) from 4.4.1 to 4.4.2. - [Release notes](https://github.com/docsifyjs/docsify-cli/releases) - [Changelog](https://github.com/docsifyjs/docsify-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/docsifyjs/docsify-cli/compare/v4.4.1...v4.4.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 542 ++++++++++++++++++++++++++++------------------ 1 file changed, 336 insertions(+), 206 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8f284fd13..8f152543c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.4.0", + "version": "5.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -812,6 +812,12 @@ } } }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -1360,51 +1366,112 @@ "dev": true }, "boxen": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", - "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", "camelcase": "^5.3.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-boxes": "^2.2.0", - "string-width": "^3.0.0", - "term-size": "^1.2.0", - "type-fest": "^0.3.0", - "widest-line": "^2.0.0" + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "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==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } @@ -1599,9 +1666,9 @@ }, "dependencies": { "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { "pump": "^3.0.0" @@ -1768,9 +1835,9 @@ "dev": true }, "cli-boxes": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", - "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, "clipboard": { @@ -1916,34 +1983,17 @@ } }, "configstore": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", - "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { - "dot-prop": "^4.1.0", + "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" } }, "connect": { @@ -2085,9 +2135,9 @@ } }, "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "cycle": { @@ -2306,25 +2356,25 @@ } }, "docsify": { - "version": "4.11.4", - "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.11.4.tgz", - "integrity": "sha512-Qwt98y6ddM2Wb46gRH/zQpEAvw70AlIpzVlB9Wi2u2T2REg9O+bXMpJ27F5TaRTn2bD6SF1VyZYNUfimpihZwQ==", + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.11.6.tgz", + "integrity": "sha512-6h3hB2Ni7gpOeu1fl1sDOmufuplIDmeFHsps17Qbg9VOS3h2tJ63FiW2w5oAydGyzaLrqu58FV7Mg4b6p0z9mg==", "dev": true, "requires": { "dompurify": "^2.0.8", - "marked": "^0.7.0", - "medium-zoom": "^1.0.5", + "marked": "^1.1.1", + "medium-zoom": "^1.0.6", "opencollective-postinstall": "^2.0.2", "prismjs": "^1.19.0", "strip-indent": "^3.0.0", - "tinydate": "^1.0.0", + "tinydate": "^1.3.0", "tweezer.js": "^1.4.0" } }, "docsify-cli": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/docsify-cli/-/docsify-cli-4.4.1.tgz", - "integrity": "sha512-M5VU/8UCILz87D519KnURH3LA+A3RAAqj7ifDv4xOUf4c32QDkWSETS3yLmXlTNdxhATVi5P1fVklnvVW4uOyw==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/docsify-cli/-/docsify-cli-4.4.2.tgz", + "integrity": "sha512-iCTRyKjjNiSroo5cgVkb/C86PsUEEsVV30PXp5GkzbcMG+mMxzBPmJ/8xukTLoeaQddEsSeSWW376eC2t4KQJw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -2333,13 +2383,14 @@ "cp-file": "^7.0.0", "docsify": "^4.10.2", "docsify-server-renderer": ">=4", + "enquirer": "^2.3.6", "fs-extra": "^8.1.0", "get-port": "^5.0.0", "livereload": "^0.9.1", "lru-cache": "^5.1.1", "open": "^6.4.0", "serve-static": "^1.12.1", - "update-notifier": "^3.0.1", + "update-notifier": "^4.1.0", "yargonaut": "^1.1.2", "yargs": "^14.2.0" }, @@ -2376,17 +2427,6 @@ "locate-path": "^3.0.0" } }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2489,25 +2529,25 @@ } }, "docsify-server-renderer": { - "version": "4.11.4", - "resolved": "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.11.4.tgz", - "integrity": "sha512-TxOxqX/fwBFLHz788PtB0OeVis1EDWCVK8CEE/fvxTzQqsgZNTw2UO1wEg1qt/uuldJps3G+DPv/FN9xIeQgcg==", + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.11.6.tgz", + "integrity": "sha512-IAEM+kKsDfo1qnrEdaBH5pCQFjAWA7B7jWWmfCKzDA/BPcHO+zCR4++Mw/NPR/huJKU58AzuGtEJ/NhF/l0Y6Q==", "dev": true, "requires": { "debug": "^4.1.1", - "docsify": "^4.11.2", + "docsify": "^4.11.4", "dompurify": "^2.0.8", "node-fetch": "^2.6.0", "resolve-pathname": "^3.0.0" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -2525,18 +2565,18 @@ "dev": true }, "dompurify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz", - "integrity": "sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.2.tgz", + "integrity": "sha512-BsGR4nDLaC5CNBnyT5I+d5pOeaoWvgVeg6Gq/aqmKYWMPR07131u60I80BvExLAJ0FQEIBQ1BTicw+C5+jOyrg==", "dev": true }, "dot-prop": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", - "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "duplexer3": { @@ -2615,6 +2655,15 @@ "tapable": "^0.2.5" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", @@ -2710,6 +2759,12 @@ "es6-symbol": "^3.1.1" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3953,12 +4008,12 @@ } }, "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "^1.3.5" } }, "globals": { @@ -4484,19 +4539,19 @@ } }, "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" } }, "is-npm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", - "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", "dev": true }, "is-number": { @@ -4520,19 +4575,16 @@ } }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true }, "is-plain-object": { "version": "2.0.4", @@ -5009,9 +5061,9 @@ } }, "chokidar": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.1.tgz", - "integrity": "sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -5021,7 +5073,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.5.0" } }, "fill-range": { @@ -5071,9 +5123,9 @@ "dev": true }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -5091,9 +5143,9 @@ } }, "livereload-js": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.2.4.tgz", - "integrity": "sha512-kgTCrrYAfwnb5469+7bB2hxIct8Giq0RemDnxOESIzyRwRqYGGMZh5VIveYqJiDvpglH0dpd074BU1zJj4NaNw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.3.1.tgz", + "integrity": "sha512-CBu1gTEfzVhlOK1WASKAAJ9Qx1fHECTq0SUB67sfxwQssopTyvzqTlgl+c0h9pZ6V+Fzd2rc510ppuNusg9teQ==", "dev": true }, "load-json-file": { @@ -5253,9 +5305,9 @@ } }, "marked": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", - "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.4.tgz", + "integrity": "sha512-6x5TFGCTKSQBLTZtOburGxCxFEBJEGYVLwCMTBCxzvyuisGcC20UNzDSJhCr/cJ/Kmh6ulfJm10g6WWEAJ3kvg==", "dev": true }, "math-random": { @@ -6090,9 +6142,9 @@ "dev": true }, "opts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.0.tgz", - "integrity": "sha512-rPleeyX48sBEc4aj7rAok5dCbvRdYpdbIdSRR4gnIK98a7Rvd4l3wlv4YHQr2mwPQTpKQiw8uipi/WoyItDINg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, "os-browserify": { @@ -6319,12 +6371,6 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -6498,9 +6544,9 @@ "dev": true }, "prismjs": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.21.0.tgz", - "integrity": "sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.22.0.tgz", + "integrity": "sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==", "dev": true, "requires": { "clipboard": "^2.0.0" @@ -6594,6 +6640,15 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -6752,9 +6807,9 @@ } }, "registry-auth-token": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", - "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -7157,12 +7212,20 @@ "dev": true }, "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { - "semver": "^5.0.3" + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "send": { @@ -7754,36 +7817,10 @@ "dev": true }, "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - }, - "dependencies": { - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } - } + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true }, "test-exclude": { "version": "6.0.0", @@ -8053,9 +8090,9 @@ "dev": true }, "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "typedarray": { @@ -8252,12 +8289,12 @@ } }, "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "^2.0.0" } }, "universalify": { @@ -8319,23 +8356,75 @@ "dev": true }, "update-notifier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", - "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", "dev": true, "requires": { - "boxen": "^3.0.0", - "chalk": "^2.0.1", - "configstore": "^4.0.0", + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.1.0", - "is-npm": "^3.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", "is-yarn-global": "^0.3.0", "latest-version": "^5.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "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==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "uri-js": { @@ -8842,12 +8931,52 @@ "dev": true }, "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { - "string-width": "^2.1.1" + "string-width": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "window-size": { @@ -8930,14 +9059,15 @@ "dev": true }, "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, "ws": { @@ -8950,9 +9080,9 @@ } }, "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xml": { From d50423112477978f4733a4727b25aecd9e80a7a7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2020 11:14:03 +0000 Subject: [PATCH 200/260] build(deps-dev): bump prettier from 2.1.2 to 2.2.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f152543c2..e9b6f3eebf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6538,9 +6538,9 @@ "dev": true }, "prettier": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", - "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", "dev": true }, "prismjs": { From 8d4a07302b57dd21f424864b09c2cb72f6317b6e Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Tue, 24 Nov 2020 13:30:26 -0600 Subject: [PATCH 201/260] Add defaultStyles option to overwrite the core default styles (Heading 1-6, document, hyperlinks, etc) --- demo/11-declaritive-styles-2.ts | 120 ++++++++++--------------- demo/2-declaritive-styles.ts | 81 ++++++++--------- src/file/core-properties/properties.ts | 2 + src/file/file.ts | 4 +- src/file/styles/factory.ts | 41 +++++++-- 5 files changed, 121 insertions(+), 127 deletions(-) diff --git a/demo/11-declaritive-styles-2.ts b/demo/11-declaritive-styles-2.ts index 3a0154a0fb..10bc93c17e 100644 --- a/demo/11-declaritive-styles-2.ts +++ b/demo/11-declaritive-styles-2.ts @@ -17,74 +17,56 @@ import { } from "../build"; const doc = new Document({ + defaultStyles: { + heading1: { + run: { + font: "Calibri", + size: 52, + bold: true, + color: "000000", + underline: { + type: UnderlineType.SINGLE, + color: "000000", + }, + }, + paragraph: { + alignment: AlignmentType.CENTER, + spacing: { line: 340 }, + }, + }, + heading2: { + run: { + font: "Calibri", + size: 26, + bold: true, + }, + paragraph: { + spacing: { line: 340 }, + }, + }, + heading3: { + run: { + font: "Calibri", + size: 26, + bold: true, + }, + paragraph: { + spacing: { line: 276 }, + }, + }, + heading4: { + run: { + font: "Calibri", + size: 26, + bold: true, + }, + paragraph: { + alignment: AlignmentType.JUSTIFIED, + }, + }, + }, styles: { paragraphStyles: [ - { - id: "Heading1", - name: "Heading 1", - basedOn: "Normal", - next: "Normal", - quickFormat: true, - run: { - font: "Calibri", - size: 52, - bold: true, - color: "000000", - underline: { - type: UnderlineType.SINGLE, - color: "000000", - }, - }, - paragraph: { - alignment: AlignmentType.CENTER, - spacing: { line: 340 }, - }, - }, - { - id: "Heading2", - name: "Heading 2", - basedOn: "Normal", - next: "Normal", - quickFormat: true, - run: { - font: "Calibri", - size: 26, - bold: true, - }, - paragraph: { - spacing: { line: 340 }, - }, - }, - { - id: "Heading3", - name: "Heading 3", - basedOn: "Normal", - next: "Normal", - quickFormat: true, - run: { - font: "Calibri", - size: 26, - bold: true, - }, - paragraph: { - spacing: { line: 276 }, - }, - }, - { - id: "Heading4", - name: "Heading 4", - basedOn: "Normal", - next: "Normal", - quickFormat: true, - run: { - font: "Calibri", - size: 26, - bold: true, - }, - paragraph: { - alignment: AlignmentType.JUSTIFIED, - }, - }, { id: "normalPara", name: "Normal Para", @@ -139,12 +121,6 @@ const doc = new Document({ spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 }, }, }, - { - id: "ListParagraph", - name: "List Paragraph", - basedOn: "Normal", - quickFormat: true, - }, ], }, }); diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index c34eae9628..f01877a8d5 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -7,47 +7,44 @@ const doc = new Document({ creator: "Clippy", title: "Sample Document", description: "A brief example of using docx", + defaultStyles: { + heading1: { + run: { + size: 28, + bold: true, + italics: true, + color: "red", + }, + paragraph: { + spacing: { + after: 120, + }, + }, + }, + heading2: { + run: { + size: 26, + bold: true, + underline: { + type: UnderlineType.DOUBLE, + color: "FF0000", + }, + }, + paragraph: { + spacing: { + before: 240, + after: 120, + }, + }, + }, + listParagraph: { + run: { + color: '#FF0000' + } + } + }, styles: { paragraphStyles: [ - { - id: "Heading1", - name: "Heading 1", - basedOn: "Normal", - next: "Normal", - quickFormat: true, - run: { - size: 28, - bold: true, - italics: true, - color: "red", - }, - paragraph: { - spacing: { - after: 120, - }, - }, - }, - { - id: "Heading2", - name: "Heading 2", - basedOn: "Normal", - next: "Normal", - quickFormat: true, - run: { - size: 26, - bold: true, - underline: { - type: UnderlineType.DOUBLE, - color: "FF0000", - }, - }, - paragraph: { - spacing: { - before: 240, - after: 120, - }, - }, - }, { id: "aside", name: "Aside", @@ -75,12 +72,6 @@ const doc = new Document({ spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 }, }, }, - { - id: "ListParagraph", - name: "List Paragraph", - basedOn: "Normal", - quickFormat: true, - }, ], }, numbering: { diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index ae9f227ad5..3fb3dbdc7c 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -1,3 +1,4 @@ +import { IDefaultStylesOptions } from "docx/src/file/styles/factory"; import { XmlComponent } from "file/xml-components"; import { IDocumentBackgroundOptions } from "../document"; @@ -28,6 +29,7 @@ export interface IPropertiesOptions { readonly revision?: string; readonly externalStyles?: string; readonly styles?: IStylesOptions; + readonly defaultStyles?: IDefaultStylesOptions; readonly numbering?: INumberingOptions; readonly footnotes?: Paragraph[]; readonly hyperlinks?: { diff --git a/src/file/file.ts b/src/file/file.ts index 1c655253de..2c351f3df3 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -106,14 +106,14 @@ export class File { this.styles = stylesFactory.newInstance(options.externalStyles); } else if (options.styles) { const stylesFactory = new DefaultStylesFactory(); - const defaultStyles = stylesFactory.newInstance(); + const defaultStyles = stylesFactory.newInstance(options.defaultStyles); this.styles = new Styles({ ...defaultStyles, ...options.styles, }); } else { const stylesFactory = new DefaultStylesFactory(); - this.styles = new Styles(stylesFactory.newInstance()); + this.styles = new Styles(stylesFactory.newInstance(options.defaultStyles)); } this.addDefaultRelationships(); diff --git a/src/file/styles/factory.ts b/src/file/styles/factory.ts index f5bca8248d..da4c268447 100644 --- a/src/file/styles/factory.ts +++ b/src/file/styles/factory.ts @@ -1,7 +1,7 @@ import { DocumentAttributes } from "../document/document-attributes"; import { IStylesOptions } from "./styles"; -import { DocumentDefaults } from "./defaults"; +import { DocumentDefaults, IDocumentDefaultsOptions } from "./defaults"; import { FootnoteReferenceStyle, FootnoteText, @@ -13,12 +13,30 @@ import { Heading5Style, Heading6Style, HyperlinkStyle, + IBaseCharacterStyleOptions, + IBaseParagraphStyleOptions, ListParagraph, TitleStyle, } from "./style"; +export interface IDefaultStylesOptions { + readonly document?: IDocumentDefaultsOptions; + readonly title?: IBaseParagraphStyleOptions; + readonly heading1?: IBaseParagraphStyleOptions; + readonly heading2?: IBaseParagraphStyleOptions; + readonly heading3?: IBaseParagraphStyleOptions; + readonly heading4?: IBaseParagraphStyleOptions; + readonly heading5?: IBaseParagraphStyleOptions; + readonly heading6?: IBaseParagraphStyleOptions; + readonly listParagraph?: IBaseParagraphStyleOptions; + readonly hyperlink?: IBaseCharacterStyleOptions; + readonly footnoteReference?: IBaseCharacterStyleOptions; + readonly footnoteText?: IBaseParagraphStyleOptions; + readonly footnoteTextChar?: IBaseCharacterStyleOptions; +} + export class DefaultStylesFactory { - public newInstance(): IStylesOptions { + public newInstance(options: IDefaultStylesOptions = {}): IStylesOptions { const documentAttributes = new DocumentAttributes({ mc: "http://schemas.openxmlformats.org/markup-compatibility/2006", r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships", @@ -30,51 +48,58 @@ export class DefaultStylesFactory { return { initialStyles: documentAttributes, importedStyles: [ - new DocumentDefaults(), + new DocumentDefaults(options.document), new TitleStyle({ run: { size: 56, }, + ...options.title, }), new Heading1Style({ run: { color: "2E74B5", size: 32, }, + ...options.heading1, }), new Heading2Style({ run: { color: "2E74B5", size: 26, }, + ...options.heading2, }), new Heading3Style({ run: { color: "1F4D78", size: 24, }, + ...options.heading3, }), new Heading4Style({ run: { color: "2E74B5", italics: true, }, + ...options.heading4, }), new Heading5Style({ run: { color: "2E74B5", }, + ...options.heading5, }), new Heading6Style({ run: { color: "1F4D78", }, + ...options.heading6, }), - new ListParagraph({}), - new HyperlinkStyle({}), - new FootnoteReferenceStyle({}), - new FootnoteText({}), - new FootnoteTextChar({}), + new ListParagraph(options.listParagraph || {}), + new HyperlinkStyle(options.hyperlink || {}), + new FootnoteReferenceStyle(options.footnoteReference || {}), + new FootnoteText(options.footnoteText || {}), + new FootnoteTextChar(options.footnoteTextChar || {}), ], }; } From f3ba62fd881fb84a4c9d3b7a201538f489fa7030 Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Tue, 24 Nov 2020 13:36:43 -0600 Subject: [PATCH 202/260] bugfix path --- src/file/core-properties/properties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index 3fb3dbdc7c..a36828aca6 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -1,4 +1,4 @@ -import { IDefaultStylesOptions } from "docx/src/file/styles/factory"; +import { IDefaultStylesOptions } from "file/styles/factory"; import { XmlComponent } from "file/xml-components"; import { IDocumentBackgroundOptions } from "../document"; From f54192809fdc134498ee9dd7523e1a074ca37b1d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 23:10:41 +0000 Subject: [PATCH 203/260] build(deps): [security] bump highlight.js from 9.18.1 to 9.18.5 Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5. **This update includes a security fix.** - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f152543c2..b7900a9a69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4249,9 +4249,9 @@ "dev": true }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", "dev": true }, "hmac-drbg": { From 277845626c3ddd8f4dca35aae9d9068f2b5abff9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2020 08:29:40 +0000 Subject: [PATCH 204/260] build(deps-dev): bump prettier from 2.2.0 to 2.2.1 Bumps [prettier](https://github.com/prettier/prettier) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.2.0...2.2.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 59c0aabad3..9ceb87e4ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6538,9 +6538,9 @@ "dev": true }, "prettier": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", - "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, "prismjs": { From 30ab92652c6b32a93587e6cac0d020bb37b158e6 Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Mon, 30 Nov 2020 10:25:58 -0600 Subject: [PATCH 205/260] move file options.defaultStyles to options.styles.default --- demo/11-declaritive-styles-2.ts | 88 +++++++++++++------------- demo/2-declaritive-styles.ts | 72 ++++++++++----------- src/file/core-properties/properties.ts | 2 - src/file/file.ts | 4 +- src/file/styles/styles.ts | 3 +- 5 files changed, 84 insertions(+), 85 deletions(-) diff --git a/demo/11-declaritive-styles-2.ts b/demo/11-declaritive-styles-2.ts index 10bc93c17e..5fe9e16ae6 100644 --- a/demo/11-declaritive-styles-2.ts +++ b/demo/11-declaritive-styles-2.ts @@ -17,55 +17,55 @@ import { } from "../build"; const doc = new Document({ - defaultStyles: { - heading1: { - run: { - font: "Calibri", - size: 52, - bold: true, - color: "000000", - underline: { - type: UnderlineType.SINGLE, + styles: { + default: { + heading1: { + run: { + font: "Calibri", + size: 52, + bold: true, color: "000000", + underline: { + type: UnderlineType.SINGLE, + color: "000000", + }, + }, + paragraph: { + alignment: AlignmentType.CENTER, + spacing: { line: 340 }, }, }, - paragraph: { - alignment: AlignmentType.CENTER, - spacing: { line: 340 }, + heading2: { + run: { + font: "Calibri", + size: 26, + bold: true, + }, + paragraph: { + spacing: { line: 340 }, + }, + }, + heading3: { + run: { + font: "Calibri", + size: 26, + bold: true, + }, + paragraph: { + spacing: { line: 276 }, + }, + }, + heading4: { + run: { + font: "Calibri", + size: 26, + bold: true, + }, + paragraph: { + alignment: AlignmentType.JUSTIFIED, + }, }, }, - heading2: { - run: { - font: "Calibri", - size: 26, - bold: true, - }, - paragraph: { - spacing: { line: 340 }, - }, - }, - heading3: { - run: { - font: "Calibri", - size: 26, - bold: true, - }, - paragraph: { - spacing: { line: 276 }, - }, - }, - heading4: { - run: { - font: "Calibri", - size: 26, - bold: true, - }, - paragraph: { - alignment: AlignmentType.JUSTIFIED, - }, - }, - }, - styles: { paragraphStyles: [ { id: "normalPara", diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index f01877a8d5..6f3add1f19 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -7,43 +7,43 @@ const doc = new Document({ creator: "Clippy", title: "Sample Document", description: "A brief example of using docx", - defaultStyles: { - heading1: { - run: { - size: 28, - bold: true, - italics: true, - color: "red", - }, - paragraph: { - spacing: { - after: 120, - }, - }, - }, - heading2: { - run: { - size: 26, - bold: true, - underline: { - type: UnderlineType.DOUBLE, - color: "FF0000", - }, - }, - paragraph: { - spacing: { - before: 240, - after: 120, - }, - }, - }, - listParagraph: { - run: { - color: '#FF0000' - } - } - }, styles: { + default: { + heading1: { + run: { + size: 28, + bold: true, + italics: true, + color: "red", + }, + paragraph: { + spacing: { + after: 120, + }, + }, + }, + heading2: { + run: { + size: 26, + bold: true, + underline: { + type: UnderlineType.DOUBLE, + color: "FF0000", + }, + }, + paragraph: { + spacing: { + before: 240, + after: 120, + }, + }, + }, + listParagraph: { + run: { + color: '#FF0000' + } + } + }, paragraphStyles: [ { id: "aside", diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index a36828aca6..ae9f227ad5 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -1,4 +1,3 @@ -import { IDefaultStylesOptions } from "file/styles/factory"; import { XmlComponent } from "file/xml-components"; import { IDocumentBackgroundOptions } from "../document"; @@ -29,7 +28,6 @@ export interface IPropertiesOptions { readonly revision?: string; readonly externalStyles?: string; readonly styles?: IStylesOptions; - readonly defaultStyles?: IDefaultStylesOptions; readonly numbering?: INumberingOptions; readonly footnotes?: Paragraph[]; readonly hyperlinks?: { diff --git a/src/file/file.ts b/src/file/file.ts index 2c351f3df3..90986d16d7 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -106,14 +106,14 @@ export class File { this.styles = stylesFactory.newInstance(options.externalStyles); } else if (options.styles) { const stylesFactory = new DefaultStylesFactory(); - const defaultStyles = stylesFactory.newInstance(options.defaultStyles); + const defaultStyles = stylesFactory.newInstance(options.styles.default); this.styles = new Styles({ ...defaultStyles, ...options.styles, }); } else { const stylesFactory = new DefaultStylesFactory(); - this.styles = new Styles(stylesFactory.newInstance(options.defaultStyles)); + this.styles = new Styles(stylesFactory.newInstance()); } this.addDefaultRelationships(); diff --git a/src/file/styles/styles.ts b/src/file/styles/styles.ts index 1fbc4b5e50..1906b45ba0 100644 --- a/src/file/styles/styles.ts +++ b/src/file/styles/styles.ts @@ -1,11 +1,12 @@ +import { IDefaultStylesOptions } from "file/styles/factory"; import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "file/xml-components"; - import { StyleForCharacter, StyleForParagraph } from "./style"; import { ICharacterStyleOptions } from "./style/character-style"; import { IParagraphStyleOptions } from "./style/paragraph-style"; export * from "./border"; export interface IStylesOptions { + readonly default?: IDefaultStylesOptions; readonly initialStyles?: BaseXmlComponent; readonly paragraphStyles?: IParagraphStyleOptions[]; readonly characterStyles?: ICharacterStyleOptions[]; From feb121707d03c17a318002928c7192956edf79d4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 3 Dec 2020 08:01:46 +0000 Subject: [PATCH 206/260] build(deps-dev): bump ts-node from 9.0.0 to 9.1.0 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.0.0 to 9.1.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v9.0.0...v9.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9ceb87e4ad..5a33ceeb66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2104,6 +2104,12 @@ "sha.js": "^2.4.8" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -7952,12 +7958,13 @@ "dev": true }, "ts-node": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.0.0.tgz", - "integrity": "sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.0.tgz", + "integrity": "sha512-0yqcL4sgruCvM+w64LiAfNJo6+lHfCYc5Ajj4yiLNkJ9oZ2HWaa+Kso7htYOOxVQ7+csAjdUjffOe9PIqC4pMg==", "dev": true, "requires": { "arg": "^4.1.0", + "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "source-map-support": "^0.5.17", From 3ee3e95410e9bf3f9f8da8922202812901afdb54 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 8 Dec 2020 08:49:26 +0000 Subject: [PATCH 207/260] build(deps-dev): bump ts-node from 9.1.0 to 9.1.1 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.1.0 to 9.1.1. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v9.1.0...v9.1.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a33ceeb66..6e58c62fa7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7958,9 +7958,9 @@ "dev": true }, "ts-node": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.0.tgz", - "integrity": "sha512-0yqcL4sgruCvM+w64LiAfNJo6+lHfCYc5Ajj4yiLNkJ9oZ2HWaa+Kso7htYOOxVQ7+csAjdUjffOe9PIqC4pMg==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", "dev": true, "requires": { "arg": "^4.1.0", From 4c8829df28447625d2fd561bbf8aaa83cc7f222f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 08:04:12 +0000 Subject: [PATCH 208/260] build(deps-dev): bump @types/mocha from 8.0.4 to 8.2.0 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.4 to 8.2.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a33ceeb66..c1c2bc20e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -576,9 +576,9 @@ "dev": true }, "@types/mocha": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.4.tgz", - "integrity": "sha512-M4BwiTJjHmLq6kjON7ZoI2JMlBvpY3BYSdiP6s/qCT3jb1s9/DeJF0JELpAxiVSIxXDzfNKe+r7yedMIoLbknQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", + "integrity": "sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==", "dev": true }, "@types/node": { From a0c13214e69aa1ad45a1a125cb6f35ce0d1414fc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 11 Dec 2020 08:22:49 +0000 Subject: [PATCH 209/260] build(deps-dev): bump @types/request-promise from 4.1.46 to 4.1.47 Bumps [@types/request-promise](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/request-promise) from 4.1.46 to 4.1.47. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/request-promise) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a33ceeb66..e665f2adf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ "dev": true }, "@types/bluebird": { - "version": "3.5.32", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.32.tgz", - "integrity": "sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.33.tgz", + "integrity": "sha512-ndEo1xvnYeHxm7I/5sF6tBvnsA4Tdi3zj1keRKRs12SP+2ye2A27NDJ1B6PqkfMbGAcT+mqQVqbZRIrhfOp5PQ==", "dev": true }, "@types/caseless": { @@ -612,9 +612,9 @@ } }, "@types/request-promise": { - "version": "4.1.46", - "resolved": "https://registry.npmjs.org/@types/request-promise/-/request-promise-4.1.46.tgz", - "integrity": "sha512-3Thpj2Va5m0ji3spaCk8YKrjkZyZc6RqUVOphA0n/Xet66AW/AiOAs5vfXhQIL5NmkaO7Jnun7Nl9NEjJ2zBaw==", + "version": "4.1.47", + "resolved": "https://registry.npmjs.org/@types/request-promise/-/request-promise-4.1.47.tgz", + "integrity": "sha512-eRSZhAS8SMsrWOM8vbhxFGVZhTbWSJvaRKyufJTdIf4gscUouQvOBlfotPSPHbMR3S7kfkyKbhb1SWPmQdy3KQ==", "dev": true, "requires": { "@types/bluebird": "*", From 69ba312a9670a184213a34ee699250500b632043 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Dec 2020 22:47:35 +0000 Subject: [PATCH 210/260] build(deps): bump ini from 1.3.5 to 1.3.8 Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] --- package-lock.json | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a33ceeb66..fb03dc9344 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3501,13 +3501,6 @@ "dev": true, "optional": true }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true, - "optional": true - }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -4370,9 +4363,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "interpret": { From 8bdde98db129684cec80ce94bebad8471d60dc7e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 15 Dec 2020 08:16:05 +0000 Subject: [PATCH 211/260] build(deps-dev): bump sinon from 9.2.1 to 9.2.2 Bumps [sinon](https://github.com/sinonjs/sinon) from 9.2.1 to 9.2.2. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/commits/v9.2.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d514c55a55..c0e33b855d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -498,9 +498,9 @@ } }, "@sinonjs/samsam": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.2.0.tgz", - "integrity": "sha512-CaIcyX5cDsjcW/ab7HposFWzV1kC++4HNsfnEdFJa7cP1QIuILAKV+BgfeqRXhcnSAc76r/Rh/O5C+300BwUIw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", + "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -7365,15 +7365,15 @@ "dev": true }, "sinon": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.1.tgz", - "integrity": "sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.2.tgz", + "integrity": "sha512-9Owi+RisvCZpB0bdOVFfL314I6I4YoRlz6Isi4+fr8q8YQsDPoCe5UnmNtKHRThX3negz2bXHWIuiPa42vM8EQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.1", "@sinonjs/fake-timers": "^6.0.1", "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.2.0", + "@sinonjs/samsam": "^5.3.0", "diff": "^4.0.2", "nise": "^4.0.4", "supports-color": "^7.1.0" From 52f0a6958ae1e11a3a47ea15ece19f2727a52d5c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 22 Dec 2020 08:14:29 +0000 Subject: [PATCH 212/260] build(deps-dev): bump prompt from 1.0.0 to 1.1.0 Bumps [prompt](https://github.com/flatiron/prompt) from 1.0.0 to 1.1.0. - [Release notes](https://github.com/flatiron/prompt/releases) - [Changelog](https://github.com/flatiron/prompt/blob/master/CHANGELOG.md) - [Commits](https://github.com/flatiron/prompt/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index d514c55a55..57c78507cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1932,9 +1932,9 @@ "dev": true }, "colors": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", - "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true }, "combined-stream": { @@ -5598,9 +5598,9 @@ "dev": true }, "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, "nan": { @@ -6501,12 +6501,6 @@ } } }, - "pkginfo": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", - "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=", - "dev": true - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -6578,17 +6572,16 @@ "dev": true }, "prompt": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.0.0.tgz", - "integrity": "sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.1.0.tgz", + "integrity": "sha512-ec1vUPXCplDBDUVD8uPa3XGA+OzLrO40Vxv3F1uxoiZGkZhdctlK2JotcHq5X6ExjocDOGwGdCSXloGNyU5L1Q==", "dev": true, "requires": { "colors": "^1.1.2", - "pkginfo": "0.x.x", "read": "1.0.x", "revalidator": "0.1.x", "utile": "0.3.x", - "winston": "2.1.x" + "winston": "2.x" } }, "prr": { @@ -8986,9 +8979,9 @@ "dev": true }, "winston": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz", - "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", + "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", "dev": true, "requires": { "async": "~1.0.0", @@ -8996,7 +8989,6 @@ "cycle": "1.0.x", "eyes": "0.1.x", "isstream": "0.1.x", - "pkginfo": "0.3.x", "stack-trace": "0.0.x" }, "dependencies": { @@ -9011,12 +9003,6 @@ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true - }, - "pkginfo": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", - "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", - "dev": true } } }, From a14a1fbd10560920cd15339d79a7e39c4f0f6927 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 22 Dec 2020 20:56:06 +0000 Subject: [PATCH 213/260] Update character style demo --- demo/51-character-styles.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/demo/51-character-styles.ts b/demo/51-character-styles.ts index 3230a7c86f..a6064a4ddc 100644 --- a/demo/51-character-styles.ts +++ b/demo/51-character-styles.ts @@ -15,6 +15,14 @@ const doc = new Document({ italics: true, }, }, + { + id: "strong", + name: "Strong", + basedOn: "Normal", + run: { + bold: true, + }, + }, ], }, }); @@ -29,6 +37,18 @@ doc.addSection({ }), ], }), + new Paragraph({ + children: [ + new TextRun({ + text: "First Word", + style: "strong", + }), + new TextRun({ + text: + " - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + }), + ], + }), ], }); From 0afe0929a371c1e144253fb368054f3baf381c93 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 22 Dec 2020 21:08:10 +0000 Subject: [PATCH 214/260] Add strong default style --- demo/2-declaritive-styles.ts | 18 +++++++++++++++--- src/file/styles/factory.ts | 8 ++++++++ src/file/styles/style/default-styles.spec.ts | 14 ++++++++++++++ src/file/styles/style/default-styles.ts | 10 ++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index 6f3add1f19..b96056166e 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -40,9 +40,9 @@ const doc = new Document({ }, listParagraph: { run: { - color: '#FF0000' - } - } + color: "#FF0000", + }, + }, }, paragraphStyles: [ { @@ -161,6 +161,18 @@ doc.addSection({ }), ], }), + new Paragraph({ + style: "Strong", + children: [ + new TextRun({ + text: "Strong Style", + }), + new TextRun({ + text: + " - Very strong.", + }), + ], + }), ], }); diff --git a/src/file/styles/factory.ts b/src/file/styles/factory.ts index da4c268447..097c812433 100644 --- a/src/file/styles/factory.ts +++ b/src/file/styles/factory.ts @@ -16,6 +16,7 @@ import { IBaseCharacterStyleOptions, IBaseParagraphStyleOptions, ListParagraph, + StrongStyle, TitleStyle, } from "./style"; @@ -28,6 +29,7 @@ export interface IDefaultStylesOptions { readonly heading4?: IBaseParagraphStyleOptions; readonly heading5?: IBaseParagraphStyleOptions; readonly heading6?: IBaseParagraphStyleOptions; + readonly strong?: IBaseParagraphStyleOptions; readonly listParagraph?: IBaseParagraphStyleOptions; readonly hyperlink?: IBaseCharacterStyleOptions; readonly footnoteReference?: IBaseCharacterStyleOptions; @@ -95,6 +97,12 @@ export class DefaultStylesFactory { }, ...options.heading6, }), + new StrongStyle({ + run: { + bold: true, + }, + ...options.strong, + }), new ListParagraph(options.listParagraph || {}), new HyperlinkStyle(options.hyperlink || {}), new FootnoteReferenceStyle(options.footnoteReference || {}), diff --git a/src/file/styles/style/default-styles.spec.ts b/src/file/styles/style/default-styles.spec.ts index 1cf26ba482..962f47d9c0 100644 --- a/src/file/styles/style/default-styles.spec.ts +++ b/src/file/styles/style/default-styles.spec.ts @@ -120,6 +120,20 @@ describe("Default Styles", () => { }); }); + it("StrongStyle#constructor", () => { + const style = new defaultStyles.StrongStyle({}); + const tree = new Formatter().format(style); + expect(tree).to.deep.equal({ + "w:style": [ + { _attr: { "w:type": "paragraph", "w:styleId": "Strong" } }, + { "w:name": { _attr: { "w:val": "Strong" } } }, + { "w:basedOn": { _attr: { "w:val": "Normal" } } }, + { "w:next": { _attr: { "w:val": "Normal" } } }, + { "w:qFormat": EMPTY_OBJECT }, + ], + }); + }); + it("ListParagraph#constructor", () => { const style = new defaultStyles.ListParagraph({}); const tree = new Formatter().format(style); diff --git a/src/file/styles/style/default-styles.ts b/src/file/styles/style/default-styles.ts index b1de98e076..f8be7572ee 100644 --- a/src/file/styles/style/default-styles.ts +++ b/src/file/styles/style/default-styles.ts @@ -84,6 +84,16 @@ export class Heading6Style extends HeadingStyle { } } +export class StrongStyle extends HeadingStyle { + constructor(options: IBaseParagraphStyleOptions) { + super({ + ...options, + id: "Strong", + name: "Strong", + }); + } +} + export class ListParagraph extends StyleForParagraph { constructor(options: IBaseParagraphStyleOptions) { super({ From d6cce4ae156d49540b56b597895127b062f61e79 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 22 Dec 2020 23:42:02 +0000 Subject: [PATCH 215/260] Adding TableBorders.NONE convenience object --- demo/49-table-borders.ts | 136 +++++++++++++++++- .../table-properties/table-borders.spec.ts | 72 ++++++++++ .../table/table-properties/table-borders.ts | 33 +++++ 3 files changed, 238 insertions(+), 3 deletions(-) diff --git a/demo/49-table-borders.ts b/demo/49-table-borders.ts index 2aebf1feb1..75dd89c49f 100644 --- a/demo/49-table-borders.ts +++ b/demo/49-table-borders.ts @@ -1,7 +1,19 @@ -// Add custom borders to the table itself +// Add custom borders and no-borders to the table itself // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { BorderStyle, Document, Packer, Paragraph, Table, TableCell, TableRow } from "../build"; +import { + BorderStyle, + Document, + HeadingLevel, + Packer, + Paragraph, + Table, + TableBorders, + TableCell, + TableRow, + TextDirection, + VerticalAlign, +} from "../build"; const doc = new Document(); @@ -10,6 +22,28 @@ const table = new Table({ new TableRow({ children: [ new TableCell({ + borders: { + top: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + bottom: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + left: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + right: { + style: BorderStyle.DASH_SMALL_GAP, + size: 1, + color: "red", + }, + }, children: [new Paragraph("Hello")], }), new TableCell({ @@ -30,7 +64,103 @@ const table = new Table({ ], }); -doc.addSection({ children: [table] }); +// Using the no-border convenience object. It is the same as writing this manually: +// const borders = { +// top: { +// style: BorderStyle.NONE, +// size: 0, +// color: "auto", +// }, +// bottom: { +// style: BorderStyle.NONE, +// size: 0, +// color: "auto", +// }, +// left: { +// style: BorderStyle.NONE, +// size: 0, +// color: "auto", +// }, +// right: { +// style: BorderStyle.NONE, +// size: 0, +// color: "auto", +// }, +// insideHorizontal: { +// style: BorderStyle.NONE, +// size: 0, +// color: "auto", +// }, +// insideVertical: { +// style: BorderStyle.NONE, +// size: 0, +// color: "auto", +// }, +// }; +const noBorderTable = new Table({ + borders: TableBorders.NONE, + rows: [ + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph({}), new Paragraph({})], + verticalAlign: VerticalAlign.CENTER, + }), + new TableCell({ + children: [new Paragraph({}), new Paragraph({})], + verticalAlign: VerticalAlign.CENTER, + }), + new TableCell({ + children: [new Paragraph({ text: "bottom to top" }), new Paragraph({})], + textDirection: TextDirection.BOTTOM_TO_TOP_LEFT_TO_RIGHT, + }), + new TableCell({ + children: [new Paragraph({ text: "top to bottom" }), new Paragraph({})], + textDirection: TextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT, + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [ + new Paragraph({ + text: + "Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah", + heading: HeadingLevel.HEADING_1, + }), + ], + }), + new TableCell({ + children: [ + new Paragraph({ + text: "This text should be in the middle of the cell", + }), + ], + verticalAlign: VerticalAlign.CENTER, + }), + new TableCell({ + children: [ + new Paragraph({ + text: "Text above should be vertical from bottom to top", + }), + ], + verticalAlign: VerticalAlign.CENTER, + }), + new TableCell({ + children: [ + new Paragraph({ + text: "Text above should be vertical from top to bottom", + }), + ], + verticalAlign: VerticalAlign.CENTER, + }), + ], + }), + ], +}); + +doc.addSection({ children: [table, new Paragraph("Hello"), noBorderTable] }); Packer.toBuffer(doc).then((buffer) => { fs.writeFileSync("My Document.docx", buffer); diff --git a/src/file/table/table-properties/table-borders.spec.ts b/src/file/table/table-properties/table-borders.spec.ts index 679192f120..4a3212feb1 100644 --- a/src/file/table/table-properties/table-borders.spec.ts +++ b/src/file/table/table-properties/table-borders.spec.ts @@ -546,5 +546,77 @@ describe("TableBorders", () => { }); }); }); + + describe("TableBorders.NONE convenience object", () => { + it("should add no borders", () => { + const tableBorders = new TableBorders(TableBorders.NONE); + const tree = new Formatter().format(tableBorders); + + expect(tree).to.deep.equal({ + "w:tblBorders": [ + { + "w:top": { + _attr: { + "w:color": "auto", + "w:space": 0, + "w:sz": 0, + "w:val": "none", + }, + }, + }, + { + "w:left": { + _attr: { + "w:color": "auto", + "w:space": 0, + "w:sz": 0, + "w:val": "none", + }, + }, + }, + { + "w:bottom": { + _attr: { + "w:color": "auto", + "w:space": 0, + "w:sz": 0, + "w:val": "none", + }, + }, + }, + { + "w:right": { + _attr: { + "w:color": "auto", + "w:space": 0, + "w:sz": 0, + "w:val": "none", + }, + }, + }, + { + "w:insideH": { + _attr: { + "w:color": "auto", + "w:space": 0, + "w:sz": 0, + "w:val": "none", + }, + }, + }, + { + "w:insideV": { + _attr: { + "w:color": "auto", + "w:space": 0, + "w:sz": 0, + "w:val": "none", + }, + }, + }, + ], + }); + }); + }); }); }); diff --git a/src/file/table/table-properties/table-borders.ts b/src/file/table/table-properties/table-borders.ts index 7c7ac96ca9..8de354fc36 100644 --- a/src/file/table/table-properties/table-borders.ts +++ b/src/file/table/table-properties/table-borders.ts @@ -36,6 +36,39 @@ export interface ITableBordersOptions { } export class TableBorders extends XmlComponent { + public static readonly NONE = { + top: { + style: BorderStyle.NONE, + size: 0, + color: "auto", + }, + bottom: { + style: BorderStyle.NONE, + size: 0, + color: "auto", + }, + left: { + style: BorderStyle.NONE, + size: 0, + color: "auto", + }, + right: { + style: BorderStyle.NONE, + size: 0, + color: "auto", + }, + insideHorizontal: { + style: BorderStyle.NONE, + size: 0, + color: "auto", + }, + insideVertical: { + style: BorderStyle.NONE, + size: 0, + color: "auto", + }, + }; + constructor(options: ITableBordersOptions) { super("w:tblBorders"); From 6100ff4c4e9dd3a7362c31e7e7292cede8c67f24 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Wed, 23 Dec 2020 23:31:28 +0000 Subject: [PATCH 216/260] Add declarative break() --- docs/usage/text.md | 11 ++++++++++- src/file/paragraph/run/run.spec.ts | 20 ++++++++++++++++++-- src/file/paragraph/run/run.ts | 10 ++++++---- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/docs/usage/text.md b/docs/usage/text.md index 3ae388f780..0b7b88686b 100644 --- a/docs/usage/text.md +++ b/docs/usage/text.md @@ -158,6 +158,15 @@ Sometimes you would want to put text underneath another line of text but inside ```ts const text = new TextRun({ text: "break", - break: true, + break: 1, +}); +``` + +Adding two breaks: + +```ts +const text = new TextRun({ + text: "break", + break: 2, }); ``` diff --git a/src/file/paragraph/run/run.spec.ts b/src/file/paragraph/run/run.spec.ts index 40cc7055cd..017c616938 100644 --- a/src/file/paragraph/run/run.spec.ts +++ b/src/file/paragraph/run/run.spec.ts @@ -239,13 +239,29 @@ describe("Run", () => { describe("#break()", () => { it("it should add break to the run", () => { - const run = new Run({}); - run.break(); + const run = new Run({ + break: 1, + }); const tree = new Formatter().format(run); expect(tree).to.deep.equal({ "w:r": [{ "w:br": {} }], }); }); + + it("it should add two breaks to the run", () => { + const run = new Run({ + break: 2, + }); + const tree = new Formatter().format(run); + expect(tree).to.deep.equal({ + "w:r": [ + { "w:br": {} }, + { + "w:br": {}, + }, + ], + }); + }); }); describe("#font()", () => { diff --git a/src/file/paragraph/run/run.ts b/src/file/paragraph/run/run.ts index bf7903e35e..461fd9da29 100644 --- a/src/file/paragraph/run/run.ts +++ b/src/file/paragraph/run/run.ts @@ -11,6 +11,7 @@ import { Text } from "./run-components/text"; export interface IRunOptions extends IRunPropertiesOptions { readonly children?: (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[]; + readonly break?: number; readonly text?: string; } @@ -62,10 +63,11 @@ export class Run extends XmlComponent { } else if (options.text) { this.root.push(new Text(options.text)); } - } - public break(): Run { - this.root.splice(1, 0, new Break()); - return this; + if (options.break) { + for (let i = 0; i < options.break; i++) { + this.root.splice(1, 0, new Break()); + } + } } } From 17d02a3d1c6d7f9d056a07d855276359192a464c Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 24 Dec 2020 00:00:24 +0000 Subject: [PATCH 217/260] Fix demos --- demo/10-my-cv.ts | 5 ++++- demo/54-track-revisions.ts | 3 ++- .../deleted-text-run.spec.ts | 3 ++- .../deleted-text-run.ts | 22 +++++++------------ 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/demo/10-my-cv.ts b/demo/10-my-cv.ts index b91ca318bb..484a9c249c 100644 --- a/demo/10-my-cv.ts +++ b/demo/10-my-cv.ts @@ -204,7 +204,10 @@ class DocumentCreator { alignment: AlignmentType.CENTER, children: [ new TextRun(`Mobile: ${phoneNumber} | LinkedIn: ${profileUrl} | Email: ${email}`), - new TextRun("Address: 58 Elm Avenue, Kent ME4 6ER, UK").break(), + new TextRun({ + text: "Address: 58 Elm Avenue, Kent ME4 6ER, UK", + break: 1, + }), ], }); } diff --git a/demo/54-track-revisions.ts b/demo/54-track-revisions.ts index a0cc47a03b..e035fbb18a 100644 --- a/demo/54-track-revisions.ts +++ b/demo/54-track-revisions.ts @@ -80,6 +80,7 @@ doc.addSection({ children: [ new TextRun("This is a demo "), new DeletedTextRun({ + break: 1, text: "in order", color: "red", bold: true, @@ -95,7 +96,7 @@ doc.addSection({ id: 2, author: "Firstname Lastname", date: "2020-10-06T09:00:00Z", - }).break(), + }), new InsertedTextRun({ text: "to show how to ", bold: false, diff --git a/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts b/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts index 0a6877fdd5..6bd11c24d7 100644 --- a/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts +++ b/src/file/track-revision/track-revision-components/deleted-text-run.spec.ts @@ -89,11 +89,12 @@ describe("DeletedTextRun", () => { describe("#break()", () => { it("should add a break", () => { const deletedTextRun = new DeletedTextRun({ + break: 1, children: ["some text"], id: 0, date: "123", author: "Author", - }).break(); + }); const tree = new Formatter().format(deletedTextRun); expect(tree).to.deep.equal({ "w:del": [ diff --git a/src/file/track-revision/track-revision-components/deleted-text-run.ts b/src/file/track-revision/track-revision-components/deleted-text-run.ts index 56d384b31b..7830d3d63c 100644 --- a/src/file/track-revision/track-revision-components/deleted-text-run.ts +++ b/src/file/track-revision/track-revision-components/deleted-text-run.ts @@ -1,6 +1,6 @@ import { XmlComponent } from "file/xml-components"; -import { FootnoteReferenceRun, IRunOptions, IRunPropertiesOptions, RunProperties } from "../../index"; +import { IRunOptions, RunProperties } from "../../index"; import { Break } from "../../paragraph/run/break"; import { Begin, End, Separate } from "../../paragraph/run/field"; import { PageNumber } from "../../paragraph/run/run"; @@ -8,10 +8,7 @@ import { ChangeAttributes, IChangedAttributesProperties } from "../track-revisio import { DeletedNumberOfPages, DeletedNumberOfPagesSection, DeletedPage } from "./deleted-page-number"; import { DeletedText } from "./deleted-text"; -interface IDeletedRunOptions extends IRunPropertiesOptions, IChangedAttributesProperties { - readonly children?: (Begin | Separate | End | PageNumber | FootnoteReferenceRun | string)[]; - readonly text?: string; -} +interface IDeletedRunOptions extends IRunOptions, IChangedAttributesProperties {} export class DeletedTextRun extends XmlComponent { protected readonly deletedTextRunWrapper: DeletedTextRunWrapper; @@ -25,14 +22,9 @@ export class DeletedTextRun extends XmlComponent { date: options.date, }), ); - this.deletedTextRunWrapper = new DeletedTextRunWrapper(options as IRunOptions); + this.deletedTextRunWrapper = new DeletedTextRunWrapper(options); this.addChildElement(this.deletedTextRunWrapper); } - - public break(): DeletedTextRun { - this.deletedTextRunWrapper.break(); - return this; - } } class DeletedTextRunWrapper extends XmlComponent { @@ -74,9 +66,11 @@ class DeletedTextRunWrapper extends XmlComponent { } else if (options.text) { this.root.push(new DeletedText(options.text)); } - } - public break(): void { - this.root.splice(1, 0, new Break()); + if (options.break) { + for (let i = 0; i < options.break; i++) { + this.root.splice(1, 0, new Break()); + } + } } } From ef12ada5d7dd4e45f0956ef7070d677c17966662 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 24 Dec 2020 01:50:05 +0000 Subject: [PATCH 218/260] Add parent to numbered list --- demo/57-add-parent-numbered-lists.ts | 88 ++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 demo/57-add-parent-numbered-lists.ts diff --git a/demo/57-add-parent-numbered-lists.ts b/demo/57-add-parent-numbered-lists.ts new file mode 100644 index 0000000000..1e12ebc75c --- /dev/null +++ b/demo/57-add-parent-numbered-lists.ts @@ -0,0 +1,88 @@ +// Numbered lists - Add parent number in sub number +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { AlignmentType, Document, HeadingLevel, Packer, Paragraph } from "../build"; + +const doc = new Document({ + numbering: { + config: [ + { + levels: [ + { + level: 0, + format: "decimal", + text: "%1", + alignment: AlignmentType.START, + style: { + paragraph: { + indent: { left: 720, hanging: 260 }, + }, + }, + }, + { + level: 1, + format: "decimal", + text: "%1.%2", + alignment: AlignmentType.START, + style: { + paragraph: { + indent: { left: 1.25 * 720, hanging: 1.25 * 260 }, + }, + run: { + bold: true, + size: 18, + font: "Times New Roman", + }, + }, + }, + ], + reference: "my-number-numbering-reference", + }, + ], + }, +}); + +doc.addSection({ + children: [ + new Paragraph({ + text: "How to make cake", + heading: HeadingLevel.HEADING_1, + }), + new Paragraph({ + text: "Step 1 - Add sugar", + numbering: { + reference: "my-number-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "Step 2 - Add wheat", + numbering: { + reference: "my-number-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "Step 2a - Stir the wheat in a circle", + numbering: { + reference: "my-number-numbering-reference", + level: 1, + }, + }), + new Paragraph({ + text: "Step 3 - Put in oven", + numbering: { + reference: "my-number-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "How to make cake", + heading: HeadingLevel.HEADING_1, + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); From 502db14bba87291ed0dabd05c4300a296a1b369a Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 24 Dec 2020 03:37:43 +0000 Subject: [PATCH 219/260] Add Convenience functions --- demo/11-declaritive-styles-2.ts | 3 +- demo/2-declaritive-styles.ts | 7 ++-- demo/27-declaritive-styles-3.ts | 4 +- demo/29-numbered-lists.ts | 6 +-- demo/3-numbering-and-bullet-points.ts | 8 ++-- demo/32-merge-and-shade-table-cells.ts | 39 ++++++++++++------- demo/57-add-parent-numbered-lists.ts | 6 +-- docs/_sidebar.md | 3 ++ docs/usage/convenience-functions.md | 22 +++++++++++ src/convenience-functions.spec.ts | 18 +++++++++ src/convenience-functions.ts | 8 ++++ .../section-properties.spec.ts | 11 +++--- .../section-properties/section-properties.ts | 9 +++-- src/file/numbering/numbering.ts | 19 ++++----- src/index.ts | 1 + 15 files changed, 115 insertions(+), 49 deletions(-) create mode 100644 docs/usage/convenience-functions.md create mode 100644 src/convenience-functions.spec.ts create mode 100644 src/convenience-functions.ts diff --git a/demo/11-declaritive-styles-2.ts b/demo/11-declaritive-styles-2.ts index 5fe9e16ae6..2f4ed78098 100644 --- a/demo/11-declaritive-styles-2.ts +++ b/demo/11-declaritive-styles-2.ts @@ -3,6 +3,7 @@ import * as fs from "fs"; import { AlignmentType, + convertInchesToTwip, Document, Footer, HeadingLevel, @@ -110,7 +111,7 @@ const doc = new Document({ }, paragraph: { spacing: { line: 276 }, - indent: { left: 720 }, + indent: { left: convertInchesToTwip(0.5) }, }, }, { diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index b96056166e..a7b7c4953b 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -1,7 +1,7 @@ // Example on how to customise the look at feel using Styles // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, Document, HeadingLevel, Packer, Paragraph, TextRun, UnderlineType } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, Packer, Paragraph, TextRun, UnderlineType } from "../build"; const doc = new Document({ creator: "Clippy", @@ -56,7 +56,7 @@ const doc = new Document({ }, paragraph: { indent: { - left: 720, + left: convertInchesToTwip(0.5), }, spacing: { line: 276, @@ -168,8 +168,7 @@ doc.addSection({ text: "Strong Style", }), new TextRun({ - text: - " - Very strong.", + text: " - Very strong.", }), ], }), diff --git a/demo/27-declaritive-styles-3.ts b/demo/27-declaritive-styles-3.ts index 8419467799..8737c69101 100644 --- a/demo/27-declaritive-styles-3.ts +++ b/demo/27-declaritive-styles-3.ts @@ -1,7 +1,7 @@ // Custom styles using JavaScript configuration // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, HeadingLevel, Packer, Paragraph, UnderlineType } from "../build"; +import { Document, convertInchesToTwip, HeadingLevel, Packer, Paragraph, UnderlineType } from "../build"; const doc = new Document({ styles: { @@ -17,7 +17,7 @@ const doc = new Document({ }, paragraph: { indent: { - left: 720, + left: convertInchesToTwip(0.5), }, spacing: { line: 276, diff --git a/demo/29-numbered-lists.ts b/demo/29-numbered-lists.ts index 5cd3966015..5337db4438 100644 --- a/demo/29-numbered-lists.ts +++ b/demo/29-numbered-lists.ts @@ -1,7 +1,7 @@ // Numbered lists // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, Document, Packer, Paragraph } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, Packer, Paragraph } from "../build"; const doc = new Document({ numbering: { @@ -15,7 +15,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 720, hanging: 260 }, + indent: { left: convertInchesToTwip(0.5), hanging: convertInchesToTwip(0.18) }, }, }, }, @@ -31,7 +31,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 720, hanging: 260 }, + indent: { left: convertInchesToTwip(0.5), hanging: convertInchesToTwip(0.18) }, }, }, }, diff --git a/demo/3-numbering-and-bullet-points.ts b/demo/3-numbering-and-bullet-points.ts index 58c0a4f5a6..6a4155452d 100644 --- a/demo/3-numbering-and-bullet-points.ts +++ b/demo/3-numbering-and-bullet-points.ts @@ -1,7 +1,7 @@ // Numbering and bullet points example // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, Document, Packer, Paragraph } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, Packer, Paragraph } from "../build"; const doc = new Document({ numbering: { @@ -16,7 +16,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 720, hanging: 260 }, + indent: { left: convertInchesToTwip(0.5), hanging: convertInchesToTwip(0.18) }, }, }, }, @@ -27,7 +27,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 1440, hanging: 980 }, + indent: { left: convertInchesToTwip(1), hanging: convertInchesToTwip(0.68) }, }, }, }, @@ -38,7 +38,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 2160, hanging: 1700 }, + indent: { left: convertInchesToTwip(1.5), hanging: convertInchesToTwip(1.18) }, }, }, }, diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index f12350988e..284b456e05 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -2,7 +2,20 @@ // Also includes an example on how to center tables // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, BorderStyle, Document, HeadingLevel, Packer, Paragraph, ShadingType, Table, TableCell, TableRow, WidthType } from "../build"; +import { + AlignmentType, + BorderStyle, + convertInchesToTwip, + Document, + HeadingLevel, + Packer, + Paragraph, + ShadingType, + Table, + TableCell, + TableRow, + WidthType, +} from "../build"; const doc = new Document(); @@ -37,10 +50,10 @@ const table2 = new Table({ new TableCell({ children: [new Paragraph("World")], margins: { - top: 1000, - bottom: 1000, - left: 1000, - right: 1000, + top: convertInchesToTwip(0.69), + bottom: convertInchesToTwip(0.69), + left: convertInchesToTwip(0.69), + right: convertInchesToTwip(0.69), }, columnSpan: 3, }), @@ -64,7 +77,7 @@ const table2 = new Table({ size: 100, type: WidthType.AUTO, }, - columnWidths: [1000, 1000, 1000], + columnWidths: [convertInchesToTwip(0.69), convertInchesToTwip(0.69), convertInchesToTwip(0.69)], }); const table3 = new Table({ @@ -119,14 +132,14 @@ const table3 = new Table({ }), ], width: { - size: 7000, + size: convertInchesToTwip(4.86), type: WidthType.DXA, }, margins: { - top: 400, - bottom: 400, - right: 400, - left: 400, + top: convertInchesToTwip(0.27), + bottom: convertInchesToTwip(0.27), + right: convertInchesToTwip(0.27), + left: convertInchesToTwip(0.27), }, }); @@ -355,9 +368,7 @@ const table8 = new Table({ ], }), new TableRow({ - children: [ - new TableCell({ children: [new Paragraph("4,1")] }), - ], + children: [new TableCell({ children: [new Paragraph("4,1")] })], }), ], width: { diff --git a/demo/57-add-parent-numbered-lists.ts b/demo/57-add-parent-numbered-lists.ts index 1e12ebc75c..2cf31a9e6b 100644 --- a/demo/57-add-parent-numbered-lists.ts +++ b/demo/57-add-parent-numbered-lists.ts @@ -1,7 +1,7 @@ // Numbered lists - Add parent number in sub number // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, Document, HeadingLevel, Packer, Paragraph } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, Packer, Paragraph } from "../build"; const doc = new Document({ numbering: { @@ -15,7 +15,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 720, hanging: 260 }, + indent: { left: convertInchesToTwip(0.5), hanging: 260 }, }, }, }, @@ -26,7 +26,7 @@ const doc = new Document({ alignment: AlignmentType.START, style: { paragraph: { - indent: { left: 1.25 * 720, hanging: 1.25 * 260 }, + indent: { left: 1.25 * convertInchesToTwip(0.5), hanging: 1.25 * 260 }, }, run: { bold: true, diff --git a/docs/_sidebar.md b/docs/_sidebar.md index bcdb03c55f..2538e975c7 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -28,5 +28,8 @@ * Exporting * [Packers](usage/packers.md) +* Utility + + * [Convenience functions](usage/convenience-functions.md) * [Contribution Guidelines](contribution-guidelines.md) diff --git a/docs/usage/convenience-functions.md b/docs/usage/convenience-functions.md new file mode 100644 index 0000000000..76236ca6c4 --- /dev/null +++ b/docs/usage/convenience-functions.md @@ -0,0 +1,22 @@ +# Convenience functions + +OOXML and this library mainly uses a unit called twentieths of a point or `twip` for short. a twip is a typographical measurement, defined as 1/20 of a typographical point. One twip is 1/1440 inch, or 17.64 μm. This unit is not intuitive for many users, so some functions were created to help + +More info here: https://en.wikipedia.org/wiki/Twip + +## Convert Inches to Twip + +```ts +import { convertInchesToTwip } from "docx"; + +const twip = convertInchesToTwip(1); // returns 1440 +const twip = convertInchesToTwip(0.5); // returns 720 +``` + +## Convert Millimeters to Twip + +```ts +import { convertMillimetersToTwip } from "docx"; + +const twip = convertMillimetersToTwip(50); // returns 2834 +``` diff --git a/src/convenience-functions.spec.ts b/src/convenience-functions.spec.ts new file mode 100644 index 0000000000..3333fdd2d0 --- /dev/null +++ b/src/convenience-functions.spec.ts @@ -0,0 +1,18 @@ +import { expect } from "chai"; +import { convertInchesToTwip, convertMillimetersToTwip } from "./convenience-functions"; + +describe("Utility", () => { + describe("#convertMillimetersToTwip", () => { + it("should call the underlying header's addChildElement for Paragraph", () => { + expect(convertMillimetersToTwip(1000)).to.equal(56692); + }); + }); + + describe("#convertInchesToTwip", () => { + it("should call the underlying header's addChildElement", () => { + expect(convertInchesToTwip(1)).to.equal(1440); + expect(convertInchesToTwip(0.5)).to.equal(720); + expect(convertInchesToTwip(0.25)).to.equal(360); + }); + }); +}); diff --git a/src/convenience-functions.ts b/src/convenience-functions.ts new file mode 100644 index 0000000000..6fe110b72b --- /dev/null +++ b/src/convenience-functions.ts @@ -0,0 +1,8 @@ +// Twip - twentieths of a point +export const convertMillimetersToTwip = (millimeters: number): number => { + return Math.floor((millimeters / 25.4) * 72 * 20); +}; + +export const convertInchesToTwip = (inches: number): number => { + return Math.floor(inches * 72 * 20); +}; diff --git a/src/file/document/body/section-properties/section-properties.spec.ts b/src/file/document/body/section-properties/section-properties.spec.ts index 70fc567b83..8a55699eb5 100644 --- a/src/file/document/body/section-properties/section-properties.spec.ts +++ b/src/file/document/body/section-properties/section-properties.spec.ts @@ -1,5 +1,6 @@ import { expect } from "chai"; +import { convertInchesToTwip } from "convenience-functions"; import { Formatter } from "export/formatter"; import { FooterWrapper } from "file/footer-wrapper"; import { HeaderWrapper } from "file/header-wrapper"; @@ -18,10 +19,10 @@ describe("SectionProperties", () => { const properties = new SectionProperties({ width: 11906, height: 16838, - top: 1440, - right: 1440, - bottom: 1440, - left: 1440, + top: convertInchesToTwip(1), + right: convertInchesToTwip(1), + bottom: convertInchesToTwip(1), + left: convertInchesToTwip(1), header: 708, footer: 708, gutter: 0, @@ -30,7 +31,7 @@ describe("SectionProperties", () => { space: 708, count: 1, }, - linePitch: 360, + linePitch: convertInchesToTwip(0.25), headers: { default: new HeaderWrapper(media, 100), }, diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index 37e09e4498..d497bb9131 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -1,4 +1,5 @@ // http://officeopenxml.com/WPsection.php +import { convertInchesToTwip } from "convenience-functions"; import { FooterWrapper } from "file/footer-wrapper"; import { HeaderWrapper } from "file/header-wrapper"; import { XmlComponent } from "file/xml-components"; @@ -64,10 +65,10 @@ export class SectionProperties extends XmlComponent { const { width = 11906, height = 16838, - top = 1440, - right = 1440, - bottom = 1440, - left = 1440, + top = convertInchesToTwip(1), + right = convertInchesToTwip(1), + bottom = convertInchesToTwip(1), + left = convertInchesToTwip(1), header = 708, footer = 708, gutter = 0, diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index a02caf6bef..99c5b4ea93 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -1,4 +1,5 @@ // http://officeopenxml.com/WPnumbering.php +import { convertInchesToTwip } from "convenience-functions"; import { AlignmentType } from "file/paragraph"; import { IXmlableObject, XmlComponent } from "file/xml-components"; @@ -55,7 +56,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 720, hanging: 360 }, + indent: { left: convertInchesToTwip(0.5), hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -66,7 +67,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 1440, hanging: 360 }, + indent: { left: convertInchesToTwip(1), hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -77,7 +78,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 2160, hanging: 360 }, + indent: { left: 2160, hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -88,7 +89,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 2880, hanging: 360 }, + indent: { left: 2880, hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -99,7 +100,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 3600, hanging: 360 }, + indent: { left: 3600, hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -110,7 +111,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 4320, hanging: 360 }, + indent: { left: 4320, hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -121,7 +122,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 5040, hanging: 360 }, + indent: { left: 5040, hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -132,7 +133,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 5760, hanging: 360 }, + indent: { left: 5760, hanging: convertInchesToTwip(0.25) }, }, }, }, @@ -143,7 +144,7 @@ export class Numbering extends XmlComponent { alignment: AlignmentType.LEFT, style: { paragraph: { - indent: { left: 6480, hanging: 360 }, + indent: { left: 6480, hanging: convertInchesToTwip(0.25) }, }, }, }, diff --git a/src/index.ts b/src/index.ts index 1e35c87d30..a319e4dcfe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,3 +4,4 @@ export { File as Document } from "./file"; export * from "./file"; export * from "./export"; export * from "./import-dotx"; +export * from "./convenience-functions"; From 38c8220e9e4ee86df86f24c5e74e989352756891 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 24 Dec 2020 04:26:45 +0000 Subject: [PATCH 220/260] Use LevelFormat string enum rather than strings --- demo/2-declaritive-styles.ts | 14 +- demo/29-numbered-lists.ts | 155 +++++++++++++++++- demo/3-numbering-and-bullet-points.ts | 10 +- demo/57-add-parent-numbered-lists.ts | 6 +- docs/usage/bullet-points.md | 2 +- src/file/numbering/abstract-numbering.spec.ts | 72 ++++---- src/file/numbering/level.ts | 20 ++- src/file/numbering/numbering.ts | 20 +-- 8 files changed, 238 insertions(+), 61 deletions(-) diff --git a/demo/2-declaritive-styles.ts b/demo/2-declaritive-styles.ts index a7b7c4953b..deada8198a 100644 --- a/demo/2-declaritive-styles.ts +++ b/demo/2-declaritive-styles.ts @@ -1,7 +1,17 @@ // Example on how to customise the look at feel using Styles // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, Packer, Paragraph, TextRun, UnderlineType } from "../build"; +import { + AlignmentType, + convertInchesToTwip, + Document, + HeadingLevel, + LevelFormat, + Packer, + Paragraph, + TextRun, + UnderlineType, +} from "../build"; const doc = new Document({ creator: "Clippy", @@ -81,7 +91,7 @@ const doc = new Document({ levels: [ { level: 0, - format: "lowerLetter", + format: LevelFormat.LOWER_LETTER, text: "%1)", alignment: AlignmentType.LEFT, }, diff --git a/demo/29-numbered-lists.ts b/demo/29-numbered-lists.ts index 5337db4438..77f50381d1 100644 --- a/demo/29-numbered-lists.ts +++ b/demo/29-numbered-lists.ts @@ -1,7 +1,7 @@ // Numbered lists // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, convertInchesToTwip, Document, Packer, Paragraph } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, LevelFormat, Packer, Paragraph } from "../build"; const doc = new Document({ numbering: { @@ -10,7 +10,7 @@ const doc = new Document({ levels: [ { level: 0, - format: "upperRoman", + format: LevelFormat.UPPER_ROMAN, text: "%1", alignment: AlignmentType.START, style: { @@ -26,7 +26,7 @@ const doc = new Document({ levels: [ { level: 0, - format: "decimal", + format: LevelFormat.DECIMAL, text: "%1", alignment: AlignmentType.START, style: { @@ -38,6 +38,22 @@ const doc = new Document({ ], reference: "my-number-numbering-reference", }, + { + levels: [ + { + level: 0, + format: LevelFormat.DECIMAL_ZERO, + text: "[%1]", + alignment: AlignmentType.START, + style: { + paragraph: { + indent: { left: convertInchesToTwip(0.5), hanging: convertInchesToTwip(0.18) }, + }, + }, + }, + ], + reference: "padded-numbering-reference", + }, ], }, }); @@ -109,6 +125,139 @@ doc.addSection({ level: 0, }, }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), + new Paragraph({ + text: "test", + numbering: { + reference: "padded-numbering-reference", + level: 0, + }, + }), ], }); diff --git a/demo/3-numbering-and-bullet-points.ts b/demo/3-numbering-and-bullet-points.ts index 6a4155452d..375c1439a7 100644 --- a/demo/3-numbering-and-bullet-points.ts +++ b/demo/3-numbering-and-bullet-points.ts @@ -1,7 +1,7 @@ // Numbering and bullet points example // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, convertInchesToTwip, Document, Packer, Paragraph } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, LevelFormat, Packer, Paragraph } from "../build"; const doc = new Document({ numbering: { @@ -11,7 +11,7 @@ const doc = new Document({ levels: [ { level: 0, - format: "upperRoman", + format: LevelFormat.UPPER_ROMAN, text: "%1", alignment: AlignmentType.START, style: { @@ -22,7 +22,7 @@ const doc = new Document({ }, { level: 1, - format: "decimal", + format: LevelFormat.DECIMAL, text: "%2.", alignment: AlignmentType.START, style: { @@ -33,7 +33,7 @@ const doc = new Document({ }, { level: 2, - format: "lowerLetter", + format: LevelFormat.LOWER_LETTER, text: "%3)", alignment: AlignmentType.START, style: { @@ -44,7 +44,7 @@ const doc = new Document({ }, { level: 3, - format: "upperLetter", + format: LevelFormat.UPPER_LETTER, text: "%4)", alignment: AlignmentType.START, style: { diff --git a/demo/57-add-parent-numbered-lists.ts b/demo/57-add-parent-numbered-lists.ts index 2cf31a9e6b..e35cd06a27 100644 --- a/demo/57-add-parent-numbered-lists.ts +++ b/demo/57-add-parent-numbered-lists.ts @@ -1,7 +1,7 @@ // Numbered lists - Add parent number in sub number // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, Packer, Paragraph } from "../build"; +import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, LevelFormat, Packer, Paragraph } from "../build"; const doc = new Document({ numbering: { @@ -10,7 +10,7 @@ const doc = new Document({ levels: [ { level: 0, - format: "decimal", + format: LevelFormat.DECIMAL, text: "%1", alignment: AlignmentType.START, style: { @@ -21,7 +21,7 @@ const doc = new Document({ }, { level: 1, - format: "decimal", + format: LevelFormat.DECIMAL, text: "%1.%2", alignment: AlignmentType.START, style: { diff --git a/docs/usage/bullet-points.md b/docs/usage/bullet-points.md index 045ec61d1a..7ffcf6f241 100644 --- a/docs/usage/bullet-points.md +++ b/docs/usage/bullet-points.md @@ -9,7 +9,7 @@ const text = new TextRun("Bullet points"); const paragraph = new Paragraph({ text: "Bullet points", bullet: { - level: 0, // How deep you want the bullet to me + level: 0, //How deep you want the bullet to be }, }); ``` diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index ef1df0de4c..df5416f453 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -7,7 +7,7 @@ import { AlignmentType, EmphasisMarkType, TabStopPosition } from "../paragraph"; import { UnderlineType } from "../paragraph/run/underline"; import { ShadingType } from "../table"; import { AbstractNumbering } from "./abstract-numbering"; -import { LevelSuffix } from "./level"; +import { LevelFormat, LevelSuffix } from "./level"; describe("AbstractNumbering", () => { it("stores its ID at its .id property", () => { @@ -20,7 +20,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 3, - format: "lowerLetter", + format: LevelFormat.LOWER_LETTER, text: "%1)", alignment: AlignmentType.END, }, @@ -29,7 +29,7 @@ describe("AbstractNumbering", () => { expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ _attr: { "w:ilvl": 3, "w15:tentative": 1 } }); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:start": { _attr: { "w:val": 1 } } }); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:lvlJc": { _attr: { "w:val": "end" } } }); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:numFmt": { _attr: { "w:val": "lowerLetter" } } }); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:numFmt": { _attr: { "w:val": LevelFormat.LOWER_LETTER } } }); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:lvlText": { _attr: { "w:val": "%1)" } } }); }); @@ -37,7 +37,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 3, - format: "lowerLetter", + format: LevelFormat.LOWER_LETTER, text: "%1)", }, ]); @@ -45,7 +45,7 @@ describe("AbstractNumbering", () => { expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ _attr: { "w:ilvl": 3, "w15:tentative": 1 } }); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:start": { _attr: { "w:val": 1 } } }); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:lvlJc": { _attr: { "w:val": "start" } } }); - expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:numFmt": { _attr: { "w:val": "lowerLetter" } } }); + expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:numFmt": { _attr: { "w:val": LevelFormat.LOWER_LETTER } } }); expect(tree["w:abstractNum"][2]["w:lvl"]).to.include({ "w:lvlText": { _attr: { "w:val": "%1)" } } }); }); @@ -53,7 +53,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 3, - format: "lowerLetter", + format: LevelFormat.LOWER_LETTER, text: "%1)", alignment: AlignmentType.END, suffix: LevelSuffix.SPACE, @@ -68,7 +68,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -87,7 +87,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -106,7 +106,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -125,7 +125,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -144,7 +144,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -163,7 +163,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -182,7 +182,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -216,7 +216,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -239,7 +239,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -262,7 +262,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -281,7 +281,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { paragraph: { @@ -324,7 +324,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { size, sizeComplexScript }, @@ -340,7 +340,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -359,7 +359,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -378,7 +378,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -398,7 +398,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -417,7 +417,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -436,7 +436,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -455,7 +455,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -485,7 +485,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -533,7 +533,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { bold, boldComplexScript }, @@ -566,7 +566,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { italics, italicsComplexScript }, @@ -604,7 +604,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { highlight, highlightComplexScript }, @@ -682,7 +682,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { shadow, shading, shadingComplexScript }, @@ -699,7 +699,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -718,7 +718,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -739,7 +739,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -763,7 +763,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -782,7 +782,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { @@ -804,7 +804,7 @@ describe("AbstractNumbering", () => { const abstractNumbering = new AbstractNumbering(1, [ { level: 0, - format: "lowerRoman", + format: LevelFormat.LOWER_ROMAN, text: "%0.", style: { run: { diff --git a/src/file/numbering/level.ts b/src/file/numbering/level.ts index 6a68f0712f..22ff07acf3 100644 --- a/src/file/numbering/level.ts +++ b/src/file/numbering/level.ts @@ -1,8 +1,26 @@ +// http://officeopenxml.com/WPnumbering-numFmt.php import { Attributes, XmlAttributeComponent, XmlComponent } from "file/xml-components"; import { AlignmentType } from "../paragraph/formatting"; import { IParagraphStylePropertiesOptions, ParagraphProperties } from "../paragraph/properties"; import { IRunStylePropertiesOptions, RunProperties } from "../paragraph/run/properties"; +export enum LevelFormat { + BULLET = "bullet", + CARDINAL_TEXT = "cardinalText", + CHICAGO = "chicago", + DECIMAL = "decimal", + DECIMAL_ENCLOSED_CIRCLE = "decimalEnclosedCircle", + DECIMAL_ENCLOSED_FULLSTOP = "decimalEnclosedFullstop", + DECIMAL_ENCLOSED_PARENTHESES = "decimalEnclosedParen", + DECIMAL_ZERO = "decimalZero", + LOWER_LETTER = "lowerLetter", + LOWER_ROMAN = "lowerRoman", + NONE = "none", + ORDINAL_TEXT = "ordinalText", + UPPER_LETTER = "upperLetter", + UPPER_ROMAN = "upperRoman", +} + interface ILevelAttributesProperties { readonly ilvl?: number; readonly tentative?: number; @@ -67,7 +85,7 @@ export enum LevelSuffix { export interface ILevelsOptions { readonly level: number; - readonly format?: string; + readonly format?: LevelFormat; readonly text?: string; readonly alignment?: AlignmentType; readonly start?: number; diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index 99c5b4ea93..901f13f4bb 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -5,7 +5,7 @@ import { IXmlableObject, XmlComponent } from "file/xml-components"; import { DocumentAttributes } from "../document/document-attributes"; import { AbstractNumbering } from "./abstract-numbering"; -import { ILevelsOptions } from "./level"; +import { ILevelsOptions, LevelFormat } from "./level"; import { ConcreteNumbering } from "./num"; export interface INumberingOptions { @@ -51,7 +51,7 @@ export class Numbering extends XmlComponent { const abstractNumbering = this.createAbstractNumbering([ { level: 0, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CF", alignment: AlignmentType.LEFT, style: { @@ -62,7 +62,7 @@ export class Numbering extends XmlComponent { }, { level: 1, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CB", alignment: AlignmentType.LEFT, style: { @@ -73,7 +73,7 @@ export class Numbering extends XmlComponent { }, { level: 2, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25A0", alignment: AlignmentType.LEFT, style: { @@ -84,7 +84,7 @@ export class Numbering extends XmlComponent { }, { level: 3, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CF", alignment: AlignmentType.LEFT, style: { @@ -95,7 +95,7 @@ export class Numbering extends XmlComponent { }, { level: 4, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CB", alignment: AlignmentType.LEFT, style: { @@ -106,7 +106,7 @@ export class Numbering extends XmlComponent { }, { level: 5, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25A0", alignment: AlignmentType.LEFT, style: { @@ -117,7 +117,7 @@ export class Numbering extends XmlComponent { }, { level: 6, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CF", alignment: AlignmentType.LEFT, style: { @@ -128,7 +128,7 @@ export class Numbering extends XmlComponent { }, { level: 7, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CF", alignment: AlignmentType.LEFT, style: { @@ -139,7 +139,7 @@ export class Numbering extends XmlComponent { }, { level: 8, - format: "bullet", + format: LevelFormat.BULLET, text: "\u25CF", alignment: AlignmentType.LEFT, style: { From d74db948ba61189ac9087846b0145fa830f50d41 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 25 Dec 2020 00:07:57 +0000 Subject: [PATCH 221/260] Add zIndex property to floating --- demo/5-images.ts | 2 ++ src/file/drawing/anchor/anchor.ts | 28 ++++++++----------- .../drawing/floating/floating-position.ts | 2 ++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/demo/5-images.ts b/demo/5-images.ts index 260fd25f15..3c752d9a58 100644 --- a/demo/5-images.ts +++ b/demo/5-images.ts @@ -22,6 +22,7 @@ const image4 = Media.addImage(doc, fs.readFileSync("./demo/images/parrots.bmp")) const image5 = Media.addImage(doc, fs.readFileSync("./demo/images/pizza.gif")); const image6 = Media.addImage(doc, fs.readFileSync("./demo/images/pizza.gif"), 200, 200, { floating: { + zIndex: 10, horizontalPosition: { offset: 1014400, }, @@ -33,6 +34,7 @@ const image6 = Media.addImage(doc, fs.readFileSync("./demo/images/pizza.gif"), 2 const image7 = Media.addImage(doc, fs.readFileSync("./demo/images/cat.jpg"), 200, 200, { floating: { + zIndex: 5, horizontalPosition: { relative: HorizontalPositionRelativeFrom.PAGE, align: HorizontalPositionAlign.RIGHT, diff --git a/src/file/drawing/anchor/anchor.ts b/src/file/drawing/anchor/anchor.ts index d52c349ebb..25890aae9c 100644 --- a/src/file/drawing/anchor/anchor.ts +++ b/src/file/drawing/anchor/anchor.ts @@ -11,42 +11,38 @@ import { Extent } from "./../extent/extent"; import { GraphicFrameProperties } from "./../graphic-frame/graphic-frame-properties"; import { AnchorAttributes } from "./anchor-attributes"; -const defaultOptions: IFloating = { - allowOverlap: true, - behindDocument: false, - lockAnchor: false, - layoutInCell: true, - verticalPosition: {}, - horizontalPosition: {}, -}; - export class Anchor extends XmlComponent { constructor(mediaData: IMediaData, dimensions: IMediaDataDimensions, drawingOptions: IDrawingOptions) { super("wp:anchor"); - const floating = { + const floating: IFloating = { margins: { top: 0, bottom: 0, left: 0, right: 0, }, - ...defaultOptions, + allowOverlap: true, + behindDocument: false, + lockAnchor: false, + layoutInCell: true, + verticalPosition: {}, + horizontalPosition: {}, ...drawingOptions.floating, }; this.root.push( new AnchorAttributes({ - distT: floating.margins.top || 0, - distB: floating.margins.bottom || 0, - distL: floating.margins.left || 0, - distR: floating.margins.right || 0, + distT: floating.margins ? floating.margins.top || 0 : 0, + distB: floating.margins ? floating.margins.bottom || 0 : 0, + distL: floating.margins ? floating.margins.left || 0 : 0, + distR: floating.margins ? floating.margins.right || 0 : 0, simplePos: "0", // note: word doesn't fully support - so we use 0 allowOverlap: floating.allowOverlap === true ? "1" : "0", behindDoc: floating.behindDocument === true ? "1" : "0", locked: floating.lockAnchor === true ? "1" : "0", layoutInCell: floating.layoutInCell === true ? "1" : "0", - relativeHeight: dimensions.emus.y, + relativeHeight: floating.zIndex ? floating.zIndex : dimensions.emus.y, }), ); diff --git a/src/file/drawing/floating/floating-position.ts b/src/file/drawing/floating/floating-position.ts index 9191ef1e1b..6c5ad7f332 100644 --- a/src/file/drawing/floating/floating-position.ts +++ b/src/file/drawing/floating/floating-position.ts @@ -1,4 +1,5 @@ // http://officeopenxml.com/drwPicFloating-position.php +// http://officeopenxml.com/drwPicFloating.php import { ITextWrapping } from "../text-wrap"; export enum HorizontalPositionRelativeFrom { @@ -67,4 +68,5 @@ export interface IFloating { readonly layoutInCell?: boolean; readonly margins?: IMargins; readonly wrap?: ITextWrapping; + readonly zIndex?: number; } From d894bfa1672ea055755376947076043122ed8a99 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 25 Dec 2020 00:29:27 +0000 Subject: [PATCH 222/260] Add test --- src/file/drawing/anchor/anchor.spec.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/file/drawing/anchor/anchor.spec.ts b/src/file/drawing/anchor/anchor.spec.ts index 6b86a31346..99fe0fb7b9 100644 --- a/src/file/drawing/anchor/anchor.spec.ts +++ b/src/file/drawing/anchor/anchor.spec.ts @@ -218,5 +218,25 @@ describe("Anchor", () => { const textWrap = newJson.root[6]; assert.equal(textWrap.rootKey, "wp:wrapTopAndBottom"); }); + + it("should create a Drawing with a certain z-index", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + zIndex: 120, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + + assert.include(anchorAttributes, { + relativeHeight: 120, + }); + }); }); }); From b4cd3a319c2e7aab21f20d40904c5a343337e92b Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 25 Dec 2020 00:30:58 +0000 Subject: [PATCH 223/260] Add documentation --- docs/usage/images.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage/images.md b/docs/usage/images.md index 4893348cc0..94e75e75a7 100644 --- a/docs/usage/images.md +++ b/docs/usage/images.md @@ -125,6 +125,7 @@ Full options you can pass into `floating` are: | lockAnchor | `boolean` | Optional | | behindDocument | `boolean` | Optional | | layoutInCell | `boolean` | Optional | +| zIndex | `number` | Optional | `HorizontalPositionOptions` are: From 5ec18d6e01523eb78ecfe7f198a00eef0acc33c2 Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 25 Dec 2020 02:15:40 +0000 Subject: [PATCH 224/260] Add tests and simplify --- src/file/drawing/anchor/anchor.spec.ts | 125 +++++++++++++++++++++++++ src/file/drawing/anchor/anchor.ts | 6 -- 2 files changed, 125 insertions(+), 6 deletions(-) diff --git a/src/file/drawing/anchor/anchor.spec.ts b/src/file/drawing/anchor/anchor.spec.ts index 99fe0fb7b9..10d4b08d13 100644 --- a/src/file/drawing/anchor/anchor.spec.ts +++ b/src/file/drawing/anchor/anchor.spec.ts @@ -219,6 +219,131 @@ describe("Anchor", () => { assert.equal(textWrap.rootKey, "wp:wrapTopAndBottom"); }); + it("should create a Drawing with a margin", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + margins: { + top: 10, + left: 10, + bottom: 10, + right: 10, + }, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + assert.include(anchorAttributes, { + distT: 10, + distB: 10, + distL: 10, + distR: 10, + }); + }); + + it("should create a Drawing with a default margin", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + margins: {}, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + assert.include(anchorAttributes, { + distT: 0, + distB: 0, + distL: 0, + distR: 0, + }); + }); + + it("should create a Drawing with allowOverlap being false", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + allowOverlap: false, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + assert.include(anchorAttributes, { + allowOverlap: "0", + }); + }); + + it("should create a Drawing with behindDocument being true", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + behindDocument: true, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + assert.include(anchorAttributes, { + behindDoc: "1", + }); + }); + + it("should create a Drawing with locked being true", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + lockAnchor: true, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + assert.include(anchorAttributes, { + locked: "1", + }); + }); + + it("should create a Drawing with locked being false", () => { + anchor = createAnchor({ + floating: { + verticalPosition: { + offset: 0, + }, + horizontalPosition: { + offset: 0, + }, + layoutInCell: false, + }, + }); + const newJson = Utility.jsonify(anchor); + const anchorAttributes = newJson.root[0].root; + assert.include(anchorAttributes, { + layoutInCell: "0", + }); + }); + it("should create a Drawing with a certain z-index", () => { anchor = createAnchor({ floating: { diff --git a/src/file/drawing/anchor/anchor.ts b/src/file/drawing/anchor/anchor.ts index 25890aae9c..7eb4487a89 100644 --- a/src/file/drawing/anchor/anchor.ts +++ b/src/file/drawing/anchor/anchor.ts @@ -16,12 +16,6 @@ export class Anchor extends XmlComponent { super("wp:anchor"); const floating: IFloating = { - margins: { - top: 0, - bottom: 0, - left: 0, - right: 0, - }, allowOverlap: true, behindDocument: false, lockAnchor: false, From e355fd3d2ec554f6b0a5a4ad3a246c17cdcb32bc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 Jan 2021 08:20:34 +0000 Subject: [PATCH 225/260] build(deps-dev): bump @types/webpack from 4.41.25 to 4.41.26 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.41.25 to 4.41.26. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32414b26c7..07a4a9af15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -670,9 +670,9 @@ } }, "@types/webpack": { - "version": "4.41.25", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz", - "integrity": "sha512-cr6kZ+4m9lp86ytQc1jPOJXgINQyz3kLLunZ57jznW+WIAL0JqZbGubQk4GlD42MuQL5JGOABrxdpqqWeovlVQ==", + "version": "4.41.26", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.26.tgz", + "integrity": "sha512-7ZyTfxjCRwexh+EJFwRUM+CDB2XvgHl4vfuqf1ZKrgGvcS5BrNvPQqJh3tsZ0P6h6Aa1qClVHaJZszLPzpqHeA==", "dev": true, "requires": { "@types/anymatch": "*", @@ -684,9 +684,9 @@ } }, "@types/webpack-sources": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.0.0.tgz", - "integrity": "sha512-a5kPx98CNFRKQ+wqawroFunvFqv7GHm/3KOI52NY9xWADgc8smu4R6prt4EU/M4QfVjvgBkMqU4fBhw3QfMVkg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.0.tgz", + "integrity": "sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg==", "dev": true, "requires": { "@types/node": "*", From 5de2d8c7fb291b8aad1bc9aa18544d514762d578 Mon Sep 17 00:00:00 2001 From: arran Date: Fri, 22 Jan 2021 16:45:39 +1100 Subject: [PATCH 226/260] Minor change --- src/import-dotx/import-dotx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/import-dotx/import-dotx.ts b/src/import-dotx/import-dotx.ts index d8d5d1190c..6c509c6383 100644 --- a/src/import-dotx/import-dotx.ts +++ b/src/import-dotx/import-dotx.ts @@ -46,7 +46,7 @@ export interface IDocumentTemplate { } export class ImportDotx { - public async extract(data: Buffer): Promise { + public async extract(data: string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream): Promise { const zipContent = await JSZip.loadAsync(data); const documentContent = await zipContent.files["word/document.xml"].async("text"); From e93b8032d8b5f8def31e2153dc0e6d125084a70c Mon Sep 17 00:00:00 2001 From: arran Date: Fri, 22 Jan 2021 16:48:41 +1100 Subject: [PATCH 227/260] Buffer is required as it was originally there too --- src/import-dotx/import-dotx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/import-dotx/import-dotx.ts b/src/import-dotx/import-dotx.ts index 6c509c6383..80cd0666dd 100644 --- a/src/import-dotx/import-dotx.ts +++ b/src/import-dotx/import-dotx.ts @@ -46,7 +46,7 @@ export interface IDocumentTemplate { } export class ImportDotx { - public async extract(data: string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream): Promise { + public async extract(data: Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream): Promise { const zipContent = await JSZip.loadAsync(data); const documentContent = await zipContent.files["word/document.xml"].async("text"); From f2480673ec150e13c6d2dc4976c8e813f52f50a4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 08:20:27 +0000 Subject: [PATCH 228/260] build(deps-dev): bump sinon from 9.2.2 to 9.2.4 Bumps [sinon](https://github.com/sinonjs/sinon) from 9.2.2 to 9.2.4. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v9.2.2...v9.2.4) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32414b26c7..04ba9d02b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -462,9 +462,9 @@ "dev": true }, "@sinonjs/commons": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", - "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", + "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -487,20 +487,10 @@ "@sinonjs/commons": "^1.7.0" } }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, "@sinonjs/samsam": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", - "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -7358,15 +7348,14 @@ "dev": true }, "sinon": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.2.tgz", - "integrity": "sha512-9Owi+RisvCZpB0bdOVFfL314I6I4YoRlz6Isi4+fr8q8YQsDPoCe5UnmNtKHRThX3negz2bXHWIuiPa42vM8EQ==", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.1", "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.3.0", + "@sinonjs/samsam": "^5.3.1", "diff": "^4.0.2", "nise": "^4.0.4", "supports-color": "^7.1.0" From 3ccf4bdfe32deb23f2691497bc17aec33e5437b6 Mon Sep 17 00:00:00 2001 From: arran Date: Tue, 26 Jan 2021 15:09:12 +1100 Subject: [PATCH 229/260] Ran npm run style.fix added "line_ending" configuration to .editorconfig to match the results --- .editorconfig | 1 + src/import-dotx/import-dotx.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 9b7352176a..46c1eafce3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,7 @@ indent_style = space indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true +end_of_line = lf [*.md] max_line_length = off diff --git a/src/import-dotx/import-dotx.ts b/src/import-dotx/import-dotx.ts index 80cd0666dd..4c77ea75be 100644 --- a/src/import-dotx/import-dotx.ts +++ b/src/import-dotx/import-dotx.ts @@ -46,7 +46,9 @@ export interface IDocumentTemplate { } export class ImportDotx { - public async extract(data: Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream): Promise { + public async extract( + data: Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream, + ): Promise { const zipContent = await JSZip.loadAsync(data); const documentContent = await zipContent.files["word/document.xml"].async("text"); From d6f363b275f8d08c34263e4e732122099e7c9c75 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 31 Jan 2021 04:54:26 +0000 Subject: [PATCH 230/260] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be21f2a5f5..562c48b57c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.4.1", + "version": "5.5.0", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": { From 4dafa62e171ef76625d16f9b2fa017e6d47c385a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 10 Feb 2021 07:52:30 +0000 Subject: [PATCH 231/260] build(deps): bump jszip from 3.5.0 to 3.6.0 Bumps [jszip](https://github.com/Stuk/jszip) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/Stuk/jszip/releases) - [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md) - [Commits](https://github.com/Stuk/jszip/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a18508ba4c..0e600045af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "5.4.1", + "version": "5.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4949,9 +4949,9 @@ } }, "jszip": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", - "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.6.0.tgz", + "integrity": "sha512-jgnQoG9LKnWO3mnVNBnfhkh0QknICd1FGSrXcgrl67zioyJ4wgx25o9ZqwNtrROSflGBCGYnJfjrIyRIby1OoQ==", "requires": { "lie": "~3.3.0", "pako": "~1.0.2", From 48c1559a775f996580d02a059b7b4cf882068208 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 18 Feb 2021 07:58:12 +0000 Subject: [PATCH 232/260] build(deps-dev): bump @types/mocha from 8.2.0 to 8.2.1 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e600045af..51c6df7417 100644 --- a/package-lock.json +++ b/package-lock.json @@ -566,9 +566,9 @@ "dev": true }, "@types/mocha": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", - "integrity": "sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-NysN+bNqj6E0Hv4CTGWSlPzMW6vTKjDpOteycDkV4IWBsO+PU48JonrPzV9ODjiI2XrjmA05KInLgF5ivZ/YGQ==", "dev": true }, "@types/node": { From 858a994d134d1bd81c4881d5fc48a0b9977a0d2f Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 22 Feb 2021 21:04:02 +0000 Subject: [PATCH 233/260] #339 Add Section Type --- demo/58-section-types.ts | 93 +++++++++++++++++++ docs/usage/sections.md | 27 ++++++ .../document/body/section-properties/index.ts | 1 + .../section-properties.spec.ts | 13 +++ .../section-properties/section-properties.ts | 8 ++ .../body/section-properties/type/index.ts | 2 + .../type/section-type-attributes.ts | 17 ++++ .../type/section-type.spec.ts | 35 +++++++ .../section-properties/type/section-type.ts | 10 ++ 9 files changed, 206 insertions(+) create mode 100644 demo/58-section-types.ts create mode 100644 src/file/document/body/section-properties/type/index.ts create mode 100644 src/file/document/body/section-properties/type/section-type-attributes.ts create mode 100644 src/file/document/body/section-properties/type/section-type.spec.ts create mode 100644 src/file/document/body/section-properties/type/section-type.ts diff --git a/demo/58-section-types.ts b/demo/58-section-types.ts new file mode 100644 index 0000000000..6c16b44600 --- /dev/null +++ b/demo/58-section-types.ts @@ -0,0 +1,93 @@ +// Usage of different Section Types +// Import from 'docx' rather than '../build' if you install from npm +import * as fs from "fs"; +import { Document, Packer, Paragraph, TextRun, SectionType } from "../build"; + +const doc = new Document(); + +doc.addSection({ + properties: {}, + children: [ + new Paragraph({ + children: [ + new TextRun("Hello World"), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + ], +}); + +doc.addSection({ + properties: { + type: SectionType.CONTINUOUS, + }, + children: [ + new Paragraph({ + children: [ + new TextRun("Hello World"), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + ], +}); + +doc.addSection({ + properties: { + type: SectionType.ODD_PAGE, + }, + children: [ + new Paragraph({ + children: [ + new TextRun("Hello World"), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + ], +}); + +doc.addSection({ + properties: { + type: SectionType.EVEN_PAGE, + }, + children: [ + new Paragraph({ + children: [ + new TextRun("Hello World"), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + ], +}); + +doc.addSection({ + properties: { + type: SectionType.NEXT_PAGE, + }, + children: [ + new Paragraph({ + children: [ + new TextRun("Hello World"), + new TextRun({ + text: "Foo Bar", + bold: true, + }), + ], + }), + ], +}); + +Packer.toBuffer(doc).then((buffer) => { + fs.writeFileSync("My Document.docx", buffer); +}); diff --git a/docs/usage/sections.md b/docs/usage/sections.md index 5b6d4e9c74..daabb02294 100644 --- a/docs/usage/sections.md +++ b/docs/usage/sections.md @@ -19,3 +19,30 @@ doc.addSection({ ], }); ``` + +## Properties + +You can specify additional properties to the section, by providing a `properties` attribute. + +### Section Type + +Setting the section type determines how the contents of the section will be placed relative to the previous section. E.g., There are five different types: + +- `CONTINUOUS` +- `EVEN_PAGE` +- `NEXT_COLUMN` +- `NEXT_PAGE` +- `ODD_PAGE` + +```ts +doc.addSection({ + properties: { + type: SectionType.CONTINUOUS, + } + children: [ + new Paragraph({ + children: [new TextRun("Hello World")], + }), + ], +}); +``` diff --git a/src/file/document/body/section-properties/index.ts b/src/file/document/body/section-properties/index.ts index 47e56ec172..ee0820c640 100644 --- a/src/file/document/body/section-properties/index.ts +++ b/src/file/document/body/section-properties/index.ts @@ -6,3 +6,4 @@ export * from "./page-number"; export * from "./page-border"; export * from "./line-number"; export * from "./vertical-align"; +export * from "./type"; diff --git a/src/file/document/body/section-properties/section-properties.spec.ts b/src/file/document/body/section-properties/section-properties.spec.ts index 8a55699eb5..7fca1ae265 100644 --- a/src/file/document/body/section-properties/section-properties.spec.ts +++ b/src/file/document/body/section-properties/section-properties.spec.ts @@ -9,6 +9,7 @@ import { Media } from "file/media"; import { PageBorderOffsetFrom } from "./page-border"; import { PageNumberFormat } from "./page-number"; import { SectionProperties } from "./section-properties"; +import { SectionType } from "./type/section-type-attributes"; import { SectionVerticalAlignValue } from "./vertical-align"; describe("SectionProperties", () => { @@ -199,5 +200,17 @@ describe("SectionProperties", () => { const pgNumType = tree["w:sectPr"].find((item) => item["w:pgNumType"] !== undefined); expect(pgNumType).to.equal(undefined); }); + + it("should create section properties with section type", () => { + const properties = new SectionProperties({ + type: SectionType.CONTINUOUS, + }); + const tree = new Formatter().format(properties); + expect(Object.keys(tree)).to.deep.equal(["w:sectPr"]); + const type = tree["w:sectPr"].find((item) => item["w:type"] !== undefined); + expect(type).to.deep.equal({ + "w:type": { _attr: { "w:val": "continuous" } }, + }); + }); }); }); diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index d497bb9131..4b6df3252e 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -18,6 +18,8 @@ import { IPageMarginAttributes } from "./page-margin/page-margin-attributes"; import { IPageNumberTypeAttributes, PageNumberType } from "./page-number"; import { PageSize } from "./page-size/page-size"; import { IPageSizeAttributes, PageOrientation } from "./page-size/page-size-attributes"; +import { Type } from "./type/section-type"; +import { SectionType } from "./type/section-type-attributes"; import { TitlePage } from "./title-page/title-page"; import { ISectionVerticalAlignAttributes, SectionVerticalAlign } from "./vertical-align"; @@ -53,6 +55,7 @@ export type SectionPropertiesOptions = IPageSizeAttributes & readonly space?: number; readonly count?: number; }; + readonly type?: SectionType; }; // Need to decouple this from the attributes @@ -91,6 +94,7 @@ export class SectionProperties extends XmlComponent { pageBorderLeft, titlePage = false, verticalAlign, + type, } = options; this.options = options; @@ -129,6 +133,10 @@ export class SectionProperties extends XmlComponent { if (verticalAlign) { this.root.push(new SectionVerticalAlign(verticalAlign)); } + + if (type) { + this.root.push(new Type(type)); + } } private addHeaders(headers?: IHeaderFooterGroup): void { diff --git a/src/file/document/body/section-properties/type/index.ts b/src/file/document/body/section-properties/type/index.ts new file mode 100644 index 0000000000..fd7a8abd9c --- /dev/null +++ b/src/file/document/body/section-properties/type/index.ts @@ -0,0 +1,2 @@ +export * from "./section-type"; +export * from "./section-type-attributes"; diff --git a/src/file/document/body/section-properties/type/section-type-attributes.ts b/src/file/document/body/section-properties/type/section-type-attributes.ts new file mode 100644 index 0000000000..4ac8dd60b4 --- /dev/null +++ b/src/file/document/body/section-properties/type/section-type-attributes.ts @@ -0,0 +1,17 @@ +import { XmlAttributeComponent } from "file/xml-components"; + +export enum SectionType { + CONTINUOUS = "continuous", + EVEN_PAGE = "evenPage", + NEXT_COLUMN = "nextColumn", + NEXT_PAGE = "nextPage", + ODD_PAGE = "oddPage", +} + +export class SectionTypeAttributes extends XmlAttributeComponent<{ + readonly val: SectionType; +}> { + protected readonly xmlKeys = { + val: "w:val", + }; +} diff --git a/src/file/document/body/section-properties/type/section-type.spec.ts b/src/file/document/body/section-properties/type/section-type.spec.ts new file mode 100644 index 0000000000..7276825fab --- /dev/null +++ b/src/file/document/body/section-properties/type/section-type.spec.ts @@ -0,0 +1,35 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; +import { Type } from "./section-type"; +import { SectionType } from "./section-type-attributes"; + +describe("Type", () => { + it("should create with even page section type", () => { + const sectionType = new Type(SectionType.EVEN_PAGE); + + const tree = new Formatter().format(sectionType); + + expect(tree).to.deep.equal({ + "w:type": { + _attr: { + "w:val": "evenPage", + }, + }, + }); + }); + + it("should create with continuous section type", () => { + const sectionType = new Type(SectionType.CONTINUOUS); + + const tree = new Formatter().format(sectionType); + + expect(tree).to.deep.equal({ + "w:type": { + _attr: { + "w:val": "continuous", + }, + }, + }); + }); +}); diff --git a/src/file/document/body/section-properties/type/section-type.ts b/src/file/document/body/section-properties/type/section-type.ts new file mode 100644 index 0000000000..3a11f2e041 --- /dev/null +++ b/src/file/document/body/section-properties/type/section-type.ts @@ -0,0 +1,10 @@ +// http://officeopenxml.com/WPsection.php +import { XmlComponent } from "file/xml-components"; +import { SectionType, SectionTypeAttributes } from "./section-type-attributes"; + +export class Type extends XmlComponent { + constructor(value: SectionType) { + super("w:type"); + this.root.push(new SectionTypeAttributes({ val: value })); + } +} From bfd0f0c7bb3d225868e20851ab1f739f8b643d5d Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 22 Feb 2021 21:12:38 +0000 Subject: [PATCH 234/260] Fix linting --- src/file/document/body/section-properties/section-properties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index 4b6df3252e..133051cb6e 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -18,9 +18,9 @@ import { IPageMarginAttributes } from "./page-margin/page-margin-attributes"; import { IPageNumberTypeAttributes, PageNumberType } from "./page-number"; import { PageSize } from "./page-size/page-size"; import { IPageSizeAttributes, PageOrientation } from "./page-size/page-size-attributes"; +import { TitlePage } from "./title-page/title-page"; import { Type } from "./type/section-type"; import { SectionType } from "./type/section-type-attributes"; -import { TitlePage } from "./title-page/title-page"; import { ISectionVerticalAlignAttributes, SectionVerticalAlign } from "./vertical-align"; export interface IHeaderFooterGroup { From 32ceaa415eb6f9830e478b4a6355d3eb7b3f3553 Mon Sep 17 00:00:00 2001 From: Khalil Mansouri Date: Wed, 24 Feb 2021 13:30:40 +0100 Subject: [PATCH 235/260] Fix documentation typo --- docs/usage/bullet-points.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/usage/bullet-points.md b/docs/usage/bullet-points.md index 7ffcf6f241..159241b3b0 100644 --- a/docs/usage/bullet-points.md +++ b/docs/usage/bullet-points.md @@ -5,12 +5,21 @@ To make a bullet point, simply make a paragraph into a bullet point: ```ts -const text = new TextRun("Bullet points"); -const paragraph = new Paragraph({ - text: "Bullet points", - bullet: { - level: 0, //How deep you want the bullet to be - }, +doc.addSection({ + children: [ + new Paragraph({ + text: "Bullet points", + bullet: { + level: 0 //How deep you want the bullet to be + } + }), + new Paragraph({ + text: "Are awesome", + bullet: { + level: 0 + } + }) + ], }); ``` From 10455a534f1477c0381a19b39bc4cbd9b10b2a69 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 27 Feb 2021 01:40:55 +0000 Subject: [PATCH 236/260] #332 Compatability mode --- src/file/core-properties/properties.ts | 1 + src/file/file.ts | 4 +- .../compatibility-setting.spec.ts | 23 ++++++++++ .../compatibility-setting.ts | 27 ++++++++++++ src/file/settings/compatibility.spec.ts | 10 +++-- src/file/settings/compatibility.ts | 18 +++++--- src/file/settings/settings.spec.ts | 42 +++++++++++-------- src/file/settings/settings.ts | 20 ++++----- 8 files changed, 108 insertions(+), 37 deletions(-) create mode 100644 src/file/settings/compatibility-setting/compatibility-setting.spec.ts create mode 100644 src/file/settings/compatibility-setting/compatibility-setting.ts diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index ae9f227ad5..369e119697 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -37,6 +37,7 @@ export interface IPropertiesOptions { readonly features?: { readonly trackRevisions?: boolean; }; + readonly compatabilityModeVersion?: number; } export class CoreProperties extends XmlComponent { diff --git a/src/file/file.ts b/src/file/file.ts index 90986d16d7..2a2c3982fa 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -86,7 +86,9 @@ export class File { this.footNotes = new FootNotes(); this.contentTypes = new ContentTypes(); this.document = new Document({ background: options.background || {} }); - this.settings = new Settings(); + this.settings = new Settings({ + compatabilityModeVersion: options.compatabilityModeVersion, + }); this.media = fileProperties.template && fileProperties.template.media ? fileProperties.template.media : new Media(); diff --git a/src/file/settings/compatibility-setting/compatibility-setting.spec.ts b/src/file/settings/compatibility-setting/compatibility-setting.spec.ts new file mode 100644 index 0000000000..0f65697cda --- /dev/null +++ b/src/file/settings/compatibility-setting/compatibility-setting.spec.ts @@ -0,0 +1,23 @@ +import { expect } from "chai"; +import { Formatter } from "export/formatter"; + +import { CompatibilitySetting } from "./compatibility-setting"; + +describe("CompatibilitySetting", () => { + describe("#constructor", () => { + it("creates an initially empty property object", () => { + const compatibilitySetting = new CompatibilitySetting(15); + + const tree = new Formatter().format(compatibilitySetting); + expect(tree).to.deep.equal({ + "w:compatSetting": { + _attr: { + "w:name": "compatibilityMode", + "w:uri": "http://schemas.microsoft.com/office/word", + "w:val": 15, + }, + }, + }); + }); + }); +}); diff --git a/src/file/settings/compatibility-setting/compatibility-setting.ts b/src/file/settings/compatibility-setting/compatibility-setting.ts new file mode 100644 index 0000000000..9f2a0b4982 --- /dev/null +++ b/src/file/settings/compatibility-setting/compatibility-setting.ts @@ -0,0 +1,27 @@ +import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; + +export class CompatibilitySettingAttributes extends XmlAttributeComponent<{ + readonly version: number; + readonly name: string; + readonly uri: string; +}> { + protected readonly xmlKeys = { + version: "w:val", + name: "w:name", + uri: "w:uri", + }; +} + +export class CompatibilitySetting extends XmlComponent { + constructor(version: number) { + super("w:compatSetting"); + + this.root.push( + new CompatibilitySettingAttributes({ + version, + uri: "http://schemas.microsoft.com/office/word", + name: "compatibilityMode", + }), + ); + } +} diff --git a/src/file/settings/compatibility.spec.ts b/src/file/settings/compatibility.spec.ts index 6399dcfeea..fa9809672d 100644 --- a/src/file/settings/compatibility.spec.ts +++ b/src/file/settings/compatibility.spec.ts @@ -1,13 +1,14 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; -import { Compatibility } from "file/settings/compatibility"; import { EMPTY_OBJECT } from "file/xml-components"; +import { Compatibility } from "./compatibility"; + describe("Compatibility", () => { describe("#constructor", () => { it("creates an initially empty property object", () => { - const compatibility = new Compatibility(); + const compatibility = new Compatibility({}); const tree = new Formatter().format(compatibility); expect(tree).to.deep.equal({ "w:compat": EMPTY_OBJECT }); @@ -16,8 +17,9 @@ describe("Compatibility", () => { describe("#doNotExpandShiftReturn", () => { it("should create a setting for not justifying lines ending in soft line break", () => { - const compatibility = new Compatibility(); - compatibility.doNotExpandShiftReturn(); + const compatibility = new Compatibility({ + doNotExpandShiftReturn: true, + }); const tree = new Formatter().format(compatibility); expect(tree).to.deep.equal({ "w:compat": [{ "w:doNotExpandShiftReturn": EMPTY_OBJECT }] }); diff --git a/src/file/settings/compatibility.ts b/src/file/settings/compatibility.ts index afd2dd0f37..fe63da92c5 100644 --- a/src/file/settings/compatibility.ts +++ b/src/file/settings/compatibility.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "file/xml-components"; +import { CompatibilitySetting } from "./compatibility-setting/compatibility-setting"; class DoNotExpandShiftReturn extends XmlComponent { constructor() { @@ -6,14 +7,21 @@ class DoNotExpandShiftReturn extends XmlComponent { } } +export interface ICompatibilityOptions { + readonly doNotExpandShiftReturn?: boolean; + readonly version?: number; +} + export class Compatibility extends XmlComponent { - constructor() { + constructor(options: ICompatibilityOptions) { super("w:compat"); - } - public doNotExpandShiftReturn(): Compatibility { - this.root.push(new DoNotExpandShiftReturn()); + if (options.doNotExpandShiftReturn) { + this.root.push(new DoNotExpandShiftReturn()); + } - return this; + if (options.version) { + this.root.push(new CompatibilitySetting(options.version)); + } } } diff --git a/src/file/settings/settings.spec.ts b/src/file/settings/settings.spec.ts index 69c7c089d5..381b24d372 100644 --- a/src/file/settings/settings.spec.ts +++ b/src/file/settings/settings.spec.ts @@ -7,7 +7,7 @@ import { Settings } from "./settings"; describe("Settings", () => { describe("#constructor", () => { it("should create a empty Settings with correct rootKey", () => { - const settings = new Settings(); + const settings = new Settings({}); const tree = new Formatter().format(settings); let keys = Object.keys(tree); expect(keys).is.an.instanceof(Array); @@ -15,7 +15,7 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); keys = Object.keys(tree["w:settings"]); expect(keys).is.an.instanceof(Array); - expect(keys).has.length(2); + expect(keys).has.length(3); }); }); describe("#addUpdateFields", () => { @@ -27,16 +27,16 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(3); + expect(rootArray).has.length(4); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[2]); + keys = Object.keys(rootArray[3]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:updateFields"); - const updateFields = rootArray[2]["w:updateFields"]; + const updateFields = rootArray[3]["w:updateFields"]; keys = Object.keys(updateFields); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); @@ -45,12 +45,12 @@ describe("Settings", () => { expect(updateFieldsAttr["w:val"]).to.be.equal(true); }; it("should add a UpdateFields with value true", () => { - const settings = new Settings(); + const settings = new Settings({}); settings.addUpdateFields(); assertSettingsWithUpdateFields(settings); }); it("should add a UpdateFields with value true only once", () => { - const settings = new Settings(); + const settings = new Settings({}); settings.addUpdateFields(); assertSettingsWithUpdateFields(settings); settings.addUpdateFields(); @@ -58,9 +58,8 @@ describe("Settings", () => { }); }); describe("#addCompatibility", () => { - it("should add an empty Compatibility", () => { - const settings = new Settings(); - settings.addCompatibility(); + it("should add an empty Compatibility by default", () => { + const settings = new Settings({}); const tree = new Formatter().format(settings); let keys: string[] = Object.keys(tree); @@ -72,15 +71,24 @@ describe("Settings", () => { expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[2]); + keys = Object.keys(rootArray[1]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:compat"); + expect(rootArray[1]["w:compat"][0]).to.deep.equal({ + "w:compatSetting": { + _attr: { + "w:val": 15, + "w:uri": "http://schemas.microsoft.com/office/word", + "w:name": "compatibilityMode", + }, + }, + }); }); }); describe("#addTrackRevisions", () => { it("should add an empty Track Revisions", () => { - const settings = new Settings(); + const settings = new Settings({}); settings.addTrackRevisions(); const tree = new Formatter().format(settings); @@ -88,12 +96,12 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(3); + expect(rootArray).has.length(4); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[2]); + keys = Object.keys(rootArray[3]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:trackRevisions"); @@ -101,7 +109,7 @@ describe("Settings", () => { }); describe("#addTrackRevisionsTwice", () => { it("should add an empty Track Revisions if called twice", () => { - const settings = new Settings(); + const settings = new Settings({}); settings.addTrackRevisions(); settings.addTrackRevisions(); @@ -110,12 +118,12 @@ describe("Settings", () => { expect(keys[0]).to.be.equal("w:settings"); const rootArray = tree["w:settings"]; expect(rootArray).is.an.instanceof(Array); - expect(rootArray).has.length(3); + expect(rootArray).has.length(4); keys = Object.keys(rootArray[0]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("_attr"); - keys = Object.keys(rootArray[2]); + keys = Object.keys(rootArray[3]); expect(keys).is.an.instanceof(Array); expect(keys).has.length(1); expect(keys[0]).to.be.equal("w:trackRevisions"); diff --git a/src/file/settings/settings.ts b/src/file/settings/settings.ts index d838e8ccc7..7801ed8fe5 100644 --- a/src/file/settings/settings.ts +++ b/src/file/settings/settings.ts @@ -46,11 +46,15 @@ export class SettingsAttributes extends XmlAttributeComponent child instanceof Compatibility)) { - this.addChildElement(this.compatibility); - } - - return this.compatibility; - } - public addTrackRevisions(): TrackRevisions { if (!this.root.find((child) => child instanceof TrackRevisions)) { this.addChildElement(this.trackRevisions); From 4159be5644e671ffda548fe1cb6cfe3c3834b40a Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 27 Feb 2021 01:42:29 +0000 Subject: [PATCH 237/260] Add readonly --- src/file/settings/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/settings/settings.ts b/src/file/settings/settings.ts index 7801ed8fe5..e63d539a39 100644 --- a/src/file/settings/settings.ts +++ b/src/file/settings/settings.ts @@ -47,7 +47,7 @@ export class SettingsAttributes extends XmlAttributeComponent Date: Sat, 27 Feb 2021 19:23:29 +0000 Subject: [PATCH 238/260] #773 Better hyperlink and bookmark syntax Allow for images to be hyperlinked as well --- demo/21-bookmarks.ts | 18 +++--- demo/35-hyperlinks.ts | 41 +++++++----- package-lock.json | 8 +-- package.json | 2 +- src/file/core-properties/properties.ts | 16 +---- src/file/document/document.ts | 4 +- src/file/file.spec.ts | 45 +------------ src/file/file.ts | 62 +----------------- src/file/media/media.ts | 2 +- src/file/paragraph/links/hyperlink.spec.ts | 74 +++++++++++++++++++--- src/file/paragraph/links/hyperlink.ts | 34 +++++----- src/file/paragraph/paragraph.spec.ts | 48 +++++++++++--- src/file/paragraph/paragraph.ts | 44 ++++++++----- 13 files changed, 195 insertions(+), 203 deletions(-) diff --git a/demo/21-bookmarks.ts b/demo/21-bookmarks.ts index 1ad50eb9b1..c5da12673d 100644 --- a/demo/21-bookmarks.ts +++ b/demo/21-bookmarks.ts @@ -1,7 +1,7 @@ // This demo shows how to create bookmarks then link to them with internal hyperlinks // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Bookmark, Document, HeadingLevel, HyperlinkRef, HyperlinkType, Packer, PageBreak, Paragraph } from "../build"; +import { Bookmark, Document, HeadingLevel, InternalHyperlink, Packer, PageBreak, Paragraph, TextRun } from "../build"; const LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam mi velit, convallis convallis scelerisque nec, faucibus nec leo. Phasellus at posuere mauris, tempus dignissim velit. Integer et tortor dolor. Duis auctor efficitur mattis. Vivamus ut metus accumsan tellus auctor sollicitudin venenatis et nibh. Cras quis massa ac metus fringilla venenatis. Proin rutrum mauris purus, ut suscipit magna consectetur id. Integer consectetur sollicitudin ante, vitae faucibus neque efficitur in. Praesent ultricies nibh lectus. Mauris pharetra id odio eget iaculis. Duis dictum, risus id pellentesque rutrum, lorem quam malesuada massa, quis ullamcorper turpis urna a diam. Cras vulputate metus vel massa porta ullamcorper. Etiam porta condimentum nulla nec tristique. Sed nulla urna, pharetra non tortor sed, sollicitudin molestie diam. Maecenas enim leo, feugiat eget vehicula id, sollicitudin vitae ante."; @@ -10,12 +10,6 @@ const doc = new Document({ creator: "Clippy", title: "Sample Document", description: "A brief example of using docx with bookmarks and internal hyperlinks", - hyperlinks: { - myAnchorId: { - text: "Hyperlink", - type: HyperlinkType.INTERNAL, - }, - }, }); doc.addSection({ @@ -30,7 +24,15 @@ doc.addSection({ children: [new PageBreak()], }), new Paragraph({ - children: [new HyperlinkRef("myAnchorId")], + children: [ + new InternalHyperlink({ + child: new TextRun({ + text: "Anchor Text", + style: "Hyperlink", + }), + anchor: "myAnchorId", + }), + ], }), ], }); diff --git a/demo/35-hyperlinks.ts b/demo/35-hyperlinks.ts index 65ed9390d4..8346cd1028 100644 --- a/demo/35-hyperlinks.ts +++ b/demo/35-hyperlinks.ts @@ -1,32 +1,39 @@ // Example on how to add hyperlinks to websites // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, HyperlinkRef, HyperlinkType, Packer, Paragraph, Media } from "../build"; +import { ExternalHyperlink, Document, Packer, Paragraph, Media, TextRun } from "../build"; -const doc = new Document({ - hyperlinks: { - myCoolLink: { - link: "http://www.example.com", - text: "Hyperlink", - type: HyperlinkType.EXTERNAL, - }, - myOtherLink: { - link: "http://www.google.com", - text: "Google Link", - type: HyperlinkType.EXTERNAL, - }, - }, -}); +const doc = new Document({}); const image1 = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg")); doc.addSection({ children: [ new Paragraph({ - children: [new HyperlinkRef("myCoolLink")], + children: [ + new ExternalHyperlink({ + child: new TextRun({ + text: "Anchor Text", + style: "Hyperlink", + }), + link: "http://www.example.com", + }), + ], }), new Paragraph({ - children: [image1, new HyperlinkRef("myOtherLink")], + children: [ + new ExternalHyperlink({ + child: image1, + link: "http://www.google.com", + }), + new ExternalHyperlink({ + child: new TextRun({ + text: "BBC News Link", + style: "Hyperlink", + }), + link: "https://www.bbc.co.uk/news", + }), + ], }), ], }); diff --git a/package-lock.json b/package-lock.json index 51c6df7417..6d7d1eef60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4884,7 +4884,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -8149,9 +8149,9 @@ } }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz", + "integrity": "sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 562c48b57c..1671bfdfb3 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "tslint": "^6.1.3", "tslint-immutable": "^6.0.1", "typedoc": "^0.16.11", - "typescript": "2.9.2", + "typescript": "4.2.2", "webpack": "^3.10.0" }, "engines": { diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index 369e119697..8e3921df0c 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -3,21 +3,10 @@ import { IDocumentBackgroundOptions } from "../document"; import { DocumentAttributes } from "../document/document-attributes"; import { INumberingOptions } from "../numbering"; -import { HyperlinkType, Paragraph } from "../paragraph"; +import { Paragraph } from "../paragraph"; import { IStylesOptions } from "../styles"; import { Created, Creator, Description, Keywords, LastModifiedBy, Modified, Revision, Subject, Title } from "./components"; -export interface IInternalHyperlinkDefinition { - readonly text: string; - readonly type: HyperlinkType.INTERNAL; -} - -export interface IExternalHyperlinkDefinition { - readonly link: string; - readonly text: string; - readonly type: HyperlinkType.EXTERNAL; -} - export interface IPropertiesOptions { readonly title?: string; readonly subject?: string; @@ -30,9 +19,6 @@ export interface IPropertiesOptions { readonly styles?: IStylesOptions; readonly numbering?: INumberingOptions; readonly footnotes?: Paragraph[]; - readonly hyperlinks?: { - readonly [key: string]: IInternalHyperlinkDefinition | IExternalHyperlinkDefinition; - }; readonly background?: IDocumentBackgroundOptions; readonly features?: { readonly trackRevisions?: boolean; diff --git a/src/file/document/document.ts b/src/file/document/document.ts index fb0f579568..93d4035fa1 100644 --- a/src/file/document/document.ts +++ b/src/file/document/document.ts @@ -1,6 +1,6 @@ // http://officeopenxml.com/WPdocument.php import { XmlComponent } from "file/xml-components"; -import { Hyperlink, Paragraph } from "../paragraph"; +import { ConcreteHyperlink, Paragraph } from "../paragraph"; import { Table } from "../table"; import { TableOfContents } from "../table-of-contents"; import { Body } from "./body"; @@ -42,7 +42,7 @@ export class Document extends XmlComponent { this.root.push(this.body); } - public add(item: Paragraph | Table | TableOfContents | Hyperlink): Document { + public add(item: Paragraph | Table | TableOfContents | ConcreteHyperlink): Document { this.body.push(item); return this; } diff --git a/src/file/file.spec.ts b/src/file/file.spec.ts index 9b93a63db1..9632b80897 100644 --- a/src/file/file.spec.ts +++ b/src/file/file.spec.ts @@ -5,7 +5,7 @@ import { Formatter } from "export/formatter"; import { File } from "./file"; import { Footer, Header } from "./header"; -import { HyperlinkRef, HyperlinkType, Paragraph } from "./paragraph"; +import { Paragraph } from "./paragraph"; import { Table, TableCell, TableRow } from "./table"; import { TableOfContents } from "./table-of-contents"; @@ -164,16 +164,6 @@ describe("File", () => { ], }); }); - - it("should add hyperlink child", () => { - const doc = new File(undefined, undefined, [ - { - children: [new HyperlinkRef("test")], - }, - ]); - - expect(doc.HyperlinkCache).to.deep.equal({}); - }); }); describe("#addSection", () => { @@ -187,16 +177,6 @@ describe("File", () => { expect(spy.called).to.equal(true); }); - it("should add hyperlink child", () => { - const doc = new File(); - - doc.addSection({ - children: [new HyperlinkRef("test")], - }); - - expect(doc.HyperlinkCache).to.deep.equal({}); - }); - it("should call the underlying document's add when adding a Table", () => { const file = new File(); const spy = sinon.spy(file.Document, "add"); @@ -256,29 +236,6 @@ describe("File", () => { }); }); - describe("#HyperlinkCache", () => { - it("should initially have empty hyperlink cache", () => { - const file = new File(); - - expect(file.HyperlinkCache).to.deep.equal({}); - }); - - it("should have hyperlink cache when option is added", () => { - const file = new File({ - hyperlinks: { - myCoolLink: { - link: "http://www.example.com", - text: "Hyperlink", - type: HyperlinkType.EXTERNAL, - }, - }, - }); - - // tslint:disable-next-line: no-unused-expression no-string-literal - expect(file.HyperlinkCache["myCoolLink"]).to.exist; - }); - }); - describe("#createFootnote", () => { it("should create footnote", () => { const wrapper = new File({ diff --git a/src/file/file.ts b/src/file/file.ts index 2a2c3982fa..20d292f91b 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -1,4 +1,3 @@ -import * as shortid from "shortid"; import { AppProperties } from "./app-properties/app-properties"; import { ContentTypes } from "./content-types/content-types"; import { CoreProperties, IPropertiesOptions } from "./core-properties"; @@ -17,9 +16,8 @@ import { Footer, Header } from "./header"; import { HeaderWrapper, IDocumentHeader } from "./header-wrapper"; import { Media } from "./media"; import { Numbering } from "./numbering"; -import { Hyperlink, HyperlinkRef, HyperlinkType, Paragraph } from "./paragraph"; +import { Paragraph } from "./paragraph"; import { Relationships } from "./relationships"; -import { TargetModeType } from "./relationships/relationship/relationship"; import { Settings } from "./settings"; import { Styles } from "./styles"; import { ExternalStylesFactory } from "./styles/external-styles-factory"; @@ -41,7 +39,7 @@ export interface ISectionOptions { readonly size?: IPageSizeAttributes; readonly margins?: IPageMarginAttributes; readonly properties?: SectionPropertiesOptions; - readonly children: (Paragraph | Table | TableOfContents | HyperlinkRef)[]; + readonly children: (Paragraph | Table | TableOfContents)[]; } export class File { @@ -61,7 +59,6 @@ export class File { private readonly contentTypes: ContentTypes; private readonly appProperties: AppProperties; private readonly styles: Styles; - private readonly hyperlinkCache: { readonly [key: string]: Hyperlink } = {}; constructor( options: IPropertiesOptions = { @@ -136,12 +133,6 @@ export class File { this.document.Body.addSection(section.properties ? section.properties : {}); for (const child of section.children) { - if (child instanceof HyperlinkRef) { - const hyperlink = this.hyperlinkCache[child.id]; - this.document.add(hyperlink); - continue; - } - this.document.add(child); } } @@ -152,27 +143,6 @@ export class File { } } - if (options.hyperlinks) { - const cache = {}; - - for (const key in options.hyperlinks) { - if (!options.hyperlinks[key]) { - continue; - } - - const hyperlinkRef = options.hyperlinks[key]; - - const hyperlink = - hyperlinkRef.type === HyperlinkType.EXTERNAL - ? this.createHyperlink(hyperlinkRef.link, hyperlinkRef.text) - : this.createInternalHyperLink(key, hyperlinkRef.text); - - cache[key] = hyperlink; - } - - this.hyperlinkCache = cache; - } - if (options.features) { if (options.features.trackRevisions) { this.settings.addTrackRevisions(); @@ -205,12 +175,6 @@ export class File { }); for (const child of children) { - if (child instanceof HyperlinkRef) { - const hyperlink = this.hyperlinkCache[child.id]; - this.document.add(hyperlink); - continue; - } - this.document.add(child); } } @@ -221,24 +185,6 @@ export class File { } } - private createHyperlink(link: string, text: string = link): Hyperlink { - const hyperlink = new Hyperlink(text, shortid.generate().toLowerCase()); - this.docRelationships.createRelationship( - hyperlink.linkId, - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", - link, - TargetModeType.EXTERNAL, - ); - return hyperlink; - } - - private createInternalHyperLink(anchor: string, text: string = anchor): Hyperlink { - const hyperlink = new Hyperlink(text, shortid.generate().toLowerCase(), anchor); - // NOTE: unlike File#createHyperlink(), since the link is to an internal bookmark - // we don't need to create a new relationship. - return hyperlink; - } - private createHeader(header: Header): HeaderWrapper { const wrapper = new HeaderWrapper(this.media, this.currentRelationshipId++); @@ -371,8 +317,4 @@ export class File { public get Settings(): Settings { return this.settings; } - - public get HyperlinkCache(): { readonly [key: string]: Hyperlink } { - return this.hyperlinkCache; - } } diff --git a/src/file/media/media.ts b/src/file/media/media.ts index 71e7c6f60e..6168fbc362 100644 --- a/src/file/media/media.ts +++ b/src/file/media/media.ts @@ -82,7 +82,7 @@ export class Media { return imageData; } - public get Array(): IMediaData[] { + public get Array(): readonly IMediaData[] { const array = new Array(); this.map.forEach((data) => { diff --git a/src/file/paragraph/links/hyperlink.spec.ts b/src/file/paragraph/links/hyperlink.spec.ts index 4b06a933f5..50d6aa76aa 100644 --- a/src/file/paragraph/links/hyperlink.spec.ts +++ b/src/file/paragraph/links/hyperlink.spec.ts @@ -2,14 +2,20 @@ import { expect } from "chai"; import { Formatter } from "export/formatter"; -import { Hyperlink } from "./"; -import { HyperlinkRef } from "./hyperlink"; +import { TextRun } from "../run"; +import { ConcreteHyperlink, ExternalHyperlink, InternalHyperlink } from "./hyperlink"; -describe("Hyperlink", () => { - let hyperlink: Hyperlink; +describe("ConcreteHyperlink", () => { + let hyperlink: ConcreteHyperlink; beforeEach(() => { - hyperlink = new Hyperlink("https://example.com", "superid"); + hyperlink = new ConcreteHyperlink( + new TextRun({ + text: "https://example.com", + style: "Hyperlink", + }), + "superid", + ); }); describe("#constructor()", () => { @@ -35,7 +41,14 @@ describe("Hyperlink", () => { describe("with optional anchor parameter", () => { beforeEach(() => { - hyperlink = new Hyperlink("Anchor Text", "superid2", "anchor"); + hyperlink = new ConcreteHyperlink( + new TextRun({ + text: "Anchor Text", + style: "Hyperlink", + }), + "superid2", + "anchor", + ); }); it("should create an internal link with anchor tag", () => { @@ -61,10 +74,53 @@ describe("Hyperlink", () => { }); }); -describe("HyperlinkRef", () => { +describe("ExternalHyperlink", () => { describe("#constructor()", () => { - const hyperlinkRef = new HyperlinkRef("test-id"); + it("should create", () => { + const externalHyperlink = new ExternalHyperlink({ + child: new TextRun("test"), + link: "http://www.google.com", + }); - expect(hyperlinkRef.id).to.equal("test-id"); + expect(externalHyperlink.options.link).to.equal("http://www.google.com"); + }); + }); +}); + +describe("InternalHyperlink", () => { + describe("#constructor()", () => { + it("should create", () => { + const internalHyperlink = new InternalHyperlink({ + child: new TextRun("test"), + anchor: "test-id", + }); + + const tree = new Formatter().format(internalHyperlink); + + expect(tree).to.deep.equal({ + "w:hyperlink": [ + { + _attr: { + "w:anchor": "test-id", + "w:history": 1, + }, + }, + { + "w:r": [ + { + "w:t": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "test", + ], + }, + ], + }, + ], + }); + }); }); }); diff --git a/src/file/paragraph/links/hyperlink.ts b/src/file/paragraph/links/hyperlink.ts index 302acfd603..a7512e7beb 100644 --- a/src/file/paragraph/links/hyperlink.ts +++ b/src/file/paragraph/links/hyperlink.ts @@ -1,6 +1,9 @@ // http://officeopenxml.com/WPhyperlink.php +import * as shortid from "shortid"; + import { XmlComponent } from "file/xml-components"; -import { TextRun } from "../run"; + +import { ParagraphChild } from "../paragraph"; import { HyperlinkAttributes, IHyperlinkAttributesProperties } from "./hyperlink-attributes"; export enum HyperlinkType { @@ -8,15 +11,10 @@ export enum HyperlinkType { EXTERNAL = "EXTERNAL", } -export class HyperlinkRef { - constructor(public readonly id: string) {} -} - -export class Hyperlink extends XmlComponent { +export class ConcreteHyperlink extends XmlComponent { public readonly linkId: string; - private readonly textRun: TextRun; - constructor(text: string, relationshipId: string, anchor?: string) { + constructor(child: ParagraphChild, relationshipId: string, anchor?: string) { super("w:hyperlink"); this.linkId = relationshipId; @@ -29,14 +27,16 @@ export class Hyperlink extends XmlComponent { const attributes = new HyperlinkAttributes(props); this.root.push(attributes); - this.textRun = new TextRun({ - text: text, - style: "Hyperlink", - }); - this.root.push(this.textRun); - } - - public get TextRun(): TextRun { - return this.textRun; + this.root.push(child); } } + +export class InternalHyperlink extends ConcreteHyperlink { + constructor(options: { readonly child: ParagraphChild; readonly anchor: string }) { + super(options.child, shortid.generate().toLowerCase(), options.anchor); + } +} + +export class ExternalHyperlink { + constructor(public readonly options: { readonly child: ParagraphChild; readonly link: string }) {} +} diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index a368684d40..57590f6313 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -8,8 +8,9 @@ import { EMPTY_OBJECT } from "file/xml-components"; import { File } from "../file"; import { ShadingType } from "../table/shading"; import { AlignmentType, HeadingLevel, LeaderType, PageBreak, TabStopPosition, TabStopType } from "./formatting"; -import { Bookmark, HyperlinkRef } from "./links"; +import { Bookmark, ExternalHyperlink } from "./links"; import { Paragraph } from "./paragraph"; +import { TextRun } from "./run"; describe("Paragraph", () => { describe("#constructor()", () => { @@ -763,7 +764,7 @@ describe("Paragraph", () => { }); describe("#shading", () => { - it("should set paragraph outline level to the given value", () => { + it("should set shading to the given value", () => { const paragraph = new Paragraph({ shading: { type: ShadingType.REVERSE_DIAGONAL_STRIPE, @@ -793,20 +794,49 @@ describe("Paragraph", () => { }); describe("#prepForXml", () => { - it("should set paragraph outline level to the given value", () => { + it("should set Internal Hyperlink", () => { const paragraph = new Paragraph({ - children: [new HyperlinkRef("myAnchorId")], + children: [ + new ExternalHyperlink({ + child: new TextRun("test"), + link: "http://www.google.com", + }), + ], }); const fileMock = ({ - HyperlinkCache: { - myAnchorId: "test", + DocumentRelationships: { + createRelationship: () => ({}), }, - // tslint:disable-next-line: no-any - } as any) as File; + } as unknown) as File; paragraph.prepForXml(fileMock); const tree = new Formatter().format(paragraph); expect(tree).to.deep.equal({ - "w:p": ["test"], + "w:p": [ + { + "w:hyperlink": [ + { + _attr: { + "r:id": "rIdtest-unique-id", + "w:history": 1, + }, + }, + { + "w:r": [ + { + "w:t": [ + { + _attr: { + "xml:space": "preserve", + }, + }, + "test", + ], + }, + ], + }, + ], + }, + ], }); }); }); diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index 60efb0da34..dcaf2c480d 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -1,30 +1,35 @@ // http://officeopenxml.com/WPparagraph.php +import * as shortid from "shortid"; + import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run"; import { IXmlableObject, XmlComponent } from "file/xml-components"; import { File } from "../file"; +import { TargetModeType } from "../relationships/relationship/relationship"; import { DeletedTextRun, InsertedTextRun } from "../track-revision"; import { PageBreak } from "./formatting/page-break"; -import { Bookmark, HyperlinkRef } from "./links"; +import { Bookmark, ConcreteHyperlink, ExternalHyperlink, InternalHyperlink } from "./links"; import { Math } from "./math"; import { IParagraphPropertiesOptions, ParagraphProperties } from "./properties"; import { PictureRun, Run, SequentialIdentifier, SymbolRun, TextRun } from "./run"; +export type ParagraphChild = + | TextRun + | PictureRun + | SymbolRun + | Bookmark + | PageBreak + | SequentialIdentifier + | FootnoteReferenceRun + | InternalHyperlink + | ExternalHyperlink + | InsertedTextRun + | DeletedTextRun + | Math; + export interface IParagraphOptions extends IParagraphPropertiesOptions { readonly text?: string; - readonly children?: ( - | TextRun - | PictureRun - | SymbolRun - | Bookmark - | PageBreak - | SequentialIdentifier - | FootnoteReferenceRun - | HyperlinkRef - | InsertedTextRun - | DeletedTextRun - | Math - )[]; + readonly children?: ParagraphChild[]; } export class Paragraph extends XmlComponent { @@ -71,9 +76,16 @@ export class Paragraph extends XmlComponent { public prepForXml(file: File): IXmlableObject | undefined { for (const element of this.root) { - if (element instanceof HyperlinkRef) { + if (element instanceof ExternalHyperlink) { const index = this.root.indexOf(element); - this.root[index] = file.HyperlinkCache[element.id]; + const concreteHyperlink = new ConcreteHyperlink(element.options.child, shortid.generate().toLowerCase()); + file.DocumentRelationships.createRelationship( + concreteHyperlink.linkId, + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", + element.options.link, + TargetModeType.EXTERNAL, + ); + this.root[index] = concreteHyperlink; } } From e750735fa4f7a70138547d0a1753c7bb8d65bee2 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 28 Feb 2021 13:09:43 +0000 Subject: [PATCH 239/260] Add bookmark in footer --- demo/21-bookmarks.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/demo/21-bookmarks.ts b/demo/21-bookmarks.ts index c5da12673d..632fcb212f 100644 --- a/demo/21-bookmarks.ts +++ b/demo/21-bookmarks.ts @@ -1,7 +1,7 @@ // This demo shows how to create bookmarks then link to them with internal hyperlinks // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Bookmark, Document, HeadingLevel, InternalHyperlink, Packer, PageBreak, Paragraph, TextRun } from "../build"; +import { Bookmark, Document, Footer, HeadingLevel, InternalHyperlink, Packer, PageBreak, Paragraph, TextRun } from "../build"; const LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam mi velit, convallis convallis scelerisque nec, faucibus nec leo. Phasellus at posuere mauris, tempus dignissim velit. Integer et tortor dolor. Duis auctor efficitur mattis. Vivamus ut metus accumsan tellus auctor sollicitudin venenatis et nibh. Cras quis massa ac metus fringilla venenatis. Proin rutrum mauris purus, ut suscipit magna consectetur id. Integer consectetur sollicitudin ante, vitae faucibus neque efficitur in. Praesent ultricies nibh lectus. Mauris pharetra id odio eget iaculis. Duis dictum, risus id pellentesque rutrum, lorem quam malesuada massa, quis ullamcorper turpis urna a diam. Cras vulputate metus vel massa porta ullamcorper. Etiam porta condimentum nulla nec tristique. Sed nulla urna, pharetra non tortor sed, sollicitudin molestie diam. Maecenas enim leo, feugiat eget vehicula id, sollicitudin vitae ante."; @@ -13,6 +13,23 @@ const doc = new Document({ }); doc.addSection({ + footers: { + default: new Footer({ + children: [ + new Paragraph({ + children: [ + new InternalHyperlink({ + child: new TextRun({ + text: "Click here!", + style: "Hyperlink", + }), + anchor: "myAnchorId", + }), + ], + }), + ], + }), + }, children: [ new Paragraph({ heading: HeadingLevel.HEADING_1, From 655b40d4180cd92f94ea9a977274b37a80eda35b Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 28 Feb 2021 16:04:21 +0000 Subject: [PATCH 240/260] Work on moving Document into its own wrapper --- demo/35-hyperlinks.ts | 20 +++++++- src/export/packer/next-compiler.ts | 16 +++--- src/file/document-wrapper.spec.ts | 50 +++++++++++++++++++ src/file/document-wrapper.ts | 27 ++++++++++ .../section-properties/section-properties.ts | 12 ++--- src/file/document/document.ts | 2 +- src/file/file.spec.ts | 18 +++---- src/file/file.ts | 43 +++++++--------- src/file/footer-wrapper.spec.ts | 6 +-- src/file/footer-wrapper.ts | 5 +- src/file/header-wrapper.spec.ts | 6 +-- src/file/header-wrapper.ts | 5 +- src/file/media/media.ts | 4 +- src/file/paragraph/paragraph.spec.ts | 6 ++- src/file/paragraph/paragraph.ts | 2 +- 15 files changed, 157 insertions(+), 65 deletions(-) create mode 100644 src/file/document-wrapper.spec.ts create mode 100644 src/file/document-wrapper.ts diff --git a/demo/35-hyperlinks.ts b/demo/35-hyperlinks.ts index 8346cd1028..85fa5fc1f3 100644 --- a/demo/35-hyperlinks.ts +++ b/demo/35-hyperlinks.ts @@ -1,13 +1,31 @@ // Example on how to add hyperlinks to websites // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { ExternalHyperlink, Document, Packer, Paragraph, Media, TextRun } from "../build"; +import { ExternalHyperlink, Document, Packer, Paragraph, Media, TextRun, Footer } from "../build"; const doc = new Document({}); const image1 = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg")); doc.addSection({ + footers: { + default: new Footer({ + children: [ + new Paragraph({ + children: [ + new TextRun("Click here for the "), + new ExternalHyperlink({ + child: new TextRun({ + text: "Footer external hyperlink", + style: "Hyperlink", + }), + link: "http://www.example.com", + }), + ], + }), + ], + }), + }, children: [ new Paragraph({ children: [ diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index a7b5fb617e..a0c73090fc 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -69,23 +69,23 @@ export class Compiler { private xmlifyFile(file: File, prettify?: boolean): IXmlifyedFileMapping { file.verifyUpdateFields(); - const documentRelationshipCount = file.DocumentRelationships.RelationshipCount + 1; + const documentRelationshipCount = file.Document.Relationships.RelationshipCount + 1; - const documentXmlData = xml(this.formatter.format(file.Document, file), prettify); + const documentXmlData = xml(this.formatter.format(file.Document.View, file), prettify); const documentMediaDatas = this.imageReplacer.getMediaData(documentXmlData, file.Media); return { Relationships: { data: (() => { documentMediaDatas.forEach((mediaData, i) => { - file.DocumentRelationships.createRelationship( + file.Document.Relationships.createRelationship( documentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaData.fileName}`, ); }); - return xml(this.formatter.format(file.DocumentRelationships, file), prettify); + return xml(this.formatter.format(file.Document.Relationships, file), prettify); })(), path: "word/_rels/document.xml.rels", }, @@ -120,7 +120,7 @@ export class Compiler { path: "_rels/.rels", }, HeaderRelationships: file.Headers.map((headerWrapper, index) => { - const xmlData = xml(this.formatter.format(headerWrapper.Header, file), prettify); + const xmlData = xml(this.formatter.format(headerWrapper.View, file), prettify); const mediaDatas = this.imageReplacer.getMediaData(xmlData, file.Media); mediaDatas.forEach((mediaData, i) => { @@ -137,7 +137,7 @@ export class Compiler { }; }), FooterRelationships: file.Footers.map((footerWrapper, index) => { - const xmlData = xml(this.formatter.format(footerWrapper.Footer, file), prettify); + const xmlData = xml(this.formatter.format(footerWrapper.View, file), prettify); const mediaDatas = this.imageReplacer.getMediaData(xmlData, file.Media); mediaDatas.forEach((mediaData, i) => { @@ -154,7 +154,7 @@ export class Compiler { }; }), Headers: file.Headers.map((headerWrapper, index) => { - const tempXmlData = xml(this.formatter.format(headerWrapper.Header, file), prettify); + const tempXmlData = xml(this.formatter.format(headerWrapper.View, file), prettify); const mediaDatas = this.imageReplacer.getMediaData(tempXmlData, file.Media); // TODO: 0 needs to be changed when headers get relationships of their own const xmlData = this.imageReplacer.replace(tempXmlData, mediaDatas, 0); @@ -165,7 +165,7 @@ export class Compiler { }; }), Footers: file.Footers.map((footerWrapper, index) => { - const tempXmlData = xml(this.formatter.format(footerWrapper.Footer, file), prettify); + const tempXmlData = xml(this.formatter.format(footerWrapper.View, file), prettify); const mediaDatas = this.imageReplacer.getMediaData(tempXmlData, file.Media); // TODO: 0 needs to be changed when headers get relationships of their own const xmlData = this.imageReplacer.replace(tempXmlData, mediaDatas, 0); diff --git a/src/file/document-wrapper.spec.ts b/src/file/document-wrapper.spec.ts new file mode 100644 index 0000000000..2a32ad7968 --- /dev/null +++ b/src/file/document-wrapper.spec.ts @@ -0,0 +1,50 @@ +import { expect } from "chai"; +import * as sinon from "sinon"; + +import { FooterWrapper } from "./footer-wrapper"; +import { Media } from "./media"; +import { Paragraph } from "./paragraph"; +import { Table, TableCell, TableRow } from "./table"; + +describe("FooterWrapper", () => { + describe("#add", () => { + it("should call the underlying footer's addParagraph", () => { + const file = new FooterWrapper(new Media(), 1); + const spy = sinon.spy(file.View, "add"); + file.add(new Paragraph({})); + + expect(spy.called).to.equal(true); + }); + + it("should call the underlying footer's addParagraph", () => { + const file = new FooterWrapper(new Media(), 1); + const spy = sinon.spy(file.View, "add"); + file.add( + new Table({ + rows: [ + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("hello")], + }), + ], + }), + ], + }), + ); + + expect(spy.called).to.equal(true); + }); + }); + + describe("#addChildElement", () => { + it("should call the underlying footer's addChildElement", () => { + const file = new FooterWrapper(new Media(), 1); + const spy = sinon.spy(file.View, "addChildElement"); + // tslint:disable-next-line:no-any + file.addChildElement({} as any); + + expect(spy.called).to.equal(true); + }); + }); +}); diff --git a/src/file/document-wrapper.ts b/src/file/document-wrapper.ts new file mode 100644 index 0000000000..3054f2c30e --- /dev/null +++ b/src/file/document-wrapper.ts @@ -0,0 +1,27 @@ +import { Document, IDocumentOptions } from "./document"; +import { Footer } from "./footer"; +import { Header } from "./header/header"; +import { Relationships } from "./relationships"; + +export interface IViewWrapper { + readonly View: Document | Footer | Header; + readonly Relationships: Relationships; +} + +export class DocumentWrapper implements IViewWrapper { + private readonly document: Document; + private readonly relationships: Relationships; + + constructor(options: IDocumentOptions) { + this.document = new Document(options); + this.relationships = new Relationships(); + } + + public get View(): Document { + return this.document; + } + + public get Relationships(): Relationships { + return this.relationships; + } +} diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index 133051cb6e..e3fb1be2a4 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -145,7 +145,7 @@ export class SectionProperties extends XmlComponent { this.root.push( new HeaderReference({ headerType: HeaderReferenceType.DEFAULT, - headerId: headers.default.Header.ReferenceId, + headerId: headers.default.View.ReferenceId, }), ); } @@ -154,7 +154,7 @@ export class SectionProperties extends XmlComponent { this.root.push( new HeaderReference({ headerType: HeaderReferenceType.FIRST, - headerId: headers.first.Header.ReferenceId, + headerId: headers.first.View.ReferenceId, }), ); } @@ -163,7 +163,7 @@ export class SectionProperties extends XmlComponent { this.root.push( new HeaderReference({ headerType: HeaderReferenceType.EVEN, - headerId: headers.even.Header.ReferenceId, + headerId: headers.even.View.ReferenceId, }), ); } @@ -176,7 +176,7 @@ export class SectionProperties extends XmlComponent { this.root.push( new FooterReference({ footerType: FooterReferenceType.DEFAULT, - footerId: footers.default.Footer.ReferenceId, + footerId: footers.default.View.ReferenceId, }), ); } @@ -185,7 +185,7 @@ export class SectionProperties extends XmlComponent { this.root.push( new FooterReference({ footerType: FooterReferenceType.FIRST, - footerId: footers.first.Footer.ReferenceId, + footerId: footers.first.View.ReferenceId, }), ); } @@ -194,7 +194,7 @@ export class SectionProperties extends XmlComponent { this.root.push( new FooterReference({ footerType: FooterReferenceType.EVEN, - footerId: footers.even.Footer.ReferenceId, + footerId: footers.even.View.ReferenceId, }), ); } diff --git a/src/file/document/document.ts b/src/file/document/document.ts index 93d4035fa1..cc33709076 100644 --- a/src/file/document/document.ts +++ b/src/file/document/document.ts @@ -7,7 +7,7 @@ import { Body } from "./body"; import { DocumentAttributes } from "./document-attributes"; import { DocumentBackground, IDocumentBackgroundOptions } from "./document-background"; -interface IDocumentOptions { +export interface IDocumentOptions { readonly background: IDocumentBackgroundOptions; } diff --git a/src/file/file.spec.ts b/src/file/file.spec.ts index 9632b80897..952fd6a35c 100644 --- a/src/file/file.spec.ts +++ b/src/file/file.spec.ts @@ -18,7 +18,7 @@ describe("File", () => { children: [], }); - const tree = new Formatter().format(doc.Document.Body); + const tree = new Formatter().format(doc.Document.View.Body); expect(tree["w:body"][0]["w:sectPr"][4]["w:headerReference"]._attr["w:type"]).to.equal("default"); expect(tree["w:body"][0]["w:sectPr"][5]["w:footerReference"]._attr["w:type"]).to.equal("default"); @@ -37,7 +37,7 @@ describe("File", () => { children: [], }); - const tree = new Formatter().format(doc.Document.Body); + const tree = new Formatter().format(doc.Document.View.Body); expect(tree["w:body"][0]["w:sectPr"][4]["w:headerReference"]._attr["w:type"]).to.equal("default"); expect(tree["w:body"][0]["w:sectPr"][5]["w:footerReference"]._attr["w:type"]).to.equal("default"); @@ -56,7 +56,7 @@ describe("File", () => { children: [], }); - const tree = new Formatter().format(doc.Document.Body); + const tree = new Formatter().format(doc.Document.View.Body); expect(tree["w:body"][0]["w:sectPr"][5]["w:headerReference"]._attr["w:type"]).to.equal("first"); expect(tree["w:body"][0]["w:sectPr"][7]["w:footerReference"]._attr["w:type"]).to.equal("first"); @@ -79,7 +79,7 @@ describe("File", () => { children: [], }); - const tree = new Formatter().format(doc.Document.Body); + const tree = new Formatter().format(doc.Document.View.Body); expect(tree["w:body"][0]["w:sectPr"][4]["w:headerReference"]._attr["w:type"]).to.equal("default"); expect(tree["w:body"][0]["w:sectPr"][5]["w:headerReference"]._attr["w:type"]).to.equal("first"); @@ -97,7 +97,7 @@ describe("File", () => { }, ]); - const tree = new Formatter().format(doc.Document.Body); + const tree = new Formatter().format(doc.Document.View.Body); expect(tree).to.deep.equal({ "w:body": [ @@ -169,7 +169,7 @@ describe("File", () => { describe("#addSection", () => { it("should call the underlying document's add a Paragraph", () => { const file = new File(); - const spy = sinon.spy(file.Document, "add"); + const spy = sinon.spy(file.Document.View, "add"); file.addSection({ children: [new Paragraph({})], }); @@ -179,7 +179,7 @@ describe("File", () => { it("should call the underlying document's add when adding a Table", () => { const file = new File(); - const spy = sinon.spy(file.Document, "add"); + const spy = sinon.spy(file.Document.View, "add"); file.addSection({ children: [ new Table({ @@ -201,7 +201,7 @@ describe("File", () => { it("should call the underlying document's add when adding an Image (paragraph)", () => { const file = new File(); - const spy = sinon.spy(file.Document, "add"); + const spy = sinon.spy(file.Document.View, "add"); // tslint:disable-next-line:no-any file.addSection({ children: [new Paragraph("")], @@ -214,7 +214,7 @@ describe("File", () => { describe("#addSection", () => { it("should call the underlying document's add", () => { const file = new File(); - const spy = sinon.spy(file.Document, "add"); + const spy = sinon.spy(file.Document.View, "add"); file.addSection({ children: [new TableOfContents()], }); diff --git a/src/file/file.ts b/src/file/file.ts index 20d292f91b..9ec8316e9f 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -1,7 +1,7 @@ import { AppProperties } from "./app-properties/app-properties"; import { ContentTypes } from "./content-types/content-types"; import { CoreProperties, IPropertiesOptions } from "./core-properties"; -import { Document } from "./document"; +import { DocumentWrapper } from "./document-wrapper"; import { FooterReferenceType, HeaderReferenceType, @@ -46,10 +46,9 @@ export class File { // tslint:disable-next-line:readonly-keyword private currentRelationshipId: number = 1; - private readonly document: Document; + private readonly documentWrapper: DocumentWrapper; private readonly headers: IDocumentHeader[] = []; private readonly footers: IDocumentFooter[] = []; - private readonly docRelationships: Relationships; private readonly coreProperties: CoreProperties; private readonly numbering: Numbering; private readonly media: Media; @@ -77,12 +76,12 @@ export class File { config: [], }, ); - this.docRelationships = new Relationships(); + // this.documentWrapper.Relationships = new Relationships(); this.fileRelationships = new Relationships(); this.appProperties = new AppProperties(); this.footNotes = new FootNotes(); this.contentTypes = new ContentTypes(); - this.document = new Document({ background: options.background || {} }); + this.documentWrapper = new DocumentWrapper({ background: options.background || {} }); this.settings = new Settings({ compatabilityModeVersion: options.compatabilityModeVersion, }); @@ -130,10 +129,10 @@ export class File { } for (const section of sections) { - this.document.Body.addSection(section.properties ? section.properties : {}); + this.documentWrapper.View.Body.addSection(section.properties ? section.properties : {}); for (const child of section.children) { - this.document.add(child); + this.documentWrapper.View.add(child); } } @@ -158,7 +157,7 @@ export class File { properties, children, }: ISectionOptions): void { - this.document.Body.addSection({ + this.documentWrapper.View.Body.addSection({ ...properties, headers: { default: headers.default ? this.createHeader(headers.default) : this.createHeader(new Header()), @@ -175,12 +174,12 @@ export class File { }); for (const child of children) { - this.document.add(child); + this.documentWrapper.View.add(child); } } public verifyUpdateFields(): void { - if (this.document.getTablesOfContents().length) { + if (this.documentWrapper.View.getTablesOfContents().length) { this.settings.addUpdateFields(); } } @@ -209,8 +208,8 @@ export class File { private addHeaderToDocument(header: HeaderWrapper, type: HeaderReferenceType = HeaderReferenceType.DEFAULT): void { this.headers.push({ header, type }); - this.docRelationships.createRelationship( - header.Header.ReferenceId, + this.documentWrapper.Relationships.createRelationship( + header.View.ReferenceId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", `header${this.headers.length}.xml`, ); @@ -219,8 +218,8 @@ export class File { private addFooterToDocument(footer: FooterWrapper, type: FooterReferenceType = FooterReferenceType.DEFAULT): void { this.footers.push({ footer, type }); - this.docRelationships.createRelationship( - footer.Footer.ReferenceId, + this.documentWrapper.Relationships.createRelationship( + footer.View.ReferenceId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", `footer${this.footers.length}.xml`, ); @@ -244,30 +243,30 @@ export class File { "docProps/app.xml", ); - this.docRelationships.createRelationship( + this.documentWrapper.Relationships.createRelationship( this.currentRelationshipId++, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", "styles.xml", ); - this.docRelationships.createRelationship( + this.documentWrapper.Relationships.createRelationship( this.currentRelationshipId++, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", "numbering.xml", ); - this.docRelationships.createRelationship( + this.documentWrapper.Relationships.createRelationship( this.currentRelationshipId++, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", "footnotes.xml", ); - this.docRelationships.createRelationship( + this.documentWrapper.Relationships.createRelationship( this.currentRelationshipId++, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", "settings.xml", ); } - public get Document(): Document { - return this.document; + public get Document(): DocumentWrapper { + return this.documentWrapper; } public get Styles(): Styles { @@ -286,10 +285,6 @@ export class File { return this.media; } - public get DocumentRelationships(): Relationships { - return this.docRelationships; - } - public get FileRelationships(): Relationships { return this.fileRelationships; } diff --git a/src/file/footer-wrapper.spec.ts b/src/file/footer-wrapper.spec.ts index 4f3e95acdb..2a32ad7968 100644 --- a/src/file/footer-wrapper.spec.ts +++ b/src/file/footer-wrapper.spec.ts @@ -10,7 +10,7 @@ describe("FooterWrapper", () => { describe("#add", () => { it("should call the underlying footer's addParagraph", () => { const file = new FooterWrapper(new Media(), 1); - const spy = sinon.spy(file.Footer, "add"); + const spy = sinon.spy(file.View, "add"); file.add(new Paragraph({})); expect(spy.called).to.equal(true); @@ -18,7 +18,7 @@ describe("FooterWrapper", () => { it("should call the underlying footer's addParagraph", () => { const file = new FooterWrapper(new Media(), 1); - const spy = sinon.spy(file.Footer, "add"); + const spy = sinon.spy(file.View, "add"); file.add( new Table({ rows: [ @@ -40,7 +40,7 @@ describe("FooterWrapper", () => { describe("#addChildElement", () => { it("should call the underlying footer's addChildElement", () => { const file = new FooterWrapper(new Media(), 1); - const spy = sinon.spy(file.Footer, "addChildElement"); + const spy = sinon.spy(file.View, "addChildElement"); // tslint:disable-next-line:no-any file.addChildElement({} as any); diff --git a/src/file/footer-wrapper.ts b/src/file/footer-wrapper.ts index 8390887ba4..e16a72e974 100644 --- a/src/file/footer-wrapper.ts +++ b/src/file/footer-wrapper.ts @@ -1,6 +1,7 @@ import { XmlComponent } from "file/xml-components"; import { FooterReferenceType } from "./document"; +import { IViewWrapper } from "./document-wrapper"; import { Footer } from "./footer/footer"; import { Media } from "./media"; import { Paragraph } from "./paragraph"; @@ -12,7 +13,7 @@ export interface IDocumentFooter { readonly type: FooterReferenceType; } -export class FooterWrapper { +export class FooterWrapper implements IViewWrapper { private readonly footer: Footer; private readonly relationships: Relationships; @@ -29,7 +30,7 @@ export class FooterWrapper { this.footer.addChildElement(childElement); } - public get Footer(): Footer { + public get View(): Footer { return this.footer; } diff --git a/src/file/header-wrapper.spec.ts b/src/file/header-wrapper.spec.ts index 00ee776a95..c6a7272d16 100644 --- a/src/file/header-wrapper.spec.ts +++ b/src/file/header-wrapper.spec.ts @@ -10,7 +10,7 @@ describe("HeaderWrapper", () => { describe("#add", () => { it("should call the underlying header's addChildElement for Paragraph", () => { const wrapper = new HeaderWrapper(new Media(), 1); - const spy = sinon.spy(wrapper.Header, "add"); + const spy = sinon.spy(wrapper.View, "add"); wrapper.add(new Paragraph({})); expect(spy.called).to.equal(true); @@ -18,7 +18,7 @@ describe("HeaderWrapper", () => { it("should call the underlying header's addChildElement for Table", () => { const wrapper = new HeaderWrapper(new Media(), 1); - const spy = sinon.spy(wrapper.Header, "add"); + const spy = sinon.spy(wrapper.View, "add"); wrapper.add( new Table({ rows: [ @@ -40,7 +40,7 @@ describe("HeaderWrapper", () => { describe("#addChildElement", () => { it("should call the underlying header's addChildElement", () => { const file = new HeaderWrapper(new Media(), 1); - const spy = sinon.spy(file.Header, "addChildElement"); + const spy = sinon.spy(file.View, "addChildElement"); // tslint:disable-next-line:no-any file.addChildElement({} as any); diff --git a/src/file/header-wrapper.ts b/src/file/header-wrapper.ts index 407399a8fe..945a9d674a 100644 --- a/src/file/header-wrapper.ts +++ b/src/file/header-wrapper.ts @@ -1,6 +1,7 @@ import { XmlComponent } from "file/xml-components"; import { HeaderReferenceType } from "./document"; +import { IViewWrapper } from "./document-wrapper"; import { Header } from "./header/header"; import { Media } from "./media"; import { Paragraph } from "./paragraph"; @@ -12,7 +13,7 @@ export interface IDocumentHeader { readonly type: HeaderReferenceType; } -export class HeaderWrapper { +export class HeaderWrapper implements IViewWrapper { private readonly header: Header; private readonly relationships: Relationships; @@ -31,7 +32,7 @@ export class HeaderWrapper { this.header.addChildElement(childElement); } - public get Header(): Header { + public get View(): Header { return this.header; } diff --git a/src/file/media/media.ts b/src/file/media/media.ts index 6168fbc362..65a7f1bf58 100644 --- a/src/file/media/media.ts +++ b/src/file/media/media.ts @@ -1,14 +1,12 @@ import { IDrawingOptions } from "../drawing"; import { File } from "../file"; -import { FooterWrapper } from "../footer-wrapper"; -import { HeaderWrapper } from "../header-wrapper"; import { PictureRun } from "../paragraph"; import { IMediaData } from "./data"; // import { Image } from "./image"; export class Media { public static addImage( - file: File | HeaderWrapper | FooterWrapper, + file: File, buffer: Buffer | string | Uint8Array | ArrayBuffer, width?: number, height?: number, diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index 57590f6313..211697b850 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -804,8 +804,10 @@ describe("Paragraph", () => { ], }); const fileMock = ({ - DocumentRelationships: { - createRelationship: () => ({}), + Document: { + Relationships: { + createRelationship: () => ({}), + }, }, } as unknown) as File; paragraph.prepForXml(fileMock); diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index dcaf2c480d..2e75c77f4e 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -79,7 +79,7 @@ export class Paragraph extends XmlComponent { if (element instanceof ExternalHyperlink) { const index = this.root.indexOf(element); const concreteHyperlink = new ConcreteHyperlink(element.options.child, shortid.generate().toLowerCase()); - file.DocumentRelationships.createRelationship( + file.Document.Relationships.createRelationship( concreteHyperlink.linkId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", element.options.link, From c6e9696be0a64bd879772ee91134deea63f4f889 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 1 Mar 2021 03:28:35 +0000 Subject: [PATCH 241/260] #532 Make hyperlinks work on the Header and Footer --- demo/35-hyperlinks.ts | 20 ++++++++++++++- src/export/formatter.ts | 4 +-- src/export/packer/next-compiler.ts | 32 ++++++++++++------------ src/file/document/body/body.ts | 5 ++-- src/file/paragraph/paragraph.spec.ts | 10 +++----- src/file/paragraph/paragraph.ts | 6 ++--- src/file/table/table-cell/table-cell.ts | 4 +-- src/file/xml-components/base.ts | 4 +-- src/file/xml-components/xml-component.ts | 4 +-- 9 files changed, 53 insertions(+), 36 deletions(-) diff --git a/demo/35-hyperlinks.ts b/demo/35-hyperlinks.ts index 85fa5fc1f3..c9ef863aa4 100644 --- a/demo/35-hyperlinks.ts +++ b/demo/35-hyperlinks.ts @@ -1,7 +1,7 @@ // Example on how to add hyperlinks to websites // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { ExternalHyperlink, Document, Packer, Paragraph, Media, TextRun, Footer } from "../build"; +import { Document, ExternalHyperlink, Footer, Media, Packer, Paragraph, TextRun } from "../build"; const doc = new Document({}); @@ -26,6 +26,24 @@ doc.addSection({ ], }), }, + headers: { + default: new Footer({ + children: [ + new Paragraph({ + children: [ + new TextRun("Click here for the "), + new ExternalHyperlink({ + child: new TextRun({ + text: "Header external hyperlink", + style: "Hyperlink", + }), + link: "http://www.google.com", + }), + ], + }), + ], + }), + }, children: [ new Paragraph({ children: [ diff --git a/src/export/formatter.ts b/src/export/formatter.ts index b863ea4b97..a91702212e 100644 --- a/src/export/formatter.ts +++ b/src/export/formatter.ts @@ -1,8 +1,8 @@ +import { IViewWrapper } from "file/document-wrapper"; import { BaseXmlComponent, IXmlableObject } from "file/xml-components"; -import { File } from "../file"; export class Formatter { - public format(input: BaseXmlComponent, file?: File): IXmlableObject { + public format(input: BaseXmlComponent, file?: IViewWrapper): IXmlableObject { const output = input.prepForXml(file); if (output) { diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index a0c73090fc..aed3951ab5 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -71,7 +71,7 @@ export class Compiler { file.verifyUpdateFields(); const documentRelationshipCount = file.Document.Relationships.RelationshipCount + 1; - const documentXmlData = xml(this.formatter.format(file.Document.View, file), prettify); + const documentXmlData = xml(this.formatter.format(file.Document.View, file.Document), prettify); const documentMediaDatas = this.imageReplacer.getMediaData(documentXmlData, file.Media); return { @@ -85,7 +85,7 @@ export class Compiler { ); }); - return xml(this.formatter.format(file.Document.Relationships, file), prettify); + return xml(this.formatter.format(file.Document.Relationships, file.Document), prettify); })(), path: "word/_rels/document.xml.rels", }, @@ -99,11 +99,11 @@ export class Compiler { path: "word/document.xml", }, Styles: { - data: xml(this.formatter.format(file.Styles, file), prettify), + data: xml(this.formatter.format(file.Styles, file.Document), prettify), path: "word/styles.xml", }, Properties: { - data: xml(this.formatter.format(file.CoreProperties, file), { + data: xml(this.formatter.format(file.CoreProperties, file.Document), { declaration: { standalone: "yes", encoding: "UTF-8", @@ -112,15 +112,15 @@ export class Compiler { path: "docProps/core.xml", }, Numbering: { - data: xml(this.formatter.format(file.Numbering, file), prettify), + data: xml(this.formatter.format(file.Numbering, file.Document), prettify), path: "word/numbering.xml", }, FileRelationships: { - data: xml(this.formatter.format(file.FileRelationships, file), prettify), + data: xml(this.formatter.format(file.FileRelationships, file.Document), prettify), path: "_rels/.rels", }, HeaderRelationships: file.Headers.map((headerWrapper, index) => { - const xmlData = xml(this.formatter.format(headerWrapper.View, file), prettify); + const xmlData = xml(this.formatter.format(headerWrapper.View, headerWrapper), prettify); const mediaDatas = this.imageReplacer.getMediaData(xmlData, file.Media); mediaDatas.forEach((mediaData, i) => { @@ -132,12 +132,12 @@ export class Compiler { }); return { - data: xml(this.formatter.format(headerWrapper.Relationships, file), prettify), + data: xml(this.formatter.format(headerWrapper.Relationships, headerWrapper), prettify), path: `word/_rels/header${index + 1}.xml.rels`, }; }), FooterRelationships: file.Footers.map((footerWrapper, index) => { - const xmlData = xml(this.formatter.format(footerWrapper.View, file), prettify); + const xmlData = xml(this.formatter.format(footerWrapper.View, footerWrapper), prettify); const mediaDatas = this.imageReplacer.getMediaData(xmlData, file.Media); mediaDatas.forEach((mediaData, i) => { @@ -149,12 +149,12 @@ export class Compiler { }); return { - data: xml(this.formatter.format(footerWrapper.Relationships, file), prettify), + data: xml(this.formatter.format(footerWrapper.Relationships, footerWrapper), prettify), path: `word/_rels/footer${index + 1}.xml.rels`, }; }), Headers: file.Headers.map((headerWrapper, index) => { - const tempXmlData = xml(this.formatter.format(headerWrapper.View, file), prettify); + const tempXmlData = xml(this.formatter.format(headerWrapper.View, headerWrapper), prettify); const mediaDatas = this.imageReplacer.getMediaData(tempXmlData, file.Media); // TODO: 0 needs to be changed when headers get relationships of their own const xmlData = this.imageReplacer.replace(tempXmlData, mediaDatas, 0); @@ -165,7 +165,7 @@ export class Compiler { }; }), Footers: file.Footers.map((footerWrapper, index) => { - const tempXmlData = xml(this.formatter.format(footerWrapper.View, file), prettify); + const tempXmlData = xml(this.formatter.format(footerWrapper.View, footerWrapper), prettify); const mediaDatas = this.imageReplacer.getMediaData(tempXmlData, file.Media); // TODO: 0 needs to be changed when headers get relationships of their own const xmlData = this.imageReplacer.replace(tempXmlData, mediaDatas, 0); @@ -176,19 +176,19 @@ export class Compiler { }; }), ContentTypes: { - data: xml(this.formatter.format(file.ContentTypes, file), prettify), + data: xml(this.formatter.format(file.ContentTypes, file.Document), prettify), path: "[Content_Types].xml", }, AppProperties: { - data: xml(this.formatter.format(file.AppProperties, file), prettify), + data: xml(this.formatter.format(file.AppProperties, file.Document), prettify), path: "docProps/app.xml", }, FootNotes: { - data: xml(this.formatter.format(file.FootNotes, file), prettify), + data: xml(this.formatter.format(file.FootNotes, file.Document), prettify), path: "word/footnotes.xml", }, Settings: { - data: xml(this.formatter.format(file.Settings, file), prettify), + data: xml(this.formatter.format(file.Settings, file.Document), prettify), path: "word/settings.xml", }, }; diff --git a/src/file/document/body/body.ts b/src/file/document/body/body.ts index ea0d24a448..4b0e588809 100644 --- a/src/file/document/body/body.ts +++ b/src/file/document/body/body.ts @@ -1,6 +1,7 @@ +import { IViewWrapper } from "file/document-wrapper"; import { IXmlableObject, XmlComponent } from "file/xml-components"; + import { Paragraph, ParagraphProperties, TableOfContents } from "../.."; -import { File } from "../../../file"; import { SectionProperties, SectionPropertiesOptions } from "./section-properties/section-properties"; export class Body extends XmlComponent { @@ -25,7 +26,7 @@ export class Body extends XmlComponent { this.sections.push(new SectionProperties(options)); } - public prepForXml(file?: File): IXmlableObject | undefined { + public prepForXml(file?: IViewWrapper): IXmlableObject | undefined { if (this.sections.length === 1) { this.root.splice(0, 1); this.root.push(this.sections.pop() as SectionProperties); diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index 211697b850..4302801a01 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -5,7 +5,7 @@ import { stub } from "sinon"; import { Formatter } from "export/formatter"; import { EMPTY_OBJECT } from "file/xml-components"; -import { File } from "../file"; +import { IViewWrapper } from "../document-wrapper"; import { ShadingType } from "../table/shading"; import { AlignmentType, HeadingLevel, LeaderType, PageBreak, TabStopPosition, TabStopType } from "./formatting"; import { Bookmark, ExternalHyperlink } from "./links"; @@ -804,12 +804,10 @@ describe("Paragraph", () => { ], }); const fileMock = ({ - Document: { - Relationships: { - createRelationship: () => ({}), - }, + Relationships: { + createRelationship: () => ({}), }, - } as unknown) as File; + } as unknown) as IViewWrapper; paragraph.prepForXml(fileMock); const tree = new Formatter().format(paragraph); expect(tree).to.deep.equal({ diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index 2e75c77f4e..7c05ee711c 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -4,7 +4,7 @@ import * as shortid from "shortid"; import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run"; import { IXmlableObject, XmlComponent } from "file/xml-components"; -import { File } from "../file"; +import { IViewWrapper } from "../document-wrapper"; import { TargetModeType } from "../relationships/relationship/relationship"; import { DeletedTextRun, InsertedTextRun } from "../track-revision"; import { PageBreak } from "./formatting/page-break"; @@ -74,12 +74,12 @@ export class Paragraph extends XmlComponent { } } - public prepForXml(file: File): IXmlableObject | undefined { + public prepForXml(file: IViewWrapper): IXmlableObject | undefined { for (const element of this.root) { if (element instanceof ExternalHyperlink) { const index = this.root.indexOf(element); const concreteHyperlink = new ConcreteHyperlink(element.options.child, shortid.generate().toLowerCase()); - file.Document.Relationships.createRelationship( + file.Relationships.createRelationship( concreteHyperlink.linkId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", element.options.link, diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index 6fbd748cf5..e598888f83 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -1,9 +1,9 @@ // http://officeopenxml.com/WPtableGrid.php +import { IViewWrapper } from "file/document-wrapper"; import { Paragraph } from "file/paragraph"; import { BorderStyle } from "file/styles"; import { IXmlableObject, XmlComponent } from "file/xml-components"; -import { File } from "../../file"; import { ITableShadingAttributesProperties } from "../shading"; import { Table } from "../table"; import { ITableCellMarginOptions } from "./cell-margin/table-cell-margins"; @@ -115,7 +115,7 @@ export class TableCell extends XmlComponent { } } - public prepForXml(file?: File): IXmlableObject | undefined { + public prepForXml(file?: IViewWrapper): IXmlableObject | undefined { // Cells must end with a paragraph if (!(this.root[this.root.length - 1] instanceof Paragraph)) { this.root.push(new Paragraph({})); diff --git a/src/file/xml-components/base.ts b/src/file/xml-components/base.ts index 782dfdba12..4bb37c8ad9 100644 --- a/src/file/xml-components/base.ts +++ b/src/file/xml-components/base.ts @@ -1,4 +1,4 @@ -import { File } from "../file"; +import { IViewWrapper } from "../document-wrapper"; import { IXmlableObject } from "./xmlable-object"; export abstract class BaseXmlComponent { @@ -10,7 +10,7 @@ export abstract class BaseXmlComponent { this.rootKey = rootKey; } - public abstract prepForXml(file?: File): IXmlableObject | undefined; + public abstract prepForXml(file?: IViewWrapper): IXmlableObject | undefined; public get IsDeleted(): boolean { return this.deleted; diff --git a/src/file/xml-components/xml-component.ts b/src/file/xml-components/xml-component.ts index b06f73b930..84fd5f98e4 100644 --- a/src/file/xml-components/xml-component.ts +++ b/src/file/xml-components/xml-component.ts @@ -1,4 +1,4 @@ -import { File } from "../file"; +import { IViewWrapper } from "../document-wrapper"; import { BaseXmlComponent } from "./base"; import { IXmlableObject } from "./xmlable-object"; @@ -13,7 +13,7 @@ export abstract class XmlComponent extends BaseXmlComponent { this.root = new Array(); } - public prepForXml(file?: File): IXmlableObject | undefined { + public prepForXml(file?: IViewWrapper): IXmlableObject | undefined { const children = this.root .filter((c) => { if (c instanceof BaseXmlComponent) { From 8435ece00dffc219f99e1df738a58746e72ffdd1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 11:54:10 +0000 Subject: [PATCH 242/260] build(deps-dev): bump typedoc from 0.16.11 to 0.19.0 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.16.11 to 0.19.0. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.16.11...v0.19.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 168 +++++++++++++++++++--------------------------- package.json | 2 +- 2 files changed, 70 insertions(+), 100 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6d7d1eef60..d5c518d57a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -559,12 +559,6 @@ "jszip": "*" } }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, "@types/mocha": { "version": "8.2.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.1.tgz", @@ -1076,6 +1070,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -1246,15 +1246,6 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, - "backbone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", - "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", - "dev": true, - "requires": { - "underscore": ">=1.8.3" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -4066,9 +4057,9 @@ "dev": true }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { "minimist": "^1.2.5", @@ -4083,12 +4074,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true } } }, @@ -4238,9 +4223,9 @@ "dev": true }, "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.6.0.tgz", + "integrity": "sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==", "dev": true }, "hmac-drbg": { @@ -4854,12 +4839,6 @@ "istanbul-lib-report": "^3.0.0" } }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", - "dev": true - }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -4884,7 +4863,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -5241,9 +5220,9 @@ } }, "lunr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", - "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, "make-dir": { @@ -8093,60 +8072,64 @@ } }, "typedoc": { - "version": "0.16.11", - "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", - "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", + "version": "0.19.0", + "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.19.0.tgz", + "integrity": "sha512-Rn68JwgDDYyIWl3HXeSsLZcsvxd2anISjhKu64PvID7RETeS2Iwnc4cH60yqc8/N50Xo1d3MHPGYinCPhMMliQ==", "dev": true, "requires": { - "@types/minimatch": "3.0.3", - "fs-extra": "^8.1.0", - "handlebars": "^4.7.2", - "highlight.js": "^9.17.1", - "lodash": "^4.17.15", - "marked": "^0.8.0", + "fs-extra": "^9.0.1", + "handlebars": "^4.7.6", + "highlight.js": "^10.0.0", + "lodash": "^4.17.20", + "lunr": "^2.3.9", + "marked": "^1.1.1", "minimatch": "^3.0.0", "progress": "^2.0.3", - "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.7.2", - "typescript": "3.7.x" + "shelljs": "^0.8.4", + "typedoc-default-themes": "^0.11.1" }, "dependencies": { - "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } }, - "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true } } }, "typedoc-default-themes": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", - "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", - "dev": true, - "requires": { - "backbone": "^1.4.0", - "jquery": "^3.4.1", - "lunr": "^2.3.8", - "underscore": "^1.9.1" - } + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.11.4.tgz", + "integrity": "sha512-Y4Lf+qIb9NTydrexlazAM46SSLrmrQRqWiD52593g53SsmUFioAsMWt8m834J6qsp+7wHRjxCXSZeiiW5cMUdw==", + "dev": true }, "typescript": { "version": "4.2.2", @@ -8155,24 +8138,11 @@ "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "version": "3.12.8", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.8.tgz", + "integrity": "sha512-fvBeuXOsvqjecUtF/l1dwsrrf5y2BCUk9AOJGzGcm6tE7vegku5u/YvqjyDaAGr422PLoLnrxg3EnRvTqsdC1w==", "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - } - } + "optional": true }, "uglify-to-browserify": { "version": "1.0.2", @@ -8252,12 +8222,6 @@ } } }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -8995,6 +8959,12 @@ } } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", diff --git a/package.json b/package.json index 1671bfdfb3..9db7e34f55 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "ts-node": "^9.0.0", "tslint": "^6.1.3", "tslint-immutable": "^6.0.1", - "typedoc": "^0.16.11", + "typedoc": "^0.19.0", "typescript": "4.2.2", "webpack": "^3.10.0" }, From dd503996a0a9ac67f57eb57043465ea9cd5469da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 19:48:23 +0000 Subject: [PATCH 243/260] build(deps): bump docsify from 4.11.6 to 4.12.0 Bumps [docsify](https://github.com/docsifyjs/docsify) from 4.11.6 to 4.12.0. - [Release notes](https://github.com/docsifyjs/docsify/releases) - [Changelog](https://github.com/docsifyjs/docsify/blob/develop/CHANGELOG.md) - [Commits](https://github.com/docsifyjs/docsify/compare/v4.11.6...v4.12.0) Signed-off-by: dependabot[bot] --- package-lock.json | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5c518d57a..bad5fe5e17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2343,19 +2343,42 @@ } }, "docsify": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.11.6.tgz", - "integrity": "sha512-6h3hB2Ni7gpOeu1fl1sDOmufuplIDmeFHsps17Qbg9VOS3h2tJ63FiW2w5oAydGyzaLrqu58FV7Mg4b6p0z9mg==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.12.0.tgz", + "integrity": "sha512-oLr48dLeJ8sTVQfL8HLFqd2sPPG8DNAOvYAXXJQr/+/K9uC2KDhoeu+GGj5U2uFGR5czF3oLvqNBxhEElg1wGw==", "dev": true, "requires": { - "dompurify": "^2.0.8", - "marked": "^1.1.1", + "dompurify": "^2.2.6", + "marked": "^1.2.9", "medium-zoom": "^1.0.6", "opencollective-postinstall": "^2.0.2", - "prismjs": "^1.19.0", + "prismjs": "^1.23.0", "strip-indent": "^3.0.0", "tinydate": "^1.3.0", "tweezer.js": "^1.4.0" + }, + "dependencies": { + "dompurify": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", + "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==", + "dev": true + }, + "marked": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz", + "integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==", + "dev": true + }, + "prismjs": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz", + "integrity": "sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==", + "dev": true, + "requires": { + "clipboard": "^2.0.0" + } + } } }, "docsify-cli": { @@ -6505,15 +6528,6 @@ "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, - "prismjs": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.22.0.tgz", - "integrity": "sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==", - "dev": true, - "requires": { - "clipboard": "^2.0.0" - } - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", From f90e84a88d7dbefabb7cc3befe0ae043ee9a1870 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 1 Mar 2021 23:35:52 +0000 Subject: [PATCH 244/260] #627 Add footnotes relationships --- demo/35-hyperlinks.ts | 20 +++++++- src/export/packer/next-compiler.spec.ts | 7 +-- src/export/packer/next-compiler.ts | 7 ++- src/file/document-wrapper.spec.ts | 52 ++++---------------- src/file/document-wrapper.ts | 3 +- src/file/file.spec.ts | 2 +- src/file/file.ts | 13 +++-- src/file/footnotes-wrapper.spec.ts | 16 ++++++ src/file/footnotes-wrapper.ts | 21 ++++++++ src/file/footnotes/footnote/footnote.spec.ts | 9 +++- src/file/footnotes/footnote/footnote.ts | 11 +++-- src/file/footnotes/footnotes.ts | 12 +++-- 12 files changed, 107 insertions(+), 66 deletions(-) create mode 100644 src/file/footnotes-wrapper.spec.ts create mode 100644 src/file/footnotes-wrapper.ts diff --git a/demo/35-hyperlinks.ts b/demo/35-hyperlinks.ts index c9ef863aa4..3e45e4c342 100644 --- a/demo/35-hyperlinks.ts +++ b/demo/35-hyperlinks.ts @@ -1,9 +1,24 @@ // Example on how to add hyperlinks to websites // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, ExternalHyperlink, Footer, Media, Packer, Paragraph, TextRun } from "../build"; +import { Document, ExternalHyperlink, Footer, FootnoteReferenceRun, Media, Packer, Paragraph, TextRun } from "../build"; -const doc = new Document({}); +const doc = new Document({ + footnotes: [ + new Paragraph({ + children: [ + new TextRun("Click here for the "), + new ExternalHyperlink({ + child: new TextRun({ + text: "Footnotes external hyperlink", + style: "Hyperlink", + }), + link: "http://www.example.com", + }), + ], + }), + ], +}); const image1 = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg")); @@ -54,6 +69,7 @@ doc.addSection({ }), link: "http://www.example.com", }), + new FootnoteReferenceRun(1) ], }), new Paragraph({ diff --git a/src/export/packer/next-compiler.spec.ts b/src/export/packer/next-compiler.spec.ts index 7c9bcda904..b96492827c 100644 --- a/src/export/packer/next-compiler.spec.ts +++ b/src/export/packer/next-compiler.spec.ts @@ -22,13 +22,14 @@ describe("Compiler", () => { const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); - expect(fileNames).has.length(14); + expect(fileNames).has.length(15); expect(fileNames).to.include("word/document.xml"); expect(fileNames).to.include("word/styles.xml"); expect(fileNames).to.include("docProps/core.xml"); expect(fileNames).to.include("docProps/app.xml"); expect(fileNames).to.include("word/numbering.xml"); expect(fileNames).to.include("word/footnotes.xml"); + expect(fileNames).to.include("word/_rels/footnotes.xml.rels"); expect(fileNames).to.include("word/settings.xml"); expect(fileNames).to.include("word/_rels/document.xml.rels"); expect(fileNames).to.include("[Content_Types].xml"); @@ -62,7 +63,7 @@ describe("Compiler", () => { const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); - expect(fileNames).has.length(22); + expect(fileNames).has.length(23); expect(fileNames).to.include("word/header1.xml"); expect(fileNames).to.include("word/_rels/header1.xml.rels"); @@ -88,7 +89,7 @@ describe("Compiler", () => { const spy = sinon.spy(compiler["formatter"], "format"); compiler.compile(file); - expect(spy.callCount).to.equal(10); + expect(spy.callCount).to.equal(11); }); }); }); diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index aed3951ab5..29469f8910 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -25,6 +25,7 @@ interface IXmlifyedFileMapping { readonly ContentTypes: IXmlifyedFile; readonly AppProperties: IXmlifyedFile; readonly FootNotes: IXmlifyedFile; + readonly FootNotesRelationships: IXmlifyedFile; readonly Settings: IXmlifyedFile; } @@ -184,9 +185,13 @@ export class Compiler { path: "docProps/app.xml", }, FootNotes: { - data: xml(this.formatter.format(file.FootNotes, file.Document), prettify), + data: xml(this.formatter.format(file.FootNotes.View, file.FootNotes), prettify), path: "word/footnotes.xml", }, + FootNotesRelationships: { + data: xml(this.formatter.format(file.FootNotes.Relationships, file.FootNotes), prettify), + path: "word/_rels/footnotes.xml.rels", + }, Settings: { data: xml(this.formatter.format(file.Settings, file.Document), prettify), path: "word/settings.xml", diff --git a/src/file/document-wrapper.spec.ts b/src/file/document-wrapper.spec.ts index 2a32ad7968..344fded379 100644 --- a/src/file/document-wrapper.spec.ts +++ b/src/file/document-wrapper.spec.ts @@ -1,50 +1,16 @@ import { expect } from "chai"; -import * as sinon from "sinon"; -import { FooterWrapper } from "./footer-wrapper"; -import { Media } from "./media"; -import { Paragraph } from "./paragraph"; -import { Table, TableCell, TableRow } from "./table"; +import { DocumentWrapper } from "./document-wrapper"; -describe("FooterWrapper", () => { - describe("#add", () => { - it("should call the underlying footer's addParagraph", () => { - const file = new FooterWrapper(new Media(), 1); - const spy = sinon.spy(file.View, "add"); - file.add(new Paragraph({})); +describe("DocumentWrapper", () => { + describe("#constructor", () => { + it("should create", () => { + const file = new DocumentWrapper({ background: {} }); - expect(spy.called).to.equal(true); - }); - - it("should call the underlying footer's addParagraph", () => { - const file = new FooterWrapper(new Media(), 1); - const spy = sinon.spy(file.View, "add"); - file.add( - new Table({ - rows: [ - new TableRow({ - children: [ - new TableCell({ - children: [new Paragraph("hello")], - }), - ], - }), - ], - }), - ); - - expect(spy.called).to.equal(true); - }); - }); - - describe("#addChildElement", () => { - it("should call the underlying footer's addChildElement", () => { - const file = new FooterWrapper(new Media(), 1); - const spy = sinon.spy(file.View, "addChildElement"); - // tslint:disable-next-line:no-any - file.addChildElement({} as any); - - expect(spy.called).to.equal(true); + // tslint:disable-next-line: no-unused-expression + expect(file.View).to.be.ok; + // tslint:disable-next-line: no-unused-expression + expect(file.Relationships).to.be.ok; }); }); }); diff --git a/src/file/document-wrapper.ts b/src/file/document-wrapper.ts index 3054f2c30e..a699136727 100644 --- a/src/file/document-wrapper.ts +++ b/src/file/document-wrapper.ts @@ -1,10 +1,11 @@ import { Document, IDocumentOptions } from "./document"; import { Footer } from "./footer"; +import { FootNotes } from "./footnotes"; import { Header } from "./header/header"; import { Relationships } from "./relationships"; export interface IViewWrapper { - readonly View: Document | Footer | Header; + readonly View: Document | Footer | Header | FootNotes; readonly Relationships: Relationships; } diff --git a/src/file/file.spec.ts b/src/file/file.spec.ts index 952fd6a35c..3fc389e4bf 100644 --- a/src/file/file.spec.ts +++ b/src/file/file.spec.ts @@ -242,7 +242,7 @@ describe("File", () => { footnotes: [new Paragraph("hello")], }); - const tree = new Formatter().format(wrapper.FootNotes); + const tree = new Formatter().format(wrapper.FootNotes.View); expect(tree).to.deep.equal({ "w:footnotes": [ diff --git a/src/file/file.ts b/src/file/file.ts index 9ec8316e9f..57cbc069c8 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -11,7 +11,7 @@ import { import { IPageMarginAttributes } from "./document/body/section-properties/page-margin/page-margin-attributes"; import { IFileProperties } from "./file-properties"; import { FooterWrapper, IDocumentFooter } from "./footer-wrapper"; -import { FootNotes } from "./footnotes"; +import { FootnotesWrapper } from "./footnotes-wrapper"; import { Footer, Header } from "./header"; import { HeaderWrapper, IDocumentHeader } from "./header-wrapper"; import { Media } from "./media"; @@ -53,7 +53,7 @@ export class File { private readonly numbering: Numbering; private readonly media: Media; private readonly fileRelationships: Relationships; - private readonly footNotes: FootNotes; + private readonly footnotesWrapper: FootnotesWrapper; private readonly settings: Settings; private readonly contentTypes: ContentTypes; private readonly appProperties: AppProperties; @@ -76,10 +76,9 @@ export class File { config: [], }, ); - // this.documentWrapper.Relationships = new Relationships(); this.fileRelationships = new Relationships(); this.appProperties = new AppProperties(); - this.footNotes = new FootNotes(); + this.footnotesWrapper = new FootnotesWrapper(); this.contentTypes = new ContentTypes(); this.documentWrapper = new DocumentWrapper({ background: options.background || {} }); this.settings = new Settings({ @@ -138,7 +137,7 @@ export class File { if (options.footnotes) { for (const paragraph of options.footnotes) { - this.footNotes.createFootNote(paragraph); + this.footnotesWrapper.View.createFootNote(paragraph); } } @@ -305,8 +304,8 @@ export class File { return this.appProperties; } - public get FootNotes(): FootNotes { - return this.footNotes; + public get FootNotes(): FootnotesWrapper { + return this.footnotesWrapper; } public get Settings(): Settings { diff --git a/src/file/footnotes-wrapper.spec.ts b/src/file/footnotes-wrapper.spec.ts new file mode 100644 index 0000000000..6427de6ee6 --- /dev/null +++ b/src/file/footnotes-wrapper.spec.ts @@ -0,0 +1,16 @@ +import { expect } from "chai"; + +import { FootnotesWrapper } from "./footnotes-wrapper"; + +describe("FootnotesWrapper", () => { + describe("#constructor", () => { + it("should create", () => { + const file = new FootnotesWrapper(); + + // tslint:disable-next-line: no-unused-expression + expect(file.View).to.be.ok; + // tslint:disable-next-line: no-unused-expression + expect(file.Relationships).to.be.ok; + }); + }); +}); diff --git a/src/file/footnotes-wrapper.ts b/src/file/footnotes-wrapper.ts new file mode 100644 index 0000000000..c76a8957c2 --- /dev/null +++ b/src/file/footnotes-wrapper.ts @@ -0,0 +1,21 @@ +import { IViewWrapper } from "./document-wrapper"; +import { FootNotes } from "./footnotes/footnotes"; +import { Relationships } from "./relationships"; + +export class FootnotesWrapper implements IViewWrapper { + private readonly footnotess: FootNotes; + private readonly relationships: Relationships; + + constructor() { + this.footnotess = new FootNotes(); + this.relationships = new Relationships(); + } + + public get View(): FootNotes { + return this.footnotess; + } + + public get Relationships(): Relationships { + return this.relationships; + } +} diff --git a/src/file/footnotes/footnote/footnote.spec.ts b/src/file/footnotes/footnote/footnote.spec.ts index 8594cd75fd..49e497d988 100644 --- a/src/file/footnotes/footnote/footnote.spec.ts +++ b/src/file/footnotes/footnote/footnote.spec.ts @@ -7,7 +7,10 @@ import { Footnote, FootnoteType } from "./footnote"; describe("Footnote", () => { describe("#constructor", () => { it("should create a footnote with a footnote type", () => { - const footnote = new Footnote(1, FootnoteType.SEPERATOR); + const footnote = new Footnote({ + id: 1, + type: FootnoteType.SEPERATOR, + }); const tree = new Formatter().format(footnote); expect(Object.keys(tree)).to.deep.equal(["w:footnote"]); @@ -15,7 +18,9 @@ describe("Footnote", () => { }); it("should create a footnote without a footnote type", () => { - const footnote = new Footnote(1); + const footnote = new Footnote({ + id: 1, + }); const tree = new Formatter().format(footnote); expect(Object.keys(tree)).to.deep.equal(["w:footnote"]); diff --git a/src/file/footnotes/footnote/footnote.ts b/src/file/footnotes/footnote/footnote.ts index 60e6e533c8..4ef653ddfb 100644 --- a/src/file/footnotes/footnote/footnote.ts +++ b/src/file/footnotes/footnote/footnote.ts @@ -9,13 +9,18 @@ export enum FootnoteType { CONTINUATION_SEPERATOR = "continuationSeparator", } +export interface IFootnoteOptions { + readonly id: number; + readonly type?: FootnoteType; +} + export class Footnote extends XmlComponent { - constructor(id: number, type?: FootnoteType) { + constructor(options: IFootnoteOptions) { super("w:footnote"); this.root.push( new FootnoteAttributes({ - type: type, - id: id, + type: options.type, + id: options.id, }), ); } diff --git a/src/file/footnotes/footnotes.ts b/src/file/footnotes/footnotes.ts index 91ba1d199d..09ed315f4b 100644 --- a/src/file/footnotes/footnotes.ts +++ b/src/file/footnotes/footnotes.ts @@ -36,7 +36,10 @@ export class FootNotes extends XmlComponent { }), ); - const begin = new Footnote(-1, FootnoteType.SEPERATOR); + const begin = new Footnote({ + id: -1, + type: FootnoteType.SEPERATOR, + }); begin.add( new Paragraph({ spacing: { @@ -49,7 +52,10 @@ export class FootNotes extends XmlComponent { ); this.root.push(begin); - const spacing = new Footnote(0, FootnoteType.CONTINUATION_SEPERATOR); + const spacing = new Footnote({ + id: 0, + type: FootnoteType.CONTINUATION_SEPERATOR, + }); spacing.add( new Paragraph({ spacing: { @@ -64,7 +70,7 @@ export class FootNotes extends XmlComponent { } public createFootNote(paragraph: Paragraph): void { - const footnote = new Footnote(this.currentId); + const footnote = new Footnote({ id: this.currentId }); footnote.add(paragraph); this.root.push(footnote); From 3e58910bfc8ff1835dd94955bc935f49517de762 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 2 Mar 2021 00:06:11 +0000 Subject: [PATCH 245/260] Use document wrapper component --- src/export/packer/next-compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index 5f6b8183b0..275dd953d7 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -181,7 +181,7 @@ export class Compiler { path: "[Content_Types].xml", }, CustomProperties: { - data: xml(this.formatter.format(file.CustomProperties, file), prettify), + data: xml(this.formatter.format(file.CustomProperties, file.Document), prettify), path: "docProps/custom.xml", }, AppProperties: { From 9327f2bfa1691d2d20849d2798f5323d4282fc46 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 4 Mar 2021 01:30:42 +0000 Subject: [PATCH 246/260] Fix compiler tests --- src/export/packer/next-compiler.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/export/packer/next-compiler.spec.ts b/src/export/packer/next-compiler.spec.ts index bb7ff41ec3..d0dfbf08ae 100644 --- a/src/export/packer/next-compiler.spec.ts +++ b/src/export/packer/next-compiler.spec.ts @@ -22,7 +22,7 @@ describe("Compiler", () => { const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); - expect(fileNames).has.length(15); + expect(fileNames).has.length(16); expect(fileNames).to.include("word/document.xml"); expect(fileNames).to.include("word/styles.xml"); expect(fileNames).to.include("docProps/core.xml"); @@ -64,7 +64,7 @@ describe("Compiler", () => { const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); - expect(fileNames).has.length(23); + expect(fileNames).has.length(24); expect(fileNames).to.include("word/header1.xml"); expect(fileNames).to.include("word/_rels/header1.xml.rels"); @@ -90,7 +90,7 @@ describe("Compiler", () => { const spy = sinon.spy(compiler["formatter"], "format"); compiler.compile(file); - expect(spy.callCount).to.equal(11); + expect(spy.callCount).to.equal(12); }); }); }); From a026e5bd1fd99567c2fb1da882b609cfe89d0db1 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 4 Mar 2021 01:42:58 +0000 Subject: [PATCH 247/260] Make table internals declarative --- .../table-cell-margin.spec.ts | 68 ++++++++++++++----- .../table-properties/table-cell-margin.ts | 61 ++++++++++------- .../table-properties/table-properties.spec.ts | 63 ++++++++++++----- .../table-properties/table-properties.ts | 67 +++++++++--------- .../table/table-properties/table-width.ts | 2 +- src/file/table/table.ts | 59 ++++++++-------- 6 files changed, 195 insertions(+), 125 deletions(-) diff --git a/src/file/table/table-properties/table-cell-margin.spec.ts b/src/file/table/table-properties/table-cell-margin.spec.ts index 2a89db7a4a..814888adc0 100644 --- a/src/file/table/table-properties/table-cell-margin.spec.ts +++ b/src/file/table/table-properties/table-cell-margin.spec.ts @@ -8,22 +8,31 @@ import { TableCellMargin } from "./table-cell-margin"; describe("TableCellMargin", () => { describe("#constructor", () => { it("should throw an error if theres no child elements", () => { - const cellMargin = new TableCellMargin(); + const cellMargin = new TableCellMargin({}); expect(() => new Formatter().format(cellMargin)).to.throw(); }); }); describe("#addTopMargin", () => { it("should add a table cell top margin", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addTopMargin(1234, WidthType.DXA); + const cellMargin = new TableCellMargin({ + top: { + value: 1234, + type: WidthType.DXA, + }, + }); + const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:top": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); it("should add a table cell top margin using default width type", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addTopMargin(1234); + const cellMargin = new TableCellMargin({ + top: { + value: 1234, + }, + }); + const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:top": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); @@ -31,15 +40,22 @@ describe("TableCellMargin", () => { describe("#addLeftMargin", () => { it("should add a table cell left margin", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addLeftMargin(1234, WidthType.DXA); + const cellMargin = new TableCellMargin({ + left: { + value: 1234, + type: WidthType.DXA, + }, + }); const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:left": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); it("should add a table cell left margin using default width type", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addLeftMargin(1234); + const cellMargin = new TableCellMargin({ + left: { + value: 1234, + }, + }); const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:left": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); @@ -47,15 +63,24 @@ describe("TableCellMargin", () => { describe("#addBottomMargin", () => { it("should add a table cell bottom margin", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addBottomMargin(1234, WidthType.DXA); + const cellMargin = new TableCellMargin({ + bottom: { + value: 1234, + type: WidthType.DXA, + }, + }); + const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:bottom": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); it("should add a table cell bottom margin using default width type", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addBottomMargin(1234); + const cellMargin = new TableCellMargin({ + bottom: { + value: 1234, + }, + }); + const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:bottom": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); @@ -63,15 +88,24 @@ describe("TableCellMargin", () => { describe("#addRightMargin", () => { it("should add a table cell right margin", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addRightMargin(1234, WidthType.DXA); + const cellMargin = new TableCellMargin({ + right: { + value: 1234, + type: WidthType.DXA, + }, + }); + const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:right": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); it("should add a table cell right margin using default width type", () => { - const cellMargin = new TableCellMargin(); - cellMargin.addRightMargin(1234); + const cellMargin = new TableCellMargin({ + right: { + value: 1234, + }, + }); + const tree = new Formatter().format(cellMargin); expect(tree).to.deep.equal({ "w:tblCellMar": [{ "w:right": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }); }); diff --git a/src/file/table/table-properties/table-cell-margin.ts b/src/file/table/table-properties/table-cell-margin.ts index ebebb87bc3..6889b6f580 100644 --- a/src/file/table/table-properties/table-cell-margin.ts +++ b/src/file/table/table-properties/table-cell-margin.ts @@ -6,7 +6,23 @@ class TableCellMarginAttributes extends XmlAttributeComponent<{ readonly type: W protected readonly xmlKeys = { value: "w:w", type: "w:type" }; } +interface IBaseTableCellMarginOptions { + readonly value: number; + readonly type?: WidthType; +} + class BaseTableCellMargin extends XmlComponent { + constructor(rootKey: string, options: IBaseTableCellMarginOptions) { + super(rootKey); + + this.root.push( + new TableCellMarginAttributes({ + type: options.type ?? WidthType.DXA, + value: options.value, + }), + ); + } + public setProperties(value: number, type: WidthType = WidthType.DXA): void { this.root.push( new TableCellMarginAttributes({ @@ -17,36 +33,31 @@ class BaseTableCellMargin extends XmlComponent { } } +export interface ITableCellMarginOptions { + readonly top?: IBaseTableCellMarginOptions; + readonly bottom?: IBaseTableCellMarginOptions; + readonly left?: IBaseTableCellMarginOptions; + readonly right?: IBaseTableCellMarginOptions; +} + export class TableCellMargin extends IgnoreIfEmptyXmlComponent { - constructor() { + constructor(options: ITableCellMarginOptions) { super("w:tblCellMar"); - } - public addTopMargin(value: number, type: WidthType = WidthType.DXA): void { - const top = new BaseTableCellMargin("w:top"); + if (options.bottom) { + this.root.push(new BaseTableCellMargin("w:bottom", options.bottom)); + } - top.setProperties(value, type); - this.root.push(top); - } + if (options.top) { + this.root.push(new BaseTableCellMargin("w:top", options.top)); + } - public addLeftMargin(value: number, type: WidthType = WidthType.DXA): void { - const left = new BaseTableCellMargin("w:left"); + if (options.left) { + this.root.push(new BaseTableCellMargin("w:left", options.left)); + } - left.setProperties(value, type); - this.root.push(left); - } - - public addBottomMargin(value: number, type: WidthType = WidthType.DXA): void { - const bottom = new BaseTableCellMargin("w:bottom"); - - bottom.setProperties(value, type); - this.root.push(bottom); - } - - public addRightMargin(value: number, type: WidthType = WidthType.DXA): void { - const right = new BaseTableCellMargin("w:right"); - - right.setProperties(value, type); - this.root.push(right); + if (options.right) { + this.root.push(new BaseTableCellMargin("w:right", options.right)); + } } } diff --git a/src/file/table/table-properties/table-properties.spec.ts b/src/file/table/table-properties/table-properties.spec.ts index 1c10e09b6a..b06aadbe4b 100644 --- a/src/file/table/table-properties/table-properties.spec.ts +++ b/src/file/table/table-properties/table-properties.spec.ts @@ -11,7 +11,7 @@ import { TableProperties } from "./table-properties"; describe("TableProperties", () => { describe("#constructor", () => { it("creates an initially empty property object", () => { - const tp = new TableProperties(); + const tp = new TableProperties({}); // The TableProperties is ignorable if there are no attributes, // which results in prepForXml returning undefined, which causes // the formatter to throw an error if that is the only object it @@ -22,7 +22,12 @@ describe("TableProperties", () => { describe("#setWidth", () => { it("should add a table width property", () => { - const tp = new TableProperties().setWidth(1234, WidthType.DXA); + const tp = new TableProperties({ + width: { + size: 1234, + type: WidthType.DXA, + }, + }); const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [{ "w:tblW": { _attr: { "w:type": "dxa", "w:w": 1234 } } }], @@ -30,7 +35,12 @@ describe("TableProperties", () => { }); it("should add a table width property with default of AUTO", () => { - const tp = new TableProperties().setWidth(1234); + const tp = new TableProperties({ + width: { + size: 1234, + }, + }); + const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [{ "w:tblW": { _attr: { "w:type": "auto", "w:w": 1234 } } }], @@ -40,8 +50,10 @@ describe("TableProperties", () => { describe("#setLayout", () => { it("sets the table to fixed width layout", () => { - const tp = new TableProperties(); - tp.setLayout(TableLayoutType.FIXED); + const tp = new TableProperties({ + layout: TableLayoutType.FIXED, + }); + const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [{ "w:tblLayout": { _attr: { "w:type": "fixed" } } }], @@ -51,8 +63,15 @@ describe("TableProperties", () => { describe("#cellMargin", () => { it("adds a table cell top margin", () => { - const tp = new TableProperties(); - tp.CellMargin.addTopMargin(1234, WidthType.DXA); + const tp = new TableProperties({ + cellMargin: { + top: { + value: 1234, + type: WidthType.DXA, + }, + }, + }); + const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [{ "w:tblCellMar": [{ "w:top": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }], @@ -60,8 +79,15 @@ describe("TableProperties", () => { }); it("adds a table cell left margin", () => { - const tp = new TableProperties(); - tp.CellMargin.addLeftMargin(1234, WidthType.DXA); + const tp = new TableProperties({ + cellMargin: { + left: { + value: 1234, + type: WidthType.DXA, + }, + }, + }); + const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [{ "w:tblCellMar": [{ "w:left": { _attr: { "w:type": "dxa", "w:w": 1234 } } }] }], @@ -71,12 +97,14 @@ describe("TableProperties", () => { describe("#setShading", () => { it("sets the shading of the table", () => { - const tp = new TableProperties(); - tp.setShading({ - fill: "b79c2f", - val: ShadingType.REVERSE_DIAGONAL_STRIPE, - color: "auto", + const tp = new TableProperties({ + shading: { + fill: "b79c2f", + val: ShadingType.REVERSE_DIAGONAL_STRIPE, + color: "auto", + }, }); + const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [ @@ -95,9 +123,10 @@ describe("TableProperties", () => { }); describe("#setAlignment", () => { - it("sets the shading of the table", () => { - const tp = new TableProperties(); - tp.setAlignment(AlignmentType.CENTER); + it("sets the alignment of the table", () => { + const tp = new TableProperties({ + alignment: AlignmentType.CENTER, + }); const tree = new Formatter().format(tp); expect(tree).to.deep.equal({ "w:tblPr": [ diff --git a/src/file/table/table-properties/table-properties.ts b/src/file/table/table-properties/table-properties.ts index 8a7d000d5b..7682c29cb0 100644 --- a/src/file/table/table-properties/table-properties.ts +++ b/src/file/table/table-properties/table-properties.ts @@ -5,51 +5,52 @@ import { Alignment, AlignmentType } from "../../paragraph"; import { ITableShadingAttributesProperties, TableShading } from "../shading"; import { WidthType } from "../table-cell"; import { ITableBordersOptions, TableBorders } from "./table-borders"; -import { TableCellMargin } from "./table-cell-margin"; +import { ITableCellMarginOptions, TableCellMargin } from "./table-cell-margin"; import { ITableFloatOptions, TableFloatProperties } from "./table-float-properties"; import { TableLayout, TableLayoutType } from "./table-layout"; import { PreferredTableWidth } from "./table-width"; -export class TableProperties extends IgnoreIfEmptyXmlComponent { - private readonly cellMargin: TableCellMargin; +export interface ITablePropertiesOptions { + readonly width?: { + readonly size: number; + readonly type?: WidthType; + }; + readonly layout?: TableLayoutType; + readonly borders?: ITableBordersOptions; + readonly float?: ITableFloatOptions; + readonly shading?: ITableShadingAttributesProperties; + readonly alignment?: AlignmentType; + readonly cellMargin?: ITableCellMarginOptions; +} - constructor() { +export class TableProperties extends IgnoreIfEmptyXmlComponent { + constructor(options: ITablePropertiesOptions) { super("w:tblPr"); - this.cellMargin = new TableCellMargin(); - this.root.push(this.cellMargin); - } + this.root.push(new TableCellMargin(options.cellMargin || {})); - public setWidth(width: number, type: WidthType = WidthType.AUTO): TableProperties { - this.root.push(new PreferredTableWidth(type, width)); - return this; - } + if (options.borders) { + this.root.push(new TableBorders(options.borders)); + } - public setLayout(type: TableLayoutType): void { - this.root.push(new TableLayout(type)); - } + if (options.width) { + this.root.push(new PreferredTableWidth(options.width.type, options.width.size)); + } - public setBorder(borderOptions: ITableBordersOptions): TableProperties { - this.root.push(new TableBorders(borderOptions)); - return this; - } + if (options.float) { + this.root.push(new TableFloatProperties(options.float)); + } - public get CellMargin(): TableCellMargin { - return this.cellMargin; - } + if (options.layout) { + this.root.push(new TableLayout(options.layout)); + } - public setTableFloatProperties(tableFloatOptions: ITableFloatOptions): TableProperties { - this.root.push(new TableFloatProperties(tableFloatOptions)); - return this; - } + if (options.alignment) { + this.root.push(new Alignment(options.alignment)); + } - public setShading(attrs: ITableShadingAttributesProperties): TableProperties { - this.root.push(new TableShading(attrs)); - - return this; - } - - public setAlignment(type: AlignmentType): void { - this.root.push(new Alignment(type)); + if (options.shading) { + this.root.push(new TableShading(options.shading)); + } } } diff --git a/src/file/table/table-properties/table-width.ts b/src/file/table/table-properties/table-width.ts index a463e958df..44468c744d 100644 --- a/src/file/table/table-properties/table-width.ts +++ b/src/file/table/table-properties/table-width.ts @@ -13,7 +13,7 @@ class TableWidthAttributes extends XmlAttributeComponent { } export class PreferredTableWidth extends XmlComponent { - constructor(type: WidthType, w: number) { + constructor(type: WidthType = WidthType.AUTO, w: number) { super("w:tblW"); const width: number | string = type === WidthType.PERCENTAGE ? `${w}%` : w; this.root.push(new TableWidthAttributes({ type: type, w: width })); diff --git a/src/file/table/table.ts b/src/file/table/table.ts index 69b3c0f775..74928f5c18 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -39,8 +39,6 @@ export interface ITableOptions { } export class Table extends XmlComponent { - private readonly properties: TableProperties; - constructor({ rows, width, @@ -52,25 +50,34 @@ export class Table extends XmlComponent { alignment, }: ITableOptions) { super("w:tbl"); - this.properties = new TableProperties(); - this.root.push(this.properties); - if (borders) { - this.properties.setBorder(borders); - } else { - this.properties.setBorder({}); - } - - if (width) { - this.properties.setWidth(width.size, width.type); - } else { - this.properties.setWidth(100); - } - - this.properties.CellMargin.addBottomMargin(bottom || 0, marginUnitType); - this.properties.CellMargin.addTopMargin(top || 0, marginUnitType); - this.properties.CellMargin.addLeftMargin(left || 0, marginUnitType); - this.properties.CellMargin.addRightMargin(right || 0, marginUnitType); + this.root.push( + new TableProperties({ + borders: borders ?? {}, + width: width ?? { size: 100 }, + float, + layout, + alignment, + cellMargin: { + bottom: { + value: bottom || 0, + type: marginUnitType, + }, + top: { + value: top || 0, + type: marginUnitType, + }, + left: { + value: left || 0, + type: marginUnitType, + }, + right: { + value: right || 0, + type: marginUnitType, + }, + }, + }), + ); this.root.push(new TableGrid(columnWidths)); @@ -101,17 +108,5 @@ export class Table extends XmlComponent { columnIndex += cell.options.columnSpan || 1; }); }); - - if (float) { - this.properties.setTableFloatProperties(float); - } - - if (layout) { - this.properties.setLayout(layout); - } - - if (alignment) { - this.properties.setAlignment(alignment); - } } } From 2aa93e6105b869a66129afd7c7f6746d8d19fa85 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 4 Mar 2021 02:02:28 +0000 Subject: [PATCH 248/260] #751 Add bidi visual - Visual Right to Left --- .nycrc | 8 +++--- demo/22-right-to-left-text.ts | 27 ++++++++++++++++++- .../formatting/bidirectional.spec.ts | 15 +++++++++++ .../table-properties/table-properties.spec.ts | 16 +++++++++++ .../table-properties/table-properties.ts | 6 +++++ .../visually-right-to-left.spec.ts | 14 ++++++++++ .../visually-right-to-left.ts | 8 ++++++ src/file/table/table.ts | 3 +++ 8 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 src/file/paragraph/formatting/bidirectional.spec.ts create mode 100644 src/file/table/table-properties/visually-right-to-left.spec.ts create mode 100644 src/file/table/table-properties/visually-right-to-left.ts diff --git a/.nycrc b/.nycrc index 25c38c14ad..c06a0f3774 100644 --- a/.nycrc +++ b/.nycrc @@ -1,9 +1,9 @@ { "check-coverage": true, - "lines": 96.81, - "functions": 93.80, - "branches": 92.63, - "statements": 96.80, + "lines": 97.77, + "functions": 93.89, + "branches": 94.55, + "statements": 97.75, "include": [ "src/**/*.ts" ], diff --git a/demo/22-right-to-left-text.ts b/demo/22-right-to-left-text.ts index 2c3984fb46..4ee344391c 100644 --- a/demo/22-right-to-left-text.ts +++ b/demo/22-right-to-left-text.ts @@ -1,7 +1,7 @@ // This demo shows right to left for special languages // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, Packer, Paragraph, TextRun } from "../build"; +import { Document, Packer, Paragraph, Table, TableCell, TableRow, TextRun } from "../build"; const doc = new Document(); @@ -36,6 +36,31 @@ doc.addSection({ }), ], }), + new Table({ + visuallyRightToLeft: true, + rows: [ + new TableRow({ + children: [ + new TableCell({ + children: [new Paragraph("שלום עולם")], + }), + new TableCell({ + children: [], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + children: [], + }), + new TableCell({ + children: [new Paragraph("שלום עולם")], + }), + ], + }), + ], + }), ], }); diff --git a/src/file/paragraph/formatting/bidirectional.spec.ts b/src/file/paragraph/formatting/bidirectional.spec.ts new file mode 100644 index 0000000000..a197ada54e --- /dev/null +++ b/src/file/paragraph/formatting/bidirectional.spec.ts @@ -0,0 +1,15 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; + +import { Bidirectional } from "./bidirectional"; + +describe("Bidirectional", () => { + it("should create", () => { + const bidirectional = new Bidirectional(); + const tree = new Formatter().format(bidirectional); + expect(tree).to.deep.equal({ + "w:bidi": {}, + }); + }); +}); diff --git a/src/file/table/table-properties/table-properties.spec.ts b/src/file/table/table-properties/table-properties.spec.ts index b06aadbe4b..77205e70db 100644 --- a/src/file/table/table-properties/table-properties.spec.ts +++ b/src/file/table/table-properties/table-properties.spec.ts @@ -141,4 +141,20 @@ describe("TableProperties", () => { }); }); }); + + describe("#Set Virtual Right to Left", () => { + it("sets the alignment of the table", () => { + const tp = new TableProperties({ + visuallyRightToLeft: true, + }); + const tree = new Formatter().format(tp); + expect(tree).to.deep.equal({ + "w:tblPr": [ + { + "w:bidiVisual": {}, + }, + ], + }); + }); + }); }); diff --git a/src/file/table/table-properties/table-properties.ts b/src/file/table/table-properties/table-properties.ts index 7682c29cb0..de210a90ae 100644 --- a/src/file/table/table-properties/table-properties.ts +++ b/src/file/table/table-properties/table-properties.ts @@ -9,6 +9,7 @@ import { ITableCellMarginOptions, TableCellMargin } from "./table-cell-margin"; import { ITableFloatOptions, TableFloatProperties } from "./table-float-properties"; import { TableLayout, TableLayoutType } from "./table-layout"; import { PreferredTableWidth } from "./table-width"; +import { VisuallyRightToLeft } from "./visually-right-to-left"; export interface ITablePropertiesOptions { readonly width?: { @@ -21,6 +22,7 @@ export interface ITablePropertiesOptions { readonly shading?: ITableShadingAttributesProperties; readonly alignment?: AlignmentType; readonly cellMargin?: ITableCellMarginOptions; + readonly visuallyRightToLeft?: boolean; } export class TableProperties extends IgnoreIfEmptyXmlComponent { @@ -52,5 +54,9 @@ export class TableProperties extends IgnoreIfEmptyXmlComponent { if (options.shading) { this.root.push(new TableShading(options.shading)); } + + if (options.visuallyRightToLeft) { + this.root.push(new VisuallyRightToLeft()); + } } } diff --git a/src/file/table/table-properties/visually-right-to-left.spec.ts b/src/file/table/table-properties/visually-right-to-left.spec.ts new file mode 100644 index 0000000000..792c90194b --- /dev/null +++ b/src/file/table/table-properties/visually-right-to-left.spec.ts @@ -0,0 +1,14 @@ +import { expect } from "chai"; + +import { Formatter } from "export/formatter"; +import { VisuallyRightToLeft } from "./visually-right-to-left"; + +describe("VisuallyRightToLeft", () => { + it("should create", () => { + const visuallyRightToLeft = new VisuallyRightToLeft(); + const tree = new Formatter().format(visuallyRightToLeft); + expect(tree).to.deep.equal({ + "w:bidiVisual": {}, + }); + }); +}); diff --git a/src/file/table/table-properties/visually-right-to-left.ts b/src/file/table/table-properties/visually-right-to-left.ts new file mode 100644 index 0000000000..c0598a5a26 --- /dev/null +++ b/src/file/table/table-properties/visually-right-to-left.ts @@ -0,0 +1,8 @@ +// https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_bidiVisual_topic_ID0EOXIQ.html +import { XmlComponent } from "file/xml-components"; + +export class VisuallyRightToLeft extends XmlComponent { + constructor() { + super("w:bidiVisual"); + } +} diff --git a/src/file/table/table.ts b/src/file/table/table.ts index 74928f5c18..3aadf0b28e 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -36,6 +36,7 @@ export interface ITableOptions { readonly layout?: TableLayoutType; readonly borders?: ITableBordersOptions; readonly alignment?: AlignmentType; + readonly visuallyRightToLeft?: boolean; } export class Table extends XmlComponent { @@ -48,6 +49,7 @@ export class Table extends XmlComponent { layout, borders, alignment, + visuallyRightToLeft, }: ITableOptions) { super("w:tbl"); @@ -76,6 +78,7 @@ export class Table extends XmlComponent { type: marginUnitType, }, }, + visuallyRightToLeft, }), ); From 95556e57df518c534422f95067369e25f1b6519e Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 4 Mar 2021 02:08:09 +0000 Subject: [PATCH 249/260] Write documentation on vidi visual --- docs/usage/tables.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/usage/tables.md b/docs/usage/tables.md index 8d10b55ca3..637efa2977 100644 --- a/docs/usage/tables.md +++ b/docs/usage/tables.md @@ -326,6 +326,17 @@ const cell = new TableCell({ }); ``` +### Visual Right to Left Table + +It is possible to reverse how the cells of the table are displayed. The table direction. More info here: https://superuser.com/questions/996912/how-to-change-a-table-direction-in-microsoft-word + +```ts +const table = new Table({ + visuallyRightToLeft: true, +}); +``` + + ## Examples [Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/4-basic-table.ts ':include') From a5da9f44e8f713d3c1a9bd8cbfdca53cae191dc2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 02:25:09 +0000 Subject: [PATCH 250/260] build(deps-dev): bump @types/sinon from 9.0.4 to 9.0.10 Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 9.0.4 to 9.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index bad5fe5e17..b5ec2f8a9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -612,18 +612,18 @@ "dev": true }, "@types/sinon": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.4.tgz", - "integrity": "sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw==", + "version": "9.0.10", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.10.tgz", + "integrity": "sha512-/faDC0erR06wMdybwI/uR8wEKV/E83T0k4sepIpB7gXuy2gzx2xiOjmztq6a2Y6rIGJ04D+6UU0VBmWy+4HEMA==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" } }, "@types/sinonjs__fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", - "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz", + "integrity": "sha512-dIPoZ3g5gcx9zZEszaxLSVTvMReD3xxyyDnQUjA6IYDG9Ba2AV0otMPs+77sG9ojB4Qr2N2Vk5RnKeuA0X/0bg==", "dev": true }, "@types/source-list-map": { From 9326a0a9980d435470e42a550c253fb732b03393 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 03:00:34 +0000 Subject: [PATCH 251/260] build(deps-dev): bump @types/chai from 3.5.2 to 4.2.15 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 3.5.2 to 4.2.15. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5ec2f8a9e..5bc604681e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -540,9 +540,9 @@ "dev": true }, "@types/chai": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-3.5.2.tgz", - "integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4=", + "version": "4.2.15", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.15.tgz", + "integrity": "sha512-rYff6FI+ZTKAPkJUoyz7Udq3GaoDZnxYDEvdEdFZASiA7PoErltHezDishqQiSDWrGxvxmplH304jyzQmjp0AQ==", "dev": true }, "@types/color-name": { diff --git a/package.json b/package.json index 9db7e34f55..1b3a220d6b 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ }, "homepage": "https://github.com/dolanmiu/docx#readme", "devDependencies": { - "@types/chai": "^3.4.35", + "@types/chai": "^4.2.15", "@types/mocha": "^8.0.0", "@types/request-promise": "^4.1.42", "@types/shortid": "0.0.29", From f3f65da207a9a52ae0bed3f0660e4d803fda873a Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 4 Mar 2021 03:02:07 +0000 Subject: [PATCH 252/260] #732 Add line between columns (separate) --- .nycrc | 2 +- demo/44-multiple-columns.ts | 16 ++++++ src/file/document/body/body.spec.ts | 2 +- .../columns/columns-attributes.ts | 8 +-- .../section-properties/columns/columns.ts | 3 +- .../section-properties.spec.ts | 5 +- .../section-properties/section-properties.ts | 3 +- src/file/file.spec.ts | 1 + .../paragraph/math/n-ary/math-sum.spec.ts | 55 +++++++++++++++++++ 9 files changed, 85 insertions(+), 10 deletions(-) diff --git a/.nycrc b/.nycrc index c06a0f3774..3a897e4c79 100644 --- a/.nycrc +++ b/.nycrc @@ -2,7 +2,7 @@ "check-coverage": true, "lines": 97.77, "functions": 93.89, - "branches": 94.55, + "branches": 94.83, "statements": 97.75, "include": [ "src/**/*.ts" diff --git a/demo/44-multiple-columns.ts b/demo/44-multiple-columns.ts index 3985486620..6e01e874e7 100644 --- a/demo/44-multiple-columns.ts +++ b/demo/44-multiple-columns.ts @@ -35,6 +35,22 @@ doc.addSection({ ], }); +doc.addSection({ + properties: { + column: { + space: 708, + count: 2, + separate: true, + }, + }, + children: [ + new Paragraph("This text will be split into 2 columns on a page."), + new Paragraph( + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", + ), + ], +}); + Packer.toBuffer(doc).then((buffer) => { fs.writeFileSync("My Document.docx", buffer); }); diff --git a/src/file/document/body/body.spec.ts b/src/file/document/body/body.spec.ts index b63a95dcd1..3e2a3155eb 100644 --- a/src/file/document/body/body.spec.ts +++ b/src/file/document/body/body.spec.ts @@ -39,7 +39,7 @@ describe("Body", () => { }, }, }, - { "w:cols": { _attr: { "w:space": 708, "w:num": 1 } } }, + { "w:cols": { _attr: { "w:space": 708, "w:sep": false, "w:num": 1 } } }, { "w:docGrid": { _attr: { "w:linePitch": 360 } } }, ], }, diff --git a/src/file/document/body/section-properties/columns/columns-attributes.ts b/src/file/document/body/section-properties/columns/columns-attributes.ts index b5a14315cc..40140bd63f 100644 --- a/src/file/document/body/section-properties/columns/columns-attributes.ts +++ b/src/file/document/body/section-properties/columns/columns-attributes.ts @@ -1,13 +1,13 @@ import { XmlAttributeComponent } from "file/xml-components"; -export interface IColumnsAttributes { +export class ColumnsAttributes extends XmlAttributeComponent<{ readonly space?: number; readonly num?: number; -} - -export class ColumnsAttributes extends XmlAttributeComponent { + readonly separate?: boolean; +}> { protected readonly xmlKeys = { space: "w:space", num: "w:num", + separate: "w:sep", }; } diff --git a/src/file/document/body/section-properties/columns/columns.ts b/src/file/document/body/section-properties/columns/columns.ts index d8c7eef577..c074f189d9 100644 --- a/src/file/document/body/section-properties/columns/columns.ts +++ b/src/file/document/body/section-properties/columns/columns.ts @@ -2,12 +2,13 @@ import { XmlComponent } from "file/xml-components"; import { ColumnsAttributes } from "./columns-attributes"; export class Columns extends XmlComponent { - constructor(space: number, num: number) { + constructor(space: number, num: number, separate: boolean) { super("w:cols"); this.root.push( new ColumnsAttributes({ space: space, num: num, + separate: separate, }), ); } diff --git a/src/file/document/body/section-properties/section-properties.spec.ts b/src/file/document/body/section-properties/section-properties.spec.ts index 7fca1ae265..dea16f5ac3 100644 --- a/src/file/document/body/section-properties/section-properties.spec.ts +++ b/src/file/document/body/section-properties/section-properties.spec.ts @@ -31,6 +31,7 @@ describe("SectionProperties", () => { column: { space: 708, count: 1, + separate: true, }, linePitch: convertInchesToTwip(0.25), headers: { @@ -63,7 +64,7 @@ describe("SectionProperties", () => { }, }); - expect(tree["w:sectPr"][2]).to.deep.equal({ "w:cols": { _attr: { "w:space": 708, "w:num": 1 } } }); + expect(tree["w:sectPr"][2]).to.deep.equal({ "w:cols": { _attr: { "w:space": 708, "w:sep": true, "w:num": 1 } } }); expect(tree["w:sectPr"][3]).to.deep.equal({ "w:docGrid": { _attr: { "w:linePitch": 360 } } }); expect(tree["w:sectPr"][4]).to.deep.equal({ "w:headerReference": { _attr: { "r:id": "rId100", "w:type": "default" } } }); expect(tree["w:sectPr"][5]).to.deep.equal({ "w:footerReference": { _attr: { "r:id": "rId200", "w:type": "even" } } }); @@ -90,7 +91,7 @@ describe("SectionProperties", () => { }, }, }); - expect(tree["w:sectPr"][2]).to.deep.equal({ "w:cols": { _attr: { "w:space": 708, "w:num": 1 } } }); + expect(tree["w:sectPr"][2]).to.deep.equal({ "w:cols": { _attr: { "w:space": 708, "w:sep": false, "w:num": 1 } } }); expect(tree["w:sectPr"][3]).to.deep.equal({ "w:docGrid": { _attr: { "w:linePitch": 360 } } }); }); diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index e3fb1be2a4..e7d260ef4e 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -54,6 +54,7 @@ export type SectionPropertiesOptions = IPageSizeAttributes & readonly column?: { readonly space?: number; readonly count?: number; + readonly separate?: boolean; }; readonly type?: SectionType; }; @@ -100,7 +101,7 @@ export class SectionProperties extends XmlComponent { this.options = options; this.root.push(new PageSize(width, height, orientation)); this.root.push(new PageMargin(top, right, bottom, left, header, footer, gutter, mirror)); - this.root.push(new Columns(column.space ? column.space : 708, column.count ? column.count : 1)); + this.root.push(new Columns(column.space ? column.space : 708, column.count ? column.count : 1, column.separate ?? false)); this.root.push(new DocumentGrid(linePitch)); this.addHeaders(headers); diff --git a/src/file/file.spec.ts b/src/file/file.spec.ts index 3fc389e4bf..15b389c96e 100644 --- a/src/file/file.spec.ts +++ b/src/file/file.spec.ts @@ -148,6 +148,7 @@ describe("File", () => { "w:cols": { _attr: { "w:num": 1, + "w:sep": false, "w:space": 708, }, }, diff --git a/src/file/paragraph/math/n-ary/math-sum.spec.ts b/src/file/paragraph/math/n-ary/math-sum.spec.ts index 1e76815147..9a7cbbaaa2 100644 --- a/src/file/paragraph/math/n-ary/math-sum.spec.ts +++ b/src/file/paragraph/math/n-ary/math-sum.spec.ts @@ -71,5 +71,60 @@ describe("MathSum", () => { ], }); }); + + it("should add a hide when there is no subScript or superScript", () => { + const mathSum = new MathSum({ + children: [new MathRun("1")], + }); + + const tree = new Formatter().format(mathSum); + expect(tree).to.deep.equal({ + "m:nary": [ + { + "m:naryPr": [ + { + "m:chr": { + _attr: { + "m:val": "∑", + }, + }, + }, + { + "m:limLoc": { + _attr: { + "m:val": "undOvr", + }, + }, + }, + { + "m:supHide": { + _attr: { + "m:val": 1, + }, + }, + }, + { + "m:subHide": { + _attr: { + "m:val": 1, + }, + }, + }, + ], + }, + { + "m:e": [ + { + "m:r": [ + { + "m:t": ["1"], + }, + ], + }, + ], + }, + ], + }); + }); }); }); From df7a90d3c1ef03b7aae601dacd93f65bd71c46e4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 03:03:02 +0000 Subject: [PATCH 253/260] build(deps): bump @types/node from 14.6.2 to 14.14.31 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.2 to 14.14.31. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5ec2f8a9e..05e80c0580 100644 --- a/package-lock.json +++ b/package-lock.json @@ -566,9 +566,9 @@ "dev": true }, "@types/node": { - "version": "14.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.2.tgz", - "integrity": "sha512-onlIwbaeqvZyniGPfdw/TEhKIh79pz66L1q06WUQqJLnAb6wbjvOtepLYTGHTqzdXgBYIE3ZdmqHDGsRsbBz7A==" + "version": "14.14.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", + "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==" }, "@types/request": { "version": "2.48.5", From 9743dfa8cc7a74f48f4155d6c4d95d712738d955 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 4 Mar 2021 03:10:20 +0000 Subject: [PATCH 254/260] Improve docs --- docs/_coverpage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_coverpage.md b/docs/_coverpage.md index adfd37471e..c3db65386d 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -4,7 +4,7 @@ - Simple, declarative API - 50+ usage examples -- Battle tested, mature, 95%+ coverage +- Battle tested, mature, 97%+ coverage [GitHub](https://github.com/dolanmiu/docx) [Get Started](#Welcome) From ec2272024484790c3a59662241d9b00f1cf2f72f Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 4 Mar 2021 03:21:03 +0000 Subject: [PATCH 255/260] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2460a5d498..95cc6548e3 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,8 @@ Read the contribution guidelines [here](https://docx.js.org/#/contribution-guide [drawing](https://www.beekast.com/) [drawing](https://herraizsoto.com/) [drawing](http://www.ativer.com.br/) -[drawing](https://www.arity.co/) +[drawing](https://www.arity.co/) +[drawing](https://www.circadianrisk.com/) ...and many more! From 512d81649f3dc89d0c4f272f581586274a1e40a7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Mar 2021 07:51:09 +0000 Subject: [PATCH 256/260] build(deps-dev): bump typedoc from 0.19.0 to 0.20.29 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.19.0 to 0.20.29. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.19.0...v0.20.29) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 85 ++++++++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 62 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6e27b067e..d5fe9e4106 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4245,12 +4245,6 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "highlight.js": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.6.0.tgz", - "integrity": "sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==", - "dev": true - }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -5296,9 +5290,9 @@ } }, "marked": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.4.tgz", - "integrity": "sha512-6x5TFGCTKSQBLTZtOburGxCxFEBJEGYVLwCMTBCxzvyuisGcC20UNzDSJhCr/cJ/Kmh6ulfJm10g6WWEAJ3kvg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.1.tgz", + "integrity": "sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==", "dev": true }, "math-random": { @@ -6117,6 +6111,32 @@ "wrappy": "1" } }, + "onigasm": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", + "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", + "dev": true, + "requires": { + "lru-cache": "^5.1.1" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, "open": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", @@ -7326,6 +7346,16 @@ "rechoir": "^0.6.2" } }, + "shiki": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.2.tgz", + "integrity": "sha512-BjUCxVbxMnvjs8jC4b+BQ808vwjJ9Q8NtLqPwXShZ307HdXiDFYP968ORSVfaTNNSWYDBYdMnVKJ0fYNsoZUBA==", + "dev": true, + "requires": { + "onigasm": "^2.2.5", + "vscode-textmate": "^5.2.0" + } + }, "shortid": { "version": "2.2.16", "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", @@ -8086,21 +8116,22 @@ } }, "typedoc": { - "version": "0.19.0", - "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.19.0.tgz", - "integrity": "sha512-Rn68JwgDDYyIWl3HXeSsLZcsvxd2anISjhKu64PvID7RETeS2Iwnc4cH60yqc8/N50Xo1d3MHPGYinCPhMMliQ==", + "version": "0.20.29", + "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.20.29.tgz", + "integrity": "sha512-IyzrbtwNAXtylUJn41FbopQsNSQ1jcM6lUhDL/REOFo31G3Q9fsniZUQP+tIcTX5JaCntRdw3PTMZTQPV52low==", "dev": true, "requires": { - "fs-extra": "^9.0.1", - "handlebars": "^4.7.6", - "highlight.js": "^10.0.0", - "lodash": "^4.17.20", + "colors": "^1.4.0", + "fs-extra": "^9.1.0", + "handlebars": "^4.7.7", + "lodash": "^4.17.21", "lunr": "^2.3.9", - "marked": "^1.1.1", + "marked": "^2.0.1", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.4", - "typedoc-default-themes": "^0.11.1" + "shiki": "^0.9.2", + "typedoc-default-themes": "^0.12.8" }, "dependencies": { "fs-extra": { @@ -8140,9 +8171,9 @@ } }, "typedoc-default-themes": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.11.4.tgz", - "integrity": "sha512-Y4Lf+qIb9NTydrexlazAM46SSLrmrQRqWiD52593g53SsmUFioAsMWt8m834J6qsp+7wHRjxCXSZeiiW5cMUdw==", + "version": "0.12.8", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.8.tgz", + "integrity": "sha512-tyjyDTKy/JLnBSwvhoqd99VIjrP33SdOtwcMD32b+OqnrjZWe8HmZECbfBoacqoxjHd58gfeNw6wA7uvqWFa4w==", "dev": true }, "typescript": { @@ -8152,9 +8183,9 @@ "dev": true }, "uglify-js": { - "version": "3.12.8", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.8.tgz", - "integrity": "sha512-fvBeuXOsvqjecUtF/l1dwsrrf5y2BCUk9AOJGzGcm6tE7vegku5u/YvqjyDaAGr422PLoLnrxg3EnRvTqsdC1w==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.0.tgz", + "integrity": "sha512-TWYSWa9T2pPN4DIJYbU9oAjQx+5qdV5RUDxwARg8fmJZrD/V27Zj0JngW5xg1DFz42G0uDYl2XhzF6alSzD62w==", "dev": true, "optional": true }, @@ -8521,6 +8552,12 @@ "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", "dev": true }, + "vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", diff --git a/package.json b/package.json index 1b3a220d6b..a77f4942dc 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "ts-node": "^9.0.0", "tslint": "^6.1.3", "tslint-immutable": "^6.0.1", - "typedoc": "^0.19.0", + "typedoc": "^0.20.29", "typescript": "4.2.2", "webpack": "^3.10.0" }, From e5da573041c94eec9ad081880204175fa1287b41 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Fri, 5 Mar 2021 03:03:02 +0000 Subject: [PATCH 257/260] Clean up table with improved demo --- demo/4-basic-table.ts | 95 ++++++++++++++++++- .../section-properties/section-properties.ts | 13 +-- src/file/table/table-cell/table-cell.ts | 38 +++----- src/file/table/table-row/table-row.ts | 4 - 4 files changed, 114 insertions(+), 36 deletions(-) diff --git a/demo/4-basic-table.ts b/demo/4-basic-table.ts index 593fe821a5..287e54808a 100644 --- a/demo/4-basic-table.ts +++ b/demo/4-basic-table.ts @@ -1,11 +1,95 @@ // Example of how you would create a table and add data to it // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, Packer, Paragraph, Table, TableCell, TableRow } from "../build"; +import { Document, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "../build"; const doc = new Document(); const table = new Table({ + columnWidths: [3505, 5505], + rows: [ + new TableRow({ + children: [ + new TableCell({ + width: { + size: 3505, + type: WidthType.DXA, + }, + children: [new Paragraph("Hello")], + }), + new TableCell({ + width: { + size: 5505, + type: WidthType.DXA, + }, + children: [], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + width: { + size: 3505, + type: WidthType.DXA, + }, + children: [], + }), + new TableCell({ + width: { + size: 5505, + type: WidthType.DXA, + }, + children: [new Paragraph("World")], + }), + ], + }), + ], +}); + +const table2 = new Table({ + columnWidths: [4505, 4505], + rows: [ + new TableRow({ + children: [ + new TableCell({ + width: { + size: 4505, + type: WidthType.DXA, + }, + children: [new Paragraph("Hello")], + }), + new TableCell({ + width: { + size: 4505, + type: WidthType.DXA, + }, + children: [], + }), + ], + }), + new TableRow({ + children: [ + new TableCell({ + width: { + size: 4505, + type: WidthType.DXA, + }, + children: [], + }), + new TableCell({ + width: { + size: 4505, + type: WidthType.DXA, + }, + children: [new Paragraph("World")], + }), + ], + }), + ], +}); + +const table3 = new Table({ rows: [ new TableRow({ children: [ @@ -31,7 +115,14 @@ const table = new Table({ }); doc.addSection({ - children: [table], + children: [ + new Paragraph({ text: "Table with skewed widths" }), + table, + new Paragraph({ text: "Table with equal widths" }), + table2, + new Paragraph({ text: "Table without setting widths" }), + table3, + ], }); Packer.toBuffer(doc).then((buffer) => { diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index e7d260ef4e..83bb93e580 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -61,7 +61,9 @@ export type SectionPropertiesOptions = IPageSizeAttributes & // Need to decouple this from the attributes export class SectionProperties extends XmlComponent { - private readonly options: SectionPropertiesOptions; + public readonly width: number; + public readonly rightMargin: number; + public readonly leftMargin: number; constructor(options: SectionPropertiesOptions = { column: {} }) { super("w:sectPr"); @@ -98,7 +100,10 @@ export class SectionProperties extends XmlComponent { type, } = options; - this.options = options; + this.leftMargin = left; + this.rightMargin = right; + this.width = width; + this.root.push(new PageSize(width, height, orientation)); this.root.push(new PageMargin(top, right, bottom, left, header, footer, gutter, mirror)); this.root.push(new Columns(column.space ? column.space : 708, column.count ? column.count : 1, column.separate ?? false)); @@ -201,8 +206,4 @@ export class SectionProperties extends XmlComponent { } } } - - public get Options(): SectionPropertiesOptions { - return this.options; - } } diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index e598888f83..9c8e8efd58 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -48,69 +48,59 @@ export interface ITableCellOptions { } export class TableCell extends XmlComponent { - private readonly properties: TableCellProperties; - constructor(readonly options: ITableCellOptions) { super("w:tc"); - this.properties = new TableCellProperties(); - this.root.push(this.properties); + const properties = new TableCellProperties(); + this.root.push(properties); for (const child of options.children) { this.root.push(child); } if (options.verticalAlign) { - this.properties.setVerticalAlign(options.verticalAlign); + properties.setVerticalAlign(options.verticalAlign); } if (options.textDirection) { - this.properties.setTextDirection(options.textDirection); + properties.setTextDirection(options.textDirection); } if (options.verticalMerge) { - this.properties.addVerticalMerge(options.verticalMerge); + properties.addVerticalMerge(options.verticalMerge); } else if (options.rowSpan && options.rowSpan > 1) { // if cell already have a `verticalMerge`, don't handle `rowSpan` - this.properties.addVerticalMerge(VerticalMergeType.RESTART); + properties.addVerticalMerge(VerticalMergeType.RESTART); } if (options.margins) { - this.properties.addMargins(options.margins); + properties.addMargins(options.margins); } if (options.shading) { - this.properties.setShading(options.shading); + properties.setShading(options.shading); } if (options.columnSpan) { - this.properties.addGridSpan(options.columnSpan); + properties.addGridSpan(options.columnSpan); } if (options.width) { - this.properties.setWidth(options.width.size, options.width.type); + properties.setWidth(options.width.size, options.width.type); } if (options.borders) { if (options.borders.top) { - this.properties.Borders.addTopBorder(options.borders.top.style, options.borders.top.size, options.borders.top.color); + properties.Borders.addTopBorder(options.borders.top.style, options.borders.top.size, options.borders.top.color); } if (options.borders.bottom) { - this.properties.Borders.addBottomBorder( - options.borders.bottom.style, - options.borders.bottom.size, - options.borders.bottom.color, - ); + properties.Borders.addBottomBorder(options.borders.bottom.style, options.borders.bottom.size, options.borders.bottom.color); } if (options.borders.left) { - this.properties.Borders.addLeftBorder(options.borders.left.style, options.borders.left.size, options.borders.left.color); + properties.Borders.addLeftBorder(options.borders.left.style, options.borders.left.size, options.borders.left.color); } if (options.borders.right) { - this.properties.Borders.addRightBorder( - options.borders.right.style, - options.borders.right.size, - options.borders.right.color, - ); + properties.Borders.addRightBorder(options.borders.right.style, options.borders.right.size, options.borders.right.color); } } } diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 5f2e03105a..92a8614511 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -42,10 +42,6 @@ export class TableRow extends XmlComponent { return this.options.children.length; } - public get Children(): TableCell[] { - return this.options.children; - } - public get cells(): TableCell[] { return this.root.filter((xmlComponent) => xmlComponent instanceof TableCell); } From e169e01002a8e82ea8cd630619784f554f107f51 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 5 Mar 2021 07:59:54 +0000 Subject: [PATCH 258/260] build(deps-dev): bump typescript from 4.2.2 to 4.2.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.2 to 4.2.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5fe9e4106..183d28b7b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8177,9 +8177,9 @@ "dev": true }, "typescript": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz", - "integrity": "sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index a77f4942dc..0817dbbc0b 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "tslint": "^6.1.3", "tslint-immutable": "^6.0.1", "typedoc": "^0.20.29", - "typescript": "4.2.2", + "typescript": "4.2.3", "webpack": "^3.10.0" }, "engines": { From bb6abe5e098d80bddddbf593860acd208ef365d7 Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 7 Mar 2021 20:53:25 +0000 Subject: [PATCH 259/260] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95cc6548e3..1df764e12c 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,10 @@ Read the contribution guidelines [here](https://docx.js.org/#/contribution-guide [drawing](https://turbopatent.com/) [drawing](http://www.madisoncres.com/) [drawing](https://www.beekast.com/) -[drawing](https://herraizsoto.com/) +[drawing](https://herraizsoto.com/) [drawing](http://www.ativer.com.br/) [drawing](https://www.arity.co/) -[drawing](https://www.circadianrisk.com/) +[drawing](https://www.circadianrisk.com/) ...and many more! From 5fc28cb67df8b7b2ff39bdda67610edc3c7ce64e Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 7 Mar 2021 21:27:38 +0000 Subject: [PATCH 260/260] Move custom properties to properties --- demo/54-custom-properties.ts | 15 ++++++++++----- src/file/core-properties/properties.ts | 2 ++ src/file/file.ts | 5 ++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/demo/54-custom-properties.ts b/demo/54-custom-properties.ts index f6ef7cf778..4aad3864c9 100644 --- a/demo/54-custom-properties.ts +++ b/demo/54-custom-properties.ts @@ -9,15 +9,20 @@ import { Document, Packer } from "../build"; const doc = new Document( // Standard properties - { creator: "Creator", title: "Title", subject: "Subject", description: "Description" }, + { + creator: "Creator", + title: "Title", + subject: "Subject", + description: "Description", + customProperties: [ + { name: "Subtitle", value: "Subtitle" }, + { name: "Address", value: "Address" }, + ], + }, // No file properties {}, // No sections [], - [ - { name: "Subtitle", value: "Subtitle" }, - { name: "Address", value: "Address" }, - ] ); Packer.toBuffer(doc).then((buffer) => { diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index 8e3921df0c..17a4baed2a 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "file/xml-components"; +import { ICustomPropertyOptions } from "../custom-properties"; import { IDocumentBackgroundOptions } from "../document"; import { DocumentAttributes } from "../document/document-attributes"; @@ -24,6 +25,7 @@ export interface IPropertiesOptions { readonly trackRevisions?: boolean; }; readonly compatabilityModeVersion?: number; + readonly customProperties?: ICustomPropertyOptions[]; } export class CoreProperties extends XmlComponent { diff --git a/src/file/file.ts b/src/file/file.ts index 2a1c294778..e91906f3d1 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -1,7 +1,7 @@ import { AppProperties } from "./app-properties/app-properties"; import { ContentTypes } from "./content-types/content-types"; import { CoreProperties, IPropertiesOptions } from "./core-properties"; -import { CustomProperties, ICustomPropertyOptions } from "./custom-properties"; +import { CustomProperties } from "./custom-properties"; import { DocumentWrapper } from "./document-wrapper"; import { FooterReferenceType, @@ -69,7 +69,6 @@ export class File { }, fileProperties: IFileProperties = {}, sections: ISectionOptions[] = [], - customProperties: ICustomPropertyOptions[] = [], ) { this.coreProperties = new CoreProperties(options); this.numbering = new Numbering( @@ -80,7 +79,7 @@ export class File { }, ); this.fileRelationships = new Relationships(); - this.customProperties = new CustomProperties(customProperties); + this.customProperties = new CustomProperties(options.customProperties ?? []); this.appProperties = new AppProperties(); this.footnotesWrapper = new FootnotesWrapper(); this.contentTypes = new ContentTypes();