From 7102fe25e2742d3e038807dcf1b2a34e8ba7108b Mon Sep 17 00:00:00 2001 From: simlay Date: Tue, 5 Jan 2021 17:47:57 -0800 Subject: [PATCH] Upate docs CI to choose theirs in merge. (#61) * Updated typedoc --- .github/workflows/docs.yml | 4 +- package-lock.json | 131 +++++++++++++++++++++++++++---------- package.json | 2 +- src/consumer.rs | 1 + src/index.ts | 8 +++ 5 files changed, 109 insertions(+), 37 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 15a5bbc6..a15ab395 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: Docs on: workflow_dispatch: push: - tags: + tags: - 'v*' jobs: docs: @@ -28,7 +28,7 @@ jobs: git config --local user.name "Fluvio Authors" git fetch --all git checkout -b docs --track origin/docs - git merge origin/master + git merge -X theirs origin/master -m "Merge remote-tracking branch 'origin/master' into docs" - name: Install Build Dependencies run: | npm install diff --git a/package-lock.json b/package-lock.json index 53b26e17..9f42b9ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1554,6 +1554,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2345,12 +2351,6 @@ } } }, - "highlight.js": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.5.0.tgz", - "integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==", - "dev": true - }, "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", @@ -4065,13 +4065,21 @@ } }, "jsonfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", - "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", + "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": "^1.0.0" + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } } }, "jsprim": { @@ -4210,9 +4218,9 @@ } }, "marked": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.0.tgz", - "integrity": "sha512-tiRxakgbNPBr301ihe/785NntvYyhxlqcL3YaC8CaxJQh7kiaEtrN9B/eK2I2943Yjkh5gw25chYFDQhOMCwMA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.7.tgz", + "integrity": "sha512-No11hFYcXr/zkBvL6qFmAp1z6BKY3zqLMHny/JN/ey+al7qwCM2+CMBL9BOgqMxZU36fz4cCWfn2poWIf7QRXA==", "dev": true }, "merge-stream": { @@ -4495,6 +4503,32 @@ "mimic-fn": "^2.1.0" } }, + "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 + } + } + }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -5177,6 +5211,37 @@ "dev": true, "optional": true }, + "shiki": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.2.7.tgz", + "integrity": "sha512-bwVc7cdtYYHEO9O+XJ8aNOskKRfaQd5Y4ovLRfbQkmiLSUaR+bdlssbZUUhbQ0JAFMYcTcJ5tjG5KtnufttDHQ==", + "dev": true, + "requires": { + "onigasm": "^2.2.5", + "shiki-languages": "^0.2.7", + "shiki-themes": "^0.2.7", + "vscode-textmate": "^5.2.0" + } + }, + "shiki-languages": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/shiki-languages/-/shiki-languages-0.2.7.tgz", + "integrity": "sha512-REmakh7pn2jCn9GDMRSK36oDgqhh+rSvJPo77sdWTOmk44C5b0XlYPwJZcFOMJWUZJE0c7FCbKclw4FLwUKLRw==", + "dev": true, + "requires": { + "vscode-textmate": "^5.2.0" + } + }, + "shiki-themes": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/shiki-themes/-/shiki-themes-0.2.7.tgz", + "integrity": "sha512-ZMmboDYw5+SEpugM8KGUq3tkZ0vXg+k60XX6NngDK7gc1Sv6YLUlanpvG3evm57uKJvfXsky/S5MzSOTtYKLjA==", + "dev": true, + "requires": { + "json5": "^2.1.0", + "vscode-textmate": "^5.2.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -5822,36 +5887,28 @@ } }, "typedoc": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.19.2.tgz", - "integrity": "sha512-oDEg1BLEzi1qvgdQXc658EYgJ5qJLVSeZ0hQ57Eq4JXy6Vj2VX4RVo18qYxRWz75ifAaYuYNBUCnbhjd37TfOg==", + "version": "0.20.12", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.12.tgz", + "integrity": "sha512-Cdg6tLicmhomai+GkVOLy1spmiZ8iAC4lrkU6oylK3KHNex9TrJjl++B2iCQ7eC5uiiv3MBfv4t6WzQ/M6jLTg==", "dev": true, "requires": { + "colors": "^1.4.0", "fs-extra": "^9.0.1", "handlebars": "^4.7.6", - "highlight.js": "^10.2.0", "lodash": "^4.17.20", "lunr": "^2.3.9", - "marked": "^1.1.1", + "marked": "^1.2.5", "minimatch": "^3.0.0", "progress": "^2.0.3", - "semver": "^7.3.2", "shelljs": "^0.8.4", - "typedoc-default-themes": "^0.11.4" - }, - "dependencies": { - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true - } + "shiki": "^0.2.7", + "typedoc-default-themes": "0.12.0" } }, "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.0", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.0.tgz", + "integrity": "sha512-0hHBxwmfxE0rkIslOiO39fJyYwaScQEhUIxcpqx3uS1BL3zhFW5oQfUaPx2cv2XLL/GXhYFxhdFLoVmNptbxEQ==", "dev": true }, "typescript": { @@ -5860,9 +5917,9 @@ "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==" }, "uglify-js": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.1.tgz", - "integrity": "sha512-OApPSuJcxcnewwjSGGfWOjx3oix5XpmrK9Z2j0fTRlHGoZ49IU6kExfZTM0++fCArOOCet+vIfWwFHbvWqwp6g==", + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", + "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", "dev": true, "optional": true }, @@ -5991,6 +6048,12 @@ "extsprintf": "^1.2.0" } }, + "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 + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", diff --git a/package.json b/package.json index 995afdae..b9d73218 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "ts-jest": "^26.4.4", "ts-node": "^9.1.1", "tslint": "^6.1.3", - "typedoc": "^0.19.2", + "typedoc": "^0.20.12", "uuid": "^8.3.2" } } diff --git a/src/consumer.rs b/src/consumer.rs index 3c55bcc0..d1ea3e9f 100644 --- a/src/consumer.rs +++ b/src/consumer.rs @@ -224,6 +224,7 @@ impl<'a> FetchablePartitionResponseWrapper { fn records(&'a self) -> Option { Some(RecordSetWrapper(&self.0.as_ref()?.records)) } + #[node_bindgen] fn to_records(&'a self) -> Vec { let mut records = Vec::new(); diff --git a/src/index.ts b/src/index.ts index c8561285..7a9e070f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -856,6 +856,14 @@ export interface FetchablePartitionResponse { lastStableOffset: number logStartOffset: number records: RecordSet + /** + * ```typescript + * let response = await this.fluvioConsumer.fetch(Offset.FromStart()) + * response.toRecords().forEach(msg => { + * console.log(msg) + * }) + * ``` + */ toRecords(): Array aborted?: ArrayBuffer }