Skip to content

Commit

Permalink
feat: extension settings type
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Oct 8, 2023
1 parent 6a944d5 commit 6af4a13
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"packageManager": "pnpm@8.6.1",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-gopeed-ext/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-gopeed-ext",
"version": "1.0.2",
"version": "1.0.3",
"keywords": [
"gopeed"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/create-gopeed-ext/templates/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"babel-loader": "^9.1.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"gopeed": "^1.0.0"
"gopeed": "^1.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/gopeed-rest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gopeed/rest",
"version": "1.0.2",
"version": "1.0.3",
"description": "",
"main": "dist/index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gopeed-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gopeed/types",
"version": "1.0.2",
"version": "1.0.3",
"description": "",
"main": "dist/index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gopeed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gopeed",
"version": "1.0.2",
"version": "1.0.3",
"description": "",
"main": "dist/index.js",
"exports": {
Expand Down
5 changes: 4 additions & 1 deletion packages/gopeed/src/extension/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { Request, Resource } from '@gopeed/types';

type Settings = { [key: string]: unknown };

interface OnResovleContext {
req: Request;
res: Resource;
settings: Settings;
}

interface Events {
// eslint-disable-next-line no-unused-vars
onResolve(handler: (ctx: OnResovleContext) => void): void;
}

export default Events;
export type { Events };
2 changes: 1 addition & 1 deletion packages/gopeed/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Events from './extension';
import { Events } from './extension';

interface Gopeed {
events: Events;
Expand Down

0 comments on commit 6af4a13

Please sign in to comment.