chore: fix doc

This commit is contained in:
fryorcraken.eth 2022-11-02 15:05:12 +11:00
parent ef2475ffb8
commit 69c94db23a
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
13 changed files with 50 additions and 82 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ src/**.js
coverage
*.log
*.tsbuildinfo
docs

View File

@ -1,40 +1,45 @@
import { promisify } from 'util'
import { publish } from 'gh-pages'
import { promisify } from "util";
import { publish } from "gh-pages";
/* fix for "Unhandled promise rejections" */
process.on('unhandledRejection', err => { throw err })
process.on("unhandledRejection", (err) => {
throw err;
});
const ghpublish = promisify(publish)
const ghpublish = promisify(publish);
const Args = process.argv.slice(2)
const USE_HTTPS = Args[0] && Args[0].toUpperCase() === 'HTTPS'
const Args = process.argv.slice(2);
const USE_HTTPS = Args[0] && Args[0].toUpperCase() === "HTTPS";
const branch = 'gh-pages'
const org = 'waku-org'
const repo = 'js-waku'
const branch = "gh-pages";
const org = "waku-org";
const repo = "js-waku";
/* use SSH auth by default */
let repoUrl = USE_HTTPS
? `https://github.com/${org}/${repo}.git`
: `git@github.com:${org}/${repo}.git`
: `git@github.com:${org}/${repo}.git`;
/* alternative auth using GitHub user and API token */
if (typeof process.env.GH_USER !== "undefined") {
repoUrl = (
'https://' + process.env.GH_USER +
':' + process.env.GH_TOKEN +
'@' + `github.com/${org}/${repo}.git`
)
repoUrl =
"https://" +
process.env.GH_USER +
":" +
process.env.GH_TOKEN +
"@" +
`github.com/${org}/${repo}.git`;
}
const main = async (url, branch)=> {
console.log(`Pushing to: ${url}`)
console.log(`On branch: ${branch}`)
await ghpublish('build/docs', {
const main = async (url, branch) => {
console.log(`Pushing to: ${url}`);
console.log(`On branch: ${branch}`);
await ghpublish("docs", {
repo: url,
branch: branch,
dotfiles: true,
silent: false
})
}
silent: false,
});
};
main(repoUrl, branch)
main(repoUrl, branch);

9
package-lock.json generated
View File

@ -13,7 +13,8 @@
"husky": "^8.0.1",
"lerna": "^6.0.1",
"lint-staged": "^13.0.3",
"size-limit": "^8.1.0"
"size-limit": "^8.1.0",
"typedoc": "^0.23.19"
}
},
"node_modules/@achingbrain/ip-address": {
@ -22433,7 +22434,6 @@
"tail": "^2.2.0",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"engines": {
@ -22510,7 +22510,6 @@
"rollup": "^2.75.0",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"engines": {
@ -22549,7 +22548,6 @@
"prettier": "^2.1.1",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"engines": {
@ -26919,7 +26917,6 @@
"tail": "^2.2.0",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typedoc": "^0.23.10",
"typescript": "^4.6.3",
"uint8arraylist": "^2.3.2",
"uint8arrays": "^3.0.0",
@ -26984,7 +26981,6 @@
"rollup": "^2.75.0",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
}
},
@ -27016,7 +27012,6 @@
"prettier": "^2.1.1",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"dependencies": {

View File

@ -14,7 +14,9 @@
"test:browser": "lerna run test:browser",
"test:node": "lerna run test:node",
"proto": "lerna run proto",
"doc": "lerna run doc",
"doc": "run-s doc:*",
"doc:html": "typedoc # --treatWarningsAsErrors",
"doc:cname": "echo 'js.waku.org' > docs/CNAME",
"release": "lerna run --concurrency 1 release -- --"
},
"devDependencies": {

View File

@ -94,9 +94,6 @@
"proto": "rimraf src/proto/*.ts; protons src/proto/*.proto",
"watch:build": "tsc -p tsconfig.json -w",
"watch:test": "mocha --watch",
"doc": "run-s doc:*",
"doc:html": "typedoc --treatWarningsAsErrors",
"doc:cname": "echo 'js.waku.org' > build/docs/CNAME",
"prepublish": "npm run build",
"deploy": "node ci/deploy.js",
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build",
@ -193,7 +190,6 @@
"tail": "^2.2.0",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"release": {
@ -278,6 +274,9 @@
"@semantic-release/git"
]
},
"typedoc": {
"entryPoint": "./src/index.ts"
},
"files": [
"dist",
"bundle",

View File

@ -1,21 +0,0 @@
{
"entryPoints": [
"./src/index.ts",
"./src/lib/enr/index.ts",
"./src/lib/peer_discovery_dns.ts",
"./src/lib/peer_discovery_static_list.ts",
"./src/lib/predefined_bootstrap_nodes.ts",
"./src/lib/utils.ts",
"./src/lib/wait_for_remote_peer.ts",
"./src/lib/waku_message/version_0.ts",
"./src/lib/waku_message/version_1.ts",
"./src/lib/waku_message/topic_only_message.ts"
],
"out": "build/docs",
"exclude": ["**/*.spec.ts"],
"excludeInternal": true,
"validation": {
"invalidLink": true,
"notExported": true
}
}

View File

@ -43,8 +43,6 @@
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json",
"doc": "run-s doc:*",
"doc:html": "typedoc --treatWarningsAsErrors",
"prepublish": "npm run build",
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build",
"release": "semantic-release"
@ -53,8 +51,8 @@
"node": ">=16"
},
"dependencies": {
"@waku/interfaces": "*",
"@waku/core": "*"
"@waku/core": "*",
"@waku/interfaces": "*"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.0",
@ -80,7 +78,6 @@
"rollup": "^2.75.0",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"release": {
@ -165,6 +162,9 @@
"@semantic-release/git"
]
},
"typedoc": {
"entryPoint": "./src/index.ts"
},
"files": [
"dist",
"bundle",

View File

@ -32,8 +32,6 @@ export interface CreateOptions {
*
* The usage of the default pubsub topic is recommended.
* See [Waku v2 Topic Usage Recommendations](https://rfc.vac.dev/spec/23/) for details.
*
* @default {@link index.DefaultPubSubTopic}
*/
pubSubTopic?: string;
/**

View File

@ -41,8 +41,6 @@
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json",
"doc": "run-s doc:*",
"doc:html": "typedoc --treatWarningsAsErrors",
"prepublish": "npm run build",
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build",
"release": "semantic-release"
@ -78,7 +76,6 @@
"prettier": "^2.1.1",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"typedoc": "^0.23.10",
"typescript": "^4.6.3"
},
"release": {
@ -163,6 +160,9 @@
"@semantic-release/git"
]
},
"typedoc": {
"entryPoint": "./src/index.ts"
},
"files": [
"dist",
"bundle",

View File

@ -67,8 +67,6 @@ export type StoreQueryOptions = {
pageDirection?: PageDirection;
/**
* The number of message per page.
*
* @default { @link DefaultPageSize }
*/
pageSize?: number;
/**

View File

@ -1,10 +0,0 @@
{
"entryPoints": ["./src/index.ts"],
"out": "build/docs",
"exclude": ["**/*.spec.ts"],
"excludeInternal": true,
"validation": {
"invalidLink": true,
"notExported": true
}
}

View File

@ -55,9 +55,9 @@
"node": ">=16"
},
"dependencies": {
"@waku/interfaces": "*",
"@waku/core": "*",
"@waku/create": "*"
"@waku/create": "*",
"@waku/interfaces": "*"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.8.1",

View File

@ -1,6 +1,7 @@
{
"entryPoints": ["./src/index.ts"],
"out": "build/docs",
"entryPointStrategy": "packages",
"entryPoints": ["packages/core", "packages/interfaces", "packages/create"],
"out": "docs",
"exclude": ["**/*.spec.ts"],
"excludeInternal": true,
"validation": {