Skip to content

Commit

Permalink
use typedoc "packages" strategy, export all command types
Browse files Browse the repository at this point in the history
  • Loading branch information
leibale committed Jan 30, 2023
1 parent 9ffae59 commit 6a5dac2
Show file tree
Hide file tree
Showing 27 changed files with 520 additions and 85 deletions.
47 changes: 30 additions & 17 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,42 @@ name: Documentation

on:
push:
branches:
- master
- v4.0
branches: ["master"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
documentation:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v2.3.0
- name: Install Packages
- name: Install Dependencies
run: npm ci
- name: Build tests tools
run: npm run build:tests-tools
- name: Build client
run: npm run build:client
- name: Generate Documentation
run: npm run documentation
- name: Upload
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './documentation'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
17 changes: 16 additions & 1 deletion packages/bloom/lib/commands/bloom/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
import { RedisCommandSignature } from '@redis/client/dist/lib/commands';
import * as ADD from './ADD';
export type { ADD };

export type TEST = RedisCommandSignature<typeof ADD>;

import * as CARD from './CARD';
export type { CARD };
import * as EXISTS from './EXISTS';
export type { EXISTS };
import * as INFO from './INFO';
export type { INFO };
import * as INSERT from './INSERT';
export type { INSERT };
import * as LOADCHUNK from './LOADCHUNK';
export type { LOADCHUNK };
import * as MADD from './MADD';
export type { MADD };
import * as MEXISTS from './MEXISTS';
export type { MEXISTS };
import * as RESERVE from './RESERVE';
export type { RESERVE };
import * as SCANDUMP from './SCANDUMP';
export type { SCANDUMP };

export default {
ADD,
Expand All @@ -30,4 +44,5 @@ export default {
reserve: RESERVE,
SCANDUMP,
scanDump: SCANDUMP
};
} as const;

6 changes: 6 additions & 0 deletions packages/bloom/lib/commands/count-min-sketch/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import * as INCRBY from './INCRBY';
export type { INCRBY };
import * as INFO from './INFO';
export type { INFO };
import * as INITBYDIM from './INITBYDIM';
export type { INITBYDIM };
import * as INITBYPROB from './INITBYPROB';
export type { INITBYPROB };
import * as MERGE from './MERGE';
export type { MERGE };
import * as QUERY from './QUERY';
export type { QUERY };

export default {
INCRBY,
Expand Down
11 changes: 11 additions & 0 deletions packages/bloom/lib/commands/cuckoo/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@

import * as ADD from './ADD';
export type { ADD };
import * as ADDNX from './ADDNX';
export type { ADDNX };
import * as COUNT from './COUNT';
export type { COUNT };
import * as DEL from './DEL';
export type { DEL };
import * as EXISTS from './EXISTS';
export type { EXISTS };
import * as INFO from './INFO';
export type { INFO };
import * as INSERT from './INSERT';
export type { INSERT };
import * as INSERTNX from './INSERTNX';
export type { INSERTNX };
import * as LOADCHUNK from './LOADCHUNK';
export type { LOADCHUNK };
import * as RESERVE from './RESERVE';
export type { RESERVE };
import * as SCANDUMP from './SCANDUMP';
export type { SCANDUMP };
import { pushVerdictArguments } from '@redis/client/dist/lib/commands/generic-transformers';
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';

Expand Down
5 changes: 5 additions & 0 deletions packages/bloom/lib/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import bf from './bloom';
export type * as bf from './bloom';
import cms from './count-min-sketch';
export type * as cms from './count-min-sketch';
import cf from './cuckoo';
export type * as cf from './cuckoo';
import tDigest from './t-digest';
export type * as tDigest from './t-digest';
import topK from './top-k';
export type * as topK from './top-k';

export default {
bf,
Expand Down
14 changes: 14 additions & 0 deletions packages/bloom/lib/commands/t-digest/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
import * as ADD from './ADD';
export type { ADD };
import * as BYRANK from './BYRANK';
export type { BYRANK };
import * as BYREVRANK from './BYREVRANK';
export type { BYREVRANK };
import * as CDF from './CDF';
export type { CDF };
import * as CREATE from './CREATE';
export type { CREATE };
import * as INFO from './INFO';
export type { INFO };
import * as MAX from './MAX';
export type { MAX };
import * as MERGE from './MERGE';
export type { MERGE };
import * as MIN from './MIN';
export type { MIN };
import * as QUANTILE from './QUANTILE';
export type { QUANTILE };
import * as RANK from './RANK';
export type { RANK };
import * as RESET from './RESET';
export type { RESET };
import * as REVRANK from './REVRANK';
export type { REVRANK };
import * as TRIMMED_MEAN from './TRIMMED_MEAN';
export type { TRIMMED_MEAN };

export default {
ADD,
Expand Down
8 changes: 8 additions & 0 deletions packages/bloom/lib/commands/top-k/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import * as ADD from './ADD';
export type { ADD };
import * as COUNT from './COUNT';
export type { COUNT };
import * as INCRBY from './INCRBY';
export type { INCRBY };
import * as INFO from './INFO';
export type { INFO };
import * as LIST_WITHCOUNT from './LIST_WITHCOUNT';
export type { LIST_WITHCOUNT };
import * as LIST from './LIST';
export type { LIST };
import * as QUERY from './QUERY';
export type { QUERY };
import * as RESERVE from './RESERVE';
export type { RESERVE };

export default {
ADD,
Expand Down
1 change: 1 addition & 0 deletions packages/bloom/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default } from './commands';
export type * from './commands';
9 changes: 5 additions & 4 deletions packages/bloom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
],
"scripts": {
"test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'",
"build": "tsc",
"documentation": "typedoc"
"build": "tsc"
},
"peerDependencies": {
"@redis/client": "^1.0.0"
Expand All @@ -23,7 +22,9 @@
"release-it": "^15.6.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"typedoc": "^0.23.24",
"typescript": "^4.9.4"
"typescript": "npm:@typescript-deploys/pr-build@5.0.0-pr-52217-7"
},
"typedoc": {
"entryPoint": "./lib/index.ts"
}
}
9 changes: 1 addition & 8 deletions packages/bloom/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@
"exclude": [
"./lib/test-utils.ts",
"./lib/**/*.spec.ts"
],
"typedocOptions": {
"entryPoints": [
"./lib"
],
"entryPointStrategy": "expand",
"out": "../../documentation/bloom"
}
]
}
6 changes: 5 additions & 1 deletion packages/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ export { GeoReplyWith } from './lib/commands/generic-transformers';

export * from './lib/errors';

export { SetOptions } from "./lib/commands/SET";
export { SetOptions } from './lib/commands/SET';

export type * from './lib/client/commands';
export type * from './lib/cluster/commands';

Loading

0 comments on commit 6a5dac2

Please sign in to comment.