From 600fef21f63c29853e84c00a0d8bb363b8e88bfc Mon Sep 17 00:00:00 2001 From: Matt Danner Date: Mon, 22 Aug 2022 13:24:12 -0700 Subject: [PATCH 01/14] Update webpack.config.ts for nodestreams Without this alias, JSZip throws a "nodestream not supported on this platform" error. This addition resolves the issue. --- webpack.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.ts b/webpack.config.ts index 0f03537add..5871440f3f 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -23,6 +23,9 @@ const configuration = { stream: require.resolve("stream-browserify"), }, plugins: [new TsconfigPathsPlugin()], + alias: { + jszip: require.resolve('jszip/lib/index.js'), + }, }, module: { From 1a630bcb4d574a1b29d3fbec625784ff7b77d96a Mon Sep 17 00:00:00 2001 From: Matt Danner Date: Mon, 22 Aug 2022 13:25:59 -0700 Subject: [PATCH 02/14] Added toStream export function New Function returns a NodeJS readable stream that allows piping DOCX document data to stream. --- src/export/packer/packer.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/export/packer/packer.ts b/src/export/packer/packer.ts index 56d604fe18..fa783234d6 100644 --- a/src/export/packer/packer.ts +++ b/src/export/packer/packer.ts @@ -1,4 +1,5 @@ import { File } from "@file/file"; +import { Stream } from "stream"; import { Compiler } from "./next-compiler"; @@ -45,6 +46,18 @@ export class Packer { return zipData; } + + public static async toStream(file: File, prettify?: boolean | PrettifyType): Promise { + const zip = this.compiler.compile(file, prettify); + const zipData = zip.generateNodeStream({ + type: "nodebuffer", + streamFiles: true, + mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + compression: "DEFLATE", + }); + + return zipData; + } private static readonly compiler = new Compiler(); } From f4f6ee50551acfdbd08b315bbd86f68145da9ffc Mon Sep 17 00:00:00 2001 From: Matt Danner Date: Mon, 22 Aug 2022 15:26:52 -0500 Subject: [PATCH 03/14] Created toStream example --- demo/74-nodejs-stream.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 demo/74-nodejs-stream.ts diff --git a/demo/74-nodejs-stream.ts b/demo/74-nodejs-stream.ts new file mode 100644 index 0000000000..4dea1f7524 --- /dev/null +++ b/demo/74-nodejs-stream.ts @@ -0,0 +1,31 @@ +// 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, Packer, Paragraph, TextRun } from "../build"; + +const doc = new Document({ + sections: [ + { + 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.toStream(doc).then((stream) => { + stream.pipe(fs.createWriteStream("My Document.docx")); +}); From c982e6499691d982fff3949d87f4f81fe5431d49 Mon Sep 17 00:00:00 2001 From: Matt Danner Date: Wed, 24 Aug 2022 13:01:15 -0500 Subject: [PATCH 04/14] formatting --- src/export/packer/packer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export/packer/packer.ts b/src/export/packer/packer.ts index fa783234d6..7a3a35316a 100644 --- a/src/export/packer/packer.ts +++ b/src/export/packer/packer.ts @@ -46,7 +46,7 @@ export class Packer { return zipData; } - + public static async toStream(file: File, prettify?: boolean | PrettifyType): Promise { const zip = this.compiler.compile(file, prettify); const zipData = zip.generateNodeStream({ From 859a3f4015fc92798b152fde0555a80bf4fbbea0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 11:01:19 +0000 Subject: [PATCH 05/14] build(deps-dev): bump @types/glob from 7.2.0 to 8.0.0 Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.2.0 to 8.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob) --- updated-dependencies: - dependency-name: "@types/glob" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebd43a12ae..9e68507c1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@types/chai": "^4.2.15", - "@types/glob": "^7.1.4", + "@types/glob": "^8.0.0", "@types/mocha": "^9.0.0", "@types/prompt": "^1.1.1", "@types/request-promise": "^4.1.42", @@ -1120,9 +1120,9 @@ "dev": true }, "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.0.0.tgz", + "integrity": "sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==", "dev": true, "dependencies": { "@types/minimatch": "*", @@ -10062,9 +10062,9 @@ "dev": true }, "@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.0.0.tgz", + "integrity": "sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==", "dev": true, "requires": { "@types/minimatch": "*", diff --git a/package.json b/package.json index 1319943983..e650103743 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "homepage": "https://github.com/dolanmiu/docx#readme", "devDependencies": { "@types/chai": "^4.2.15", - "@types/glob": "^7.1.4", + "@types/glob": "^8.0.0", "@types/mocha": "^9.0.0", "@types/prompt": "^1.1.1", "@types/request-promise": "^4.1.42", From ea565d8f71d9da1d65826e0b9d2b5cee5ff35a5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:01:21 +0000 Subject: [PATCH 06/14] build(deps-dev): bump @types/prompt from 1.1.2 to 1.1.3 Bumps [@types/prompt](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prompt) from 1.1.2 to 1.1.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prompt) --- updated-dependencies: - dependency-name: "@types/prompt" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebd43a12ae..19972e1e60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1159,9 +1159,9 @@ "dev": true }, "node_modules/@types/prompt": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.2.tgz", - "integrity": "sha512-Zc9YzOvjAWxxGY7qo0Q6yINMVVspAa4p68UCzucWMU+GaPujpjwbOwzI38s7Jq01k0GztzLxXlRiFcZf/aeIWA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.3.tgz", + "integrity": "sha512-y1fMzb7a/mQs4tynU8agMmV8ptbT0dkgNafrdsoEyLtbCggK5COJ/r5DGcaAHB5kdXTGh+8trHlENlsZkm+tOQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -10101,9 +10101,9 @@ "dev": true }, "@types/prompt": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.2.tgz", - "integrity": "sha512-Zc9YzOvjAWxxGY7qo0Q6yINMVVspAa4p68UCzucWMU+GaPujpjwbOwzI38s7Jq01k0GztzLxXlRiFcZf/aeIWA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.3.tgz", + "integrity": "sha512-y1fMzb7a/mQs4tynU8agMmV8ptbT0dkgNafrdsoEyLtbCggK5COJ/r5DGcaAHB5kdXTGh+8trHlENlsZkm+tOQ==", "dev": true, "requires": { "@types/node": "*", From 35865e46f05e88f1335e58e82ce1c743c2f18e40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 15:34:40 +0000 Subject: [PATCH 07/14] build(deps-dev): bump typedoc from 0.23.11 to 0.23.14 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.11 to 0.23.14. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.23.11...v0.23.14) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebd43a12ae..6071d226ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8163,9 +8163,9 @@ } }, "node_modules/typedoc": { - "version": "0.23.11", - "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.23.11.tgz", - "integrity": "sha512-FhZ2HfqlS++53UwHk4txCsTrTlpYR0So/0osMyBeP1E7llRNRqycJGfYK1qx9Wvvv5VO8tGdpwzOwDW5FrTi7A==", + "version": "0.23.14", + "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.23.14.tgz", + "integrity": "sha512-s2I+ZKBET38EctZvbXp2GooHrNaKjWZkrwGEK/sttnOGiKJqU0vHrsdcwLgKZGuo2aedNL3RRPj1LnAAeYscig==", "dev": true, "dependencies": { "lunr": "^2.3.9", @@ -15499,9 +15499,9 @@ } }, "typedoc": { - "version": "0.23.11", - "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.23.11.tgz", - "integrity": "sha512-FhZ2HfqlS++53UwHk4txCsTrTlpYR0So/0osMyBeP1E7llRNRqycJGfYK1qx9Wvvv5VO8tGdpwzOwDW5FrTi7A==", + "version": "0.23.14", + "resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.23.14.tgz", + "integrity": "sha512-s2I+ZKBET38EctZvbXp2GooHrNaKjWZkrwGEK/sttnOGiKJqU0vHrsdcwLgKZGuo2aedNL3RRPj1LnAAeYscig==", "dev": true, "requires": { "lunr": "^2.3.9", From 78fd99c26e3fab0e497668b9a97f0ca0e8158e27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Sep 2022 04:17:47 +0000 Subject: [PATCH 08/14] build(deps): bump json-schema from 0.2.3 to 0.4.0 Bumps [json-schema](https://github.com/kriszyp/json-schema) from 0.2.3 to 0.4.0. - [Release notes](https://github.com/kriszyp/json-schema/releases) - [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0) --- updated-dependencies: - dependency-name: json-schema dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89fd1c674b..193b7ee571 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4856,9 +4856,9 @@ "dev": true }, "node_modules/json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "node_modules/json-schema-traverse": { @@ -4901,18 +4901,18 @@ } }, "node_modules/jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, - "engines": [ - "node >=0.6.0" - ], "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" } }, "node_modules/jszip": { @@ -12972,9 +12972,9 @@ "dev": true }, "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { @@ -13011,14 +13011,14 @@ } }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" } }, From 38711f04bc0be9bd41ca0411efc5af115b1938b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Sep 2022 04:18:13 +0000 Subject: [PATCH 09/14] build(deps): bump @types/node from 18.7.13 to 18.7.16 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.13 to 18.7.16. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89fd1c674b..c1c2b555c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1148,9 +1148,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", - "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" + "version": "18.7.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", + "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -10090,9 +10090,9 @@ "dev": true }, "@types/node": { - "version": "18.7.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", - "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" + "version": "18.7.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", + "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" }, "@types/parse-json": { "version": "4.0.0", From 42bb01c41689a7d187df4a22a0918c455c65ea07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:02:24 +0000 Subject: [PATCH 10/14] build(deps-dev): bump cspell from 6.8.1 to 6.8.2 Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.8.1 to 6.8.2. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v6.8.1...v6.8.2) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 302 +++++++++++++++++++++++----------------------- 1 file changed, 151 insertions(+), 151 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b801a68db..b3af3609f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -481,19 +481,19 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.8.1.tgz", - "integrity": "sha512-hZCAtUeEsQ16f9SvruKYB9nFDjt+VXtZ/yJHONo6+dev9A6JpsUGWGL2oja6fD4j+mvFoMc/Dm1wzhtTYeSvhA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.8.2.tgz", + "integrity": "sha512-E4sNdcG23nj0ztiI69PeU+ALL6DgL3GoqVZuLhpRwgRL4RN7n7FuUJdJ91cgpNvx50+HhdyxFqEpKRigD3yeNQ==", "dev": true, "dependencies": { "@cspell/dict-ada": "^2.0.1", "@cspell/dict-aws": "^2.0.0", "@cspell/dict-bash": "^2.0.4", - "@cspell/dict-companies": "^2.0.11", + "@cspell/dict-companies": "^2.0.13", "@cspell/dict-cpp": "^3.2.1", "@cspell/dict-cryptocurrencies": "^2.0.0", "@cspell/dict-csharp": "^3.0.1", - "@cspell/dict-css": "^2.0.1", + "@cspell/dict-css": "^2.1.0", "@cspell/dict-dart": "^1.1.1", "@cspell/dict-django": "^2.0.0", "@cspell/dict-docker": "^1.1.1", @@ -507,7 +507,7 @@ "@cspell/dict-git": "^1.0.1", "@cspell/dict-golang": "^3.0.1", "@cspell/dict-haskell": "^2.0.1", - "@cspell/dict-html": "^3.1.0", + "@cspell/dict-html": "^3.3.2", "@cspell/dict-html-symbol-entities": "^3.0.0", "@cspell/dict-java": "^3.0.7", "@cspell/dict-latex": "^2.0.9", @@ -523,7 +523,7 @@ "@cspell/dict-ruby": "^2.0.2", "@cspell/dict-rust": "^2.0.1", "@cspell/dict-scala": "^2.0.0", - "@cspell/dict-software-terms": "^2.2.3", + "@cspell/dict-software-terms": "^2.2.7", "@cspell/dict-sql": "^1.0.4", "@cspell/dict-swift": "^1.0.3", "@cspell/dict-typescript": "^2.0.1", @@ -534,27 +534,27 @@ } }, "node_modules/@cspell/cspell-pipe": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.8.1.tgz", - "integrity": "sha512-FbpYK58PlrGIOjZxu51/dFkFv7iaPhKWrkQ/q/9vW82g2ovouFeql0S7X9g4Dnn75Pd5P/pYPgFubCSawtp3pA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.8.2.tgz", + "integrity": "sha512-9GXBibZ8bcU+2KhX6WTEASPhIhsqdFYITwBJ39jfUl2MiPgpvjYxQKrAgnZOm5WpRzCUxoelU2SVaoI+rn/Stg==", "dev": true, "engines": { "node": ">=14" } }, "node_modules/@cspell/cspell-service-bus": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.8.1.tgz", - "integrity": "sha512-lpr+5TntZdneLxmhSGT3pKOsxLJ40KahJDyNqM+91ssqIczeqrm7jZ2hZCdx4XqQM2dOAMvsB0ZyZuuDjQ+ptg==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.8.2.tgz", + "integrity": "sha512-YvEauGv/QZb5xRiKKvwiXz7lj7twc5TgispnujgHYDEt6OcXiWjYj676WzKkGJ2yM+QfurGJCCvOb2L1HQ6rYg==", "dev": true, "engines": { "node": ">=14" } }, "node_modules/@cspell/cspell-types": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.8.1.tgz", - "integrity": "sha512-Yo/SJZEG3SbcIfxqdQat70LW5SwXoox2L+G8y0VCtdYu+hFr5ouSUInlfItgiFBgDKNSF0w1u2oOZeNkFZ1Aiw==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.8.2.tgz", + "integrity": "sha512-jFg+D1L+MkIad2IR+qlnOYIuwqaosbTrtqhpWhbOGMvFQjxMyKg9IVxbmtjDCdRohdBUvRq96rkp0vx1FviiwQ==", "dev": true, "engines": { "node": ">=14" @@ -579,9 +579,9 @@ "dev": true }, "node_modules/@cspell/dict-companies": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-2.0.11.tgz", - "integrity": "sha512-8Fw+dviHh3nu9y0jI+7kpObY/C15s4bDzWi5ZJpkAT65z+yZiIr6rxyoCR4vHpT5/TofbaRXFKWHoc/sqUYY2g==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-2.0.13.tgz", + "integrity": "sha512-EacGH6Yjd2u+sNRLd6+3jxbzWBSsmF4g52Xfxfv2T48qzRWJ1zqpX89ijihgYTwvZbf8H/6Lu+z1VU4e1gUp0g==", "dev": true }, "node_modules/@cspell/dict-cpp": { @@ -603,9 +603,9 @@ "dev": true }, "node_modules/@cspell/dict-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-2.0.1.tgz", - "integrity": "sha512-8YjD29A8IquPdAsDNF/7KIG1FUYEs1mpKYcBrGPv/CKVlyiQskAxdFZvhWlKzsjDsWxis9+2Q5vR0VGLtgkPzQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-2.1.0.tgz", + "integrity": "sha512-glASAELcGhh4Ru0rTQ4G9mTQxSyPwsZOON/5BYflB6Kks8YC8nUvKrtMCoo5W7CPKPfSEa8zUNctFQ1+IUYDHA==", "dev": true }, "node_modules/@cspell/dict-dart": { @@ -687,9 +687,9 @@ "dev": true }, "node_modules/@cspell/dict-html": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-3.1.0.tgz", - "integrity": "sha512-HD33wqDxaBBDuBRMlXT1sS8v1Oqw3ZjJocEK8a/JQ8s75sSq4zl6iZIcbkzTHFeDfKPmObCES4z5GbgHKNaQtw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-3.3.2.tgz", + "integrity": "sha512-cM5pQSEiqjrdk6cRFLrlLdWNT/J8399f/A6DjwjfYhHrGy0e/Rsjv76HZT0GlE1OqMoq9eG9jdQsfoYYgWTIpQ==", "dev": true }, "node_modules/@cspell/dict-html-symbol-entities": { @@ -783,9 +783,9 @@ "dev": true }, "node_modules/@cspell/dict-software-terms": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-2.2.3.tgz", - "integrity": "sha512-hpiYrjnGcrSw2q/CiT2bzsB5/OVaK/aOgQvvI6MVnvOk3XzfpAeOr24frrnXTURbuD8pktiRPvAmrTlHrAGCXQ==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-2.2.7.tgz", + "integrity": "sha512-tNdgfijX4PGIzwWyRQHqEsKEWqNc92HDdURcXBZNw2po7jUh+/FgqBoUgnJXyLastJ9PGX9847j9uNBPfShTgA==", "dev": true }, "node_modules/@cspell/dict-sql": { @@ -2472,17 +2472,17 @@ } }, "node_modules/cspell": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-6.8.1.tgz", - "integrity": "sha512-w+MCy9a7uMu0bwwDuFJy85SbF6pikCc6fzQo3B/hXuu+xrz12TCbjsXsdezTXl9YqPsUDN0A8A6AwHEN7t7GFw==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-6.8.2.tgz", + "integrity": "sha512-WHF8tQXetHgAjyG6f0rDhWXRQllSpZULOIuDZj6PeZyHubuObzsMsW0asDvL8j+EGKXr8NPo4J3vjxahYmSJ+w==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "^6.8.1", + "@cspell/cspell-pipe": "^6.8.2", "chalk": "^4.1.2", "commander": "^9.4.0", - "cspell-gitignore": "^6.8.1", - "cspell-glob": "^6.8.1", - "cspell-lib": "^6.8.1", + "cspell-gitignore": "^6.8.2", + "cspell-glob": "^6.8.2", + "cspell-lib": "^6.8.2", "fast-json-stable-stringify": "^2.1.0", "file-entry-cache": "^6.0.1", "fs-extra": "^10.1.0", @@ -2504,12 +2504,12 @@ } }, "node_modules/cspell-gitignore": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.8.1.tgz", - "integrity": "sha512-GpLr0xoQQHk8IpDGhMY76EyThwSwfAOe5er5iDYlEFRsCp0sUnllXVSJunb4QZIcMl2zbj5lGgPuCvzKcjy3SQ==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.8.2.tgz", + "integrity": "sha512-JoU/rGeGrjSqOMvY5q+bloxtO5Y8QLpJEEIAvHHZ+oTOlExZ/CIAYnO6X3lC6ylNRYc1+I2KEOFa6R0+0OSdVQ==", "dev": true, "dependencies": { - "cspell-glob": "^6.8.1", + "cspell-glob": "^6.8.2", "find-up": "^5.0.0" }, "bin": { @@ -2520,9 +2520,9 @@ } }, "node_modules/cspell-glob": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-6.8.1.tgz", - "integrity": "sha512-LSiGN9ht4cJdr/zIuh6GlV0soYKPBNvQovhjYPFZZjvCbH7iIkTNxCuXBKylF1iorsH1jrTY88fmNBeYqkwuFA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-6.8.2.tgz", + "integrity": "sha512-FKy2EIdQKO9b/vP0r8yqxtGQNA8M48DkwMSjW2mN1Qku5wRT8SPByKg87BjK4oztlIiQJoJ6+8OTrWnJwdbpQw==", "dev": true, "dependencies": { "micromatch": "^4.0.5" @@ -2532,13 +2532,13 @@ } }, "node_modules/cspell-grammar": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.8.1.tgz", - "integrity": "sha512-VudDZLEplSlJeQwOtznfhj4gdVpKsQ2+I7zMMx9w4t6newDD8Ts6nUMg9BFC1j5LggBzuKAgo/QNMo5vU9MhGA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.8.2.tgz", + "integrity": "sha512-RHvIsNRDlBYKddKAdob5XT2+odOiO3eJVaw/vt5+CRx1cJSjuaIOyHwXKH2Xl1ioUUhEb9Ew3pg7JktRdzKn5w==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "^6.8.1", - "@cspell/cspell-types": "^6.8.1" + "@cspell/cspell-pipe": "^6.8.2", + "@cspell/cspell-types": "^6.8.2" }, "bin": { "cspell-grammar": "bin.js" @@ -2548,12 +2548,12 @@ } }, "node_modules/cspell-io": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-6.8.1.tgz", - "integrity": "sha512-rk6FOmehbeX4xE3uKNMTl0bZJkcuL17sB807uQCxp5CRfKvdv51nV1Sz7u1gVYiNy6UYBj7VO0V2w7TftqR24A==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-6.8.2.tgz", + "integrity": "sha512-QpdePUXD8fTM2XuZdeS5ygTeIW9pnaQhTVWBWGbnrYlMn5iV9Jo81dHheHw4InxQJUjhyS/CuxdNGfYZXGJuaQ==", "dev": true, "dependencies": { - "@cspell/cspell-service-bus": "^6.8.1", + "@cspell/cspell-service-bus": "^6.8.2", "node-fetch": "^2.6.7" }, "engines": { @@ -2561,30 +2561,30 @@ } }, "node_modules/cspell-lib": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.8.1.tgz", - "integrity": "sha512-FzLSOg/IRClx9JfN2STg9KaoNwQsvKICviKjk0kdrRJywDUUA/uNL7KqI0khSWGPRVjPK2Itu9NpgB66Ux4xEA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.8.2.tgz", + "integrity": "sha512-K7UoaKB3qzq5KVnKynQM0+v8+4aXAA0coBKA6tH5czY2KDeuJSUu14b9WM+nxrUbMOOvNuSv+NaYw5lryaMFsg==", "dev": true, "dependencies": { - "@cspell/cspell-bundled-dicts": "^6.8.1", - "@cspell/cspell-pipe": "^6.8.1", - "@cspell/cspell-types": "^6.8.1", + "@cspell/cspell-bundled-dicts": "^6.8.2", + "@cspell/cspell-pipe": "^6.8.2", + "@cspell/cspell-types": "^6.8.2", "clear-module": "^4.1.2", "comment-json": "^4.2.3", "configstore": "^5.0.1", "cosmiconfig": "^7.0.1", - "cspell-glob": "^6.8.1", - "cspell-grammar": "^6.8.1", - "cspell-io": "^6.8.1", - "cspell-trie-lib": "^6.8.1", + "cspell-glob": "^6.8.2", + "cspell-grammar": "^6.8.2", + "cspell-io": "^6.8.2", + "cspell-trie-lib": "^6.8.2", "fast-equals": "^4.0.3", "find-up": "^5.0.0", "fs-extra": "^10.1.0", - "gensequence": "^3.1.1", + "gensequence": "^4.0.2", "import-fresh": "^3.3.0", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0", - "vscode-languageserver-textdocument": "^1.0.5", + "vscode-languageserver-textdocument": "^1.0.7", "vscode-uri": "^3.0.3" }, "engines": { @@ -2627,15 +2627,15 @@ } }, "node_modules/cspell-trie-lib": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.8.1.tgz", - "integrity": "sha512-mCxs99615eGXc306M0ocWI+h74MKdr0rdZawNGg8k8r7K14dQAur79FBDWGgTR4ThlZ1KLV3p/5tulxP89nJSA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.8.2.tgz", + "integrity": "sha512-jaNszLtSQglpz1BKejQ4RBFyJVSsYHQGW+1Rj4Zm103OcL+g6r/E1lm/dIbX/1UC4pBrNamjcGzXtPOBZJtUeQ==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "^6.8.1", - "@cspell/cspell-types": "^6.8.1", + "@cspell/cspell-pipe": "^6.8.2", + "@cspell/cspell-types": "^6.8.2", "fs-extra": "^10.1.0", - "gensequence": "^3.1.1" + "gensequence": "^4.0.2" }, "engines": { "node": ">=14" @@ -3860,12 +3860,12 @@ } }, "node_modules/gensequence": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-3.1.1.tgz", - "integrity": "sha512-ys3h0hiteRwmY6BsvSttPmkhC0vEQHPJduANBRtH/dlDPZ0UBIb/dXy80IcckXyuQ6LKg+PloRqvGER9IS7F7g==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-4.0.2.tgz", + "integrity": "sha512-mQiFskYFPFDSUpBJ/n3ebAV2Ufu6DZGvUPXzyWYzFfJr6/DyOOZVnjx6VTWE4y0RLvYWnc5tZq5sCjzEWhRjqQ==", "dev": true, "engines": { - "node": ">=10.0.0" + "node": ">=14" } }, "node_modules/gensync": { @@ -8432,9 +8432,9 @@ } }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz", - "integrity": "sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz", + "integrity": "sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==", "dev": true }, "node_modules/vscode-oniguruma": { @@ -9477,19 +9477,19 @@ "dev": true }, "@cspell/cspell-bundled-dicts": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.8.1.tgz", - "integrity": "sha512-hZCAtUeEsQ16f9SvruKYB9nFDjt+VXtZ/yJHONo6+dev9A6JpsUGWGL2oja6fD4j+mvFoMc/Dm1wzhtTYeSvhA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.8.2.tgz", + "integrity": "sha512-E4sNdcG23nj0ztiI69PeU+ALL6DgL3GoqVZuLhpRwgRL4RN7n7FuUJdJ91cgpNvx50+HhdyxFqEpKRigD3yeNQ==", "dev": true, "requires": { "@cspell/dict-ada": "^2.0.1", "@cspell/dict-aws": "^2.0.0", "@cspell/dict-bash": "^2.0.4", - "@cspell/dict-companies": "^2.0.11", + "@cspell/dict-companies": "^2.0.13", "@cspell/dict-cpp": "^3.2.1", "@cspell/dict-cryptocurrencies": "^2.0.0", "@cspell/dict-csharp": "^3.0.1", - "@cspell/dict-css": "^2.0.1", + "@cspell/dict-css": "^2.1.0", "@cspell/dict-dart": "^1.1.1", "@cspell/dict-django": "^2.0.0", "@cspell/dict-docker": "^1.1.1", @@ -9503,7 +9503,7 @@ "@cspell/dict-git": "^1.0.1", "@cspell/dict-golang": "^3.0.1", "@cspell/dict-haskell": "^2.0.1", - "@cspell/dict-html": "^3.1.0", + "@cspell/dict-html": "^3.3.2", "@cspell/dict-html-symbol-entities": "^3.0.0", "@cspell/dict-java": "^3.0.7", "@cspell/dict-latex": "^2.0.9", @@ -9519,7 +9519,7 @@ "@cspell/dict-ruby": "^2.0.2", "@cspell/dict-rust": "^2.0.1", "@cspell/dict-scala": "^2.0.0", - "@cspell/dict-software-terms": "^2.2.3", + "@cspell/dict-software-terms": "^2.2.7", "@cspell/dict-sql": "^1.0.4", "@cspell/dict-swift": "^1.0.3", "@cspell/dict-typescript": "^2.0.1", @@ -9527,21 +9527,21 @@ } }, "@cspell/cspell-pipe": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.8.1.tgz", - "integrity": "sha512-FbpYK58PlrGIOjZxu51/dFkFv7iaPhKWrkQ/q/9vW82g2ovouFeql0S7X9g4Dnn75Pd5P/pYPgFubCSawtp3pA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.8.2.tgz", + "integrity": "sha512-9GXBibZ8bcU+2KhX6WTEASPhIhsqdFYITwBJ39jfUl2MiPgpvjYxQKrAgnZOm5WpRzCUxoelU2SVaoI+rn/Stg==", "dev": true }, "@cspell/cspell-service-bus": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.8.1.tgz", - "integrity": "sha512-lpr+5TntZdneLxmhSGT3pKOsxLJ40KahJDyNqM+91ssqIczeqrm7jZ2hZCdx4XqQM2dOAMvsB0ZyZuuDjQ+ptg==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.8.2.tgz", + "integrity": "sha512-YvEauGv/QZb5xRiKKvwiXz7lj7twc5TgispnujgHYDEt6OcXiWjYj676WzKkGJ2yM+QfurGJCCvOb2L1HQ6rYg==", "dev": true }, "@cspell/cspell-types": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.8.1.tgz", - "integrity": "sha512-Yo/SJZEG3SbcIfxqdQat70LW5SwXoox2L+G8y0VCtdYu+hFr5ouSUInlfItgiFBgDKNSF0w1u2oOZeNkFZ1Aiw==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.8.2.tgz", + "integrity": "sha512-jFg+D1L+MkIad2IR+qlnOYIuwqaosbTrtqhpWhbOGMvFQjxMyKg9IVxbmtjDCdRohdBUvRq96rkp0vx1FviiwQ==", "dev": true }, "@cspell/dict-ada": { @@ -9563,9 +9563,9 @@ "dev": true }, "@cspell/dict-companies": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-2.0.11.tgz", - "integrity": "sha512-8Fw+dviHh3nu9y0jI+7kpObY/C15s4bDzWi5ZJpkAT65z+yZiIr6rxyoCR4vHpT5/TofbaRXFKWHoc/sqUYY2g==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-2.0.13.tgz", + "integrity": "sha512-EacGH6Yjd2u+sNRLd6+3jxbzWBSsmF4g52Xfxfv2T48qzRWJ1zqpX89ijihgYTwvZbf8H/6Lu+z1VU4e1gUp0g==", "dev": true }, "@cspell/dict-cpp": { @@ -9587,9 +9587,9 @@ "dev": true }, "@cspell/dict-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-2.0.1.tgz", - "integrity": "sha512-8YjD29A8IquPdAsDNF/7KIG1FUYEs1mpKYcBrGPv/CKVlyiQskAxdFZvhWlKzsjDsWxis9+2Q5vR0VGLtgkPzQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-2.1.0.tgz", + "integrity": "sha512-glASAELcGhh4Ru0rTQ4G9mTQxSyPwsZOON/5BYflB6Kks8YC8nUvKrtMCoo5W7CPKPfSEa8zUNctFQ1+IUYDHA==", "dev": true }, "@cspell/dict-dart": { @@ -9671,9 +9671,9 @@ "dev": true }, "@cspell/dict-html": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-3.1.0.tgz", - "integrity": "sha512-HD33wqDxaBBDuBRMlXT1sS8v1Oqw3ZjJocEK8a/JQ8s75sSq4zl6iZIcbkzTHFeDfKPmObCES4z5GbgHKNaQtw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-3.3.2.tgz", + "integrity": "sha512-cM5pQSEiqjrdk6cRFLrlLdWNT/J8399f/A6DjwjfYhHrGy0e/Rsjv76HZT0GlE1OqMoq9eG9jdQsfoYYgWTIpQ==", "dev": true }, "@cspell/dict-html-symbol-entities": { @@ -9767,9 +9767,9 @@ "dev": true }, "@cspell/dict-software-terms": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-2.2.3.tgz", - "integrity": "sha512-hpiYrjnGcrSw2q/CiT2bzsB5/OVaK/aOgQvvI6MVnvOk3XzfpAeOr24frrnXTURbuD8pktiRPvAmrTlHrAGCXQ==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-2.2.7.tgz", + "integrity": "sha512-tNdgfijX4PGIzwWyRQHqEsKEWqNc92HDdURcXBZNw2po7jUh+/FgqBoUgnJXyLastJ9PGX9847j9uNBPfShTgA==", "dev": true }, "@cspell/dict-sql": { @@ -11160,17 +11160,17 @@ "dev": true }, "cspell": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-6.8.1.tgz", - "integrity": "sha512-w+MCy9a7uMu0bwwDuFJy85SbF6pikCc6fzQo3B/hXuu+xrz12TCbjsXsdezTXl9YqPsUDN0A8A6AwHEN7t7GFw==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-6.8.2.tgz", + "integrity": "sha512-WHF8tQXetHgAjyG6f0rDhWXRQllSpZULOIuDZj6PeZyHubuObzsMsW0asDvL8j+EGKXr8NPo4J3vjxahYmSJ+w==", "dev": true, "requires": { - "@cspell/cspell-pipe": "^6.8.1", + "@cspell/cspell-pipe": "^6.8.2", "chalk": "^4.1.2", "commander": "^9.4.0", - "cspell-gitignore": "^6.8.1", - "cspell-glob": "^6.8.1", - "cspell-lib": "^6.8.1", + "cspell-gitignore": "^6.8.2", + "cspell-glob": "^6.8.2", + "cspell-lib": "^6.8.2", "fast-json-stable-stringify": "^2.1.0", "file-entry-cache": "^6.0.1", "fs-extra": "^10.1.0", @@ -11306,69 +11306,69 @@ } }, "cspell-gitignore": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.8.1.tgz", - "integrity": "sha512-GpLr0xoQQHk8IpDGhMY76EyThwSwfAOe5er5iDYlEFRsCp0sUnllXVSJunb4QZIcMl2zbj5lGgPuCvzKcjy3SQ==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.8.2.tgz", + "integrity": "sha512-JoU/rGeGrjSqOMvY5q+bloxtO5Y8QLpJEEIAvHHZ+oTOlExZ/CIAYnO6X3lC6ylNRYc1+I2KEOFa6R0+0OSdVQ==", "dev": true, "requires": { - "cspell-glob": "^6.8.1", + "cspell-glob": "^6.8.2", "find-up": "^5.0.0" } }, "cspell-glob": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-6.8.1.tgz", - "integrity": "sha512-LSiGN9ht4cJdr/zIuh6GlV0soYKPBNvQovhjYPFZZjvCbH7iIkTNxCuXBKylF1iorsH1jrTY88fmNBeYqkwuFA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-6.8.2.tgz", + "integrity": "sha512-FKy2EIdQKO9b/vP0r8yqxtGQNA8M48DkwMSjW2mN1Qku5wRT8SPByKg87BjK4oztlIiQJoJ6+8OTrWnJwdbpQw==", "dev": true, "requires": { "micromatch": "^4.0.5" } }, "cspell-grammar": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.8.1.tgz", - "integrity": "sha512-VudDZLEplSlJeQwOtznfhj4gdVpKsQ2+I7zMMx9w4t6newDD8Ts6nUMg9BFC1j5LggBzuKAgo/QNMo5vU9MhGA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.8.2.tgz", + "integrity": "sha512-RHvIsNRDlBYKddKAdob5XT2+odOiO3eJVaw/vt5+CRx1cJSjuaIOyHwXKH2Xl1ioUUhEb9Ew3pg7JktRdzKn5w==", "dev": true, "requires": { - "@cspell/cspell-pipe": "^6.8.1", - "@cspell/cspell-types": "^6.8.1" + "@cspell/cspell-pipe": "^6.8.2", + "@cspell/cspell-types": "^6.8.2" } }, "cspell-io": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-6.8.1.tgz", - "integrity": "sha512-rk6FOmehbeX4xE3uKNMTl0bZJkcuL17sB807uQCxp5CRfKvdv51nV1Sz7u1gVYiNy6UYBj7VO0V2w7TftqR24A==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-6.8.2.tgz", + "integrity": "sha512-QpdePUXD8fTM2XuZdeS5ygTeIW9pnaQhTVWBWGbnrYlMn5iV9Jo81dHheHw4InxQJUjhyS/CuxdNGfYZXGJuaQ==", "dev": true, "requires": { - "@cspell/cspell-service-bus": "^6.8.1", + "@cspell/cspell-service-bus": "^6.8.2", "node-fetch": "^2.6.7" } }, "cspell-lib": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.8.1.tgz", - "integrity": "sha512-FzLSOg/IRClx9JfN2STg9KaoNwQsvKICviKjk0kdrRJywDUUA/uNL7KqI0khSWGPRVjPK2Itu9NpgB66Ux4xEA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.8.2.tgz", + "integrity": "sha512-K7UoaKB3qzq5KVnKynQM0+v8+4aXAA0coBKA6tH5czY2KDeuJSUu14b9WM+nxrUbMOOvNuSv+NaYw5lryaMFsg==", "dev": true, "requires": { - "@cspell/cspell-bundled-dicts": "^6.8.1", - "@cspell/cspell-pipe": "^6.8.1", - "@cspell/cspell-types": "^6.8.1", + "@cspell/cspell-bundled-dicts": "^6.8.2", + "@cspell/cspell-pipe": "^6.8.2", + "@cspell/cspell-types": "^6.8.2", "clear-module": "^4.1.2", "comment-json": "^4.2.3", "configstore": "^5.0.1", "cosmiconfig": "^7.0.1", - "cspell-glob": "^6.8.1", - "cspell-grammar": "^6.8.1", - "cspell-io": "^6.8.1", - "cspell-trie-lib": "^6.8.1", + "cspell-glob": "^6.8.2", + "cspell-grammar": "^6.8.2", + "cspell-io": "^6.8.2", + "cspell-trie-lib": "^6.8.2", "fast-equals": "^4.0.3", "find-up": "^5.0.0", "fs-extra": "^10.1.0", - "gensequence": "^3.1.1", + "gensequence": "^4.0.2", "import-fresh": "^3.3.0", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0", - "vscode-languageserver-textdocument": "^1.0.5", + "vscode-languageserver-textdocument": "^1.0.7", "vscode-uri": "^3.0.3" }, "dependencies": { @@ -11402,15 +11402,15 @@ } }, "cspell-trie-lib": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.8.1.tgz", - "integrity": "sha512-mCxs99615eGXc306M0ocWI+h74MKdr0rdZawNGg8k8r7K14dQAur79FBDWGgTR4ThlZ1KLV3p/5tulxP89nJSA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.8.2.tgz", + "integrity": "sha512-jaNszLtSQglpz1BKejQ4RBFyJVSsYHQGW+1Rj4Zm103OcL+g6r/E1lm/dIbX/1UC4pBrNamjcGzXtPOBZJtUeQ==", "dev": true, "requires": { - "@cspell/cspell-pipe": "^6.8.1", - "@cspell/cspell-types": "^6.8.1", + "@cspell/cspell-pipe": "^6.8.2", + "@cspell/cspell-types": "^6.8.2", "fs-extra": "^10.1.0", - "gensequence": "^3.1.1" + "gensequence": "^4.0.2" }, "dependencies": { "fs-extra": { @@ -12224,9 +12224,9 @@ } }, "gensequence": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-3.1.1.tgz", - "integrity": "sha512-ys3h0hiteRwmY6BsvSttPmkhC0vEQHPJduANBRtH/dlDPZ0UBIb/dXy80IcckXyuQ6LKg+PloRqvGER9IS7F7g==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-4.0.2.tgz", + "integrity": "sha512-mQiFskYFPFDSUpBJ/n3ebAV2Ufu6DZGvUPXzyWYzFfJr6/DyOOZVnjx6VTWE4y0RLvYWnc5tZq5sCjzEWhRjqQ==", "dev": true }, "gensync": { @@ -15709,9 +15709,9 @@ } }, "vscode-languageserver-textdocument": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz", - "integrity": "sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz", + "integrity": "sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==", "dev": true }, "vscode-oniguruma": { From 0a1507599bcba07ed3fa9ac85cfe5bc7b268e459 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 11:01:01 +0000 Subject: [PATCH 11/14] build(deps): bump @types/node from 18.7.16 to 18.7.18 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.16 to 18.7.18. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b801a68db..9439b70438 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1148,9 +1148,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", - "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" + "version": "18.7.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", + "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -10090,9 +10090,9 @@ "dev": true }, "@types/node": { - "version": "18.7.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", - "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" + "version": "18.7.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", + "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==" }, "@types/parse-json": { "version": "4.0.0", From 9f3940746acf9d2d830098f180c257f7640e20fe Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 15 Sep 2022 08:15:38 +0100 Subject: [PATCH 12/14] Add tests for stream packer --- src/export/packer/packer.spec.ts | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/export/packer/packer.spec.ts b/src/export/packer/packer.spec.ts index 5500144eff..c9ef4232b4 100644 --- a/src/export/packer/packer.spec.ts +++ b/src/export/packer/packer.spec.ts @@ -114,4 +114,52 @@ describe("Packer", () => { (Packer as any).compiler.compile.restore(); }); }); + + describe("#toStream()", () => { + it("should create a standard docx file", async () => { + // tslint:disable-next-line: no-any + stub((Packer as any).compiler, "compile").callsFake(() => ({ + // tslint:disable-next-line: no-empty + generateNodeStream: () => ({ + on: (event: string, cb: () => void) => { + if (event === "end") { + cb(); + } + }, + }), + })); + const stream = await Packer.toStream(file); + return new Promise((resolve, reject) => { + stream.on("error", () => { + reject(); + }); + + stream.on("end", () => { + resolve(); + }); + }); + }); + + it("should handle exception if it throws any", async () => { + // tslint:disable-next-line:no-any + const compiler = stub((Packer as any).compiler, "compile").callsFake(() => ({ + // tslint:disable-next-line: no-empty + on: (event: string, cb: () => void) => { + if (event === "error") { + cb(); + } + }, + })); + + compiler.throwsException(); + return await Packer.toStream(file).catch((error) => { + assert.isDefined(error); + }); + }); + + afterEach(() => { + // tslint:disable-next-line:no-any + (Packer as any).compiler.compile.restore(); + }); + }); }); From 2b01a6006cf98453263d83193e0562e0ffd635e8 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 15 Sep 2022 12:39:30 +0100 Subject: [PATCH 13/14] Fix linting --- src/export/packer/packer.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export/packer/packer.spec.ts b/src/export/packer/packer.spec.ts index c9ef4232b4..b3ba67a033 100644 --- a/src/export/packer/packer.spec.ts +++ b/src/export/packer/packer.spec.ts @@ -152,7 +152,7 @@ describe("Packer", () => { })); compiler.throwsException(); - return await Packer.toStream(file).catch((error) => { + return Packer.toStream(file).catch((error) => { assert.isDefined(error); }); }); From ebb3f8137e79d2d9365e8355e9523a3e3675437e Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 15 Sep 2022 13:08:49 +0100 Subject: [PATCH 14/14] #1660 Add w:isLgl --- src/file/numbering/level.spec.ts | 39 ++++++++++++++++++++++++++++++++ src/file/numbering/level.ts | 15 +++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/file/numbering/level.spec.ts b/src/file/numbering/level.spec.ts index 5748a9c610..608474888a 100644 --- a/src/file/numbering/level.spec.ts +++ b/src/file/numbering/level.spec.ts @@ -1,5 +1,7 @@ import { expect } from "chai"; +import { Formatter } from "@export/formatter"; + import { LevelFormat, LevelSuffix } from "."; import { AlignmentType } from ".."; @@ -22,4 +24,41 @@ describe("Level", () => { ).to.throw(); }); }); + + describe("isLegalNumberingStyle", () => { + it("should work", () => { + const concreteNumbering = new Level({ + level: 9, + isLegalNumberingStyle: true, + }); + const tree = new Formatter().format(concreteNumbering); + expect(tree).to.deep.equal({ + "w:lvl": [ + { + "w:start": { + _attr: { + "w:val": 1, + }, + }, + }, + { + "w:isLgl": {}, + }, + { + "w:lvlJc": { + _attr: { + "w:val": "start", + }, + }, + }, + { + _attr: { + "w15:tentative": 1, + "w:ilvl": 9, + }, + }, + ], + }); + }); + }); }); diff --git a/src/file/numbering/level.ts b/src/file/numbering/level.ts index 225a1f2004..cedf0745a7 100644 --- a/src/file/numbering/level.ts +++ b/src/file/numbering/level.ts @@ -87,6 +87,7 @@ export interface ILevelsOptions { readonly alignment?: AlignmentType; readonly start?: number; readonly suffix?: LevelSuffix; + readonly isLegalNumberingStyle?: boolean; readonly style?: { readonly run?: IRunStylePropertiesOptions; readonly paragraph?: ILevelParagraphStylePropertiesOptions; @@ -114,6 +115,14 @@ class Suffix extends XmlComponent { } } +// http://officeopenxml.com/WPnumbering-isLgl.php +// https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.islegalnumberingstyle?view=openxml-2.8.1 +class IsLegalNumberingStyle extends XmlComponent { + constructor() { + super("w:isLgl"); + } +} + // // // @@ -137,7 +146,7 @@ export class LevelBase extends XmlComponent { private readonly paragraphProperties: ParagraphProperties; private readonly runProperties: RunProperties; - constructor({ level, format, text, alignment = AlignmentType.START, start = 1, style, suffix }: ILevelsOptions) { + constructor({ level, format, text, alignment = AlignmentType.START, start = 1, style, suffix, isLegalNumberingStyle }: ILevelsOptions) { super("w:lvl"); this.root.push(new NumberValueElement("w:start", decimalNumber(start))); @@ -150,6 +159,10 @@ export class LevelBase extends XmlComponent { this.root.push(new Suffix(suffix)); } + if (isLegalNumberingStyle) { + this.root.push(new IsLegalNumberingStyle()); + } + if (text) { this.root.push(new LevelText(text)); }