mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 06:00:07 +03:00
Merge branch 'master' into extension-persist-state
This commit is contained in:
commit
bc462b23cc
|
@ -1,23 +1,46 @@
|
||||||
import { combineReducers, Reducer } from 'redux';
|
import { combineReducers, Reducer } from 'redux';
|
||||||
import instances from '@redux-devtools/app/lib/reducers/instances';
|
import instances, {
|
||||||
import monitor from '@redux-devtools/app/lib/reducers/monitor';
|
InstancesState,
|
||||||
import notification from '@redux-devtools/app/lib/reducers/notification';
|
} from '@redux-devtools/app/lib/reducers/instances';
|
||||||
import reports from '@redux-devtools/app/lib/reducers/reports';
|
import monitor, {
|
||||||
import section from '@redux-devtools/app/lib/reducers/section';
|
MonitorState,
|
||||||
import theme from '@redux-devtools/app/lib/reducers/theme';
|
} from '@redux-devtools/app/lib/reducers/monitor';
|
||||||
import connection from '@redux-devtools/app/lib/reducers/connection';
|
import notification, {
|
||||||
import { StoreState } from '@redux-devtools/app/lib/reducers';
|
NotificationState,
|
||||||
|
} from '@redux-devtools/app/lib/reducers/notification';
|
||||||
|
import reports, {
|
||||||
|
ReportsState,
|
||||||
|
} from '@redux-devtools/app/lib/reducers/reports';
|
||||||
|
import section, {
|
||||||
|
SectionState,
|
||||||
|
} from '@redux-devtools/app/lib/reducers/section';
|
||||||
|
import theme, { ThemeState } from '@redux-devtools/app/lib/reducers/theme';
|
||||||
|
import connection, {
|
||||||
|
ConnectionState,
|
||||||
|
} from '@redux-devtools/app/lib/reducers/connection';
|
||||||
import { StoreAction } from '@redux-devtools/app/lib/src/actions';
|
import { StoreAction } from '@redux-devtools/app/lib/src/actions';
|
||||||
|
|
||||||
const rootReducer: Reducer<StoreState, StoreAction> =
|
export interface StoreStateWithoutSocket {
|
||||||
combineReducers<StoreState>({
|
readonly section: SectionState;
|
||||||
instances,
|
readonly theme: ThemeState;
|
||||||
monitor,
|
readonly connection: ConnectionState;
|
||||||
reports,
|
readonly monitor: MonitorState;
|
||||||
notification,
|
readonly instances: InstancesState;
|
||||||
section,
|
readonly reports: ReportsState;
|
||||||
theme,
|
readonly notification: NotificationState;
|
||||||
connection,
|
}
|
||||||
});
|
|
||||||
|
const rootReducer: Reducer<
|
||||||
|
StoreStateWithoutSocket,
|
||||||
|
StoreAction
|
||||||
|
> = combineReducers<StoreStateWithoutSocket>({
|
||||||
|
instances,
|
||||||
|
monitor,
|
||||||
|
reports,
|
||||||
|
notification,
|
||||||
|
section,
|
||||||
|
theme,
|
||||||
|
connection,
|
||||||
|
});
|
||||||
|
|
||||||
export default rootReducer;
|
export default rootReducer;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import openDevToolsWindow from './openWindow';
|
import openDevToolsWindow, { DevToolsPosition } from './openWindow';
|
||||||
|
|
||||||
export function createMenu() {
|
export function createMenu() {
|
||||||
const menus = [
|
const menus = [
|
||||||
|
@ -33,5 +33,5 @@ export function removeMenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
chrome.contextMenus.onClicked.addListener(({ menuItemId }) => {
|
chrome.contextMenus.onClicked.addListener(({ menuItemId }) => {
|
||||||
openDevToolsWindow(menuItemId);
|
openDevToolsWindow(menuItemId as DevToolsPosition);
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { Action, PreloadedState, Store } from 'redux';
|
||||||
import { StoreState } from '@redux-devtools/app/lib/reducers';
|
import { StoreState } from '@redux-devtools/app/lib/reducers';
|
||||||
import { StoreAction } from '@redux-devtools/app/lib/src/actions';
|
import { StoreAction } from '@redux-devtools/app/lib/src/actions';
|
||||||
import { PanelMessage } from '../../../app/middlewares/api';
|
import { PanelMessage } from '../../../app/middlewares/api';
|
||||||
|
import { StoreStateWithoutSocket } from '../../../app/reducers/panel';
|
||||||
|
|
||||||
const position = location.hash;
|
const position = location.hash;
|
||||||
const messageStyle: CSSProperties = {
|
const messageStyle: CSSProperties = {
|
||||||
|
@ -20,7 +21,9 @@ const messageStyle: CSSProperties = {
|
||||||
};
|
};
|
||||||
|
|
||||||
let rendered: boolean | undefined;
|
let rendered: boolean | undefined;
|
||||||
let store: Store<StoreState, StoreAction> | undefined;
|
let store:
|
||||||
|
| Store<StoreStateWithoutSocket, StoreAction>
|
||||||
|
| undefined;
|
||||||
let bgConnection: chrome.runtime.Port;
|
let bgConnection: chrome.runtime.Port;
|
||||||
let naTimeout: NodeJS.Timeout;
|
let naTimeout: NodeJS.Timeout;
|
||||||
let preloadedState: PreloadedState<StoreState>;
|
let preloadedState: PreloadedState<StoreState>;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import webpack from 'webpack';
|
import webpack from 'webpack';
|
||||||
import CopyPlugin from 'copy-webpack-plugin';
|
import CopyPlugin from 'copy-webpack-plugin';
|
||||||
|
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
||||||
|
|
||||||
const extpath = path.join(__dirname, '../src/browser/extension/');
|
const extpath = path.join(__dirname, '../src/browser/extension/');
|
||||||
const mock = `${extpath}chromeAPIMock`;
|
const mock = `${extpath}chromeAPIMock`;
|
||||||
|
@ -31,7 +32,15 @@ const baseConfig = (params) => ({
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.DefinePlugin(params.globals),
|
new webpack.DefinePlugin(params.globals),
|
||||||
...(params.plugins ? params.plugins : []),
|
...(params.plugins
|
||||||
|
? params.plugins
|
||||||
|
: [
|
||||||
|
new ForkTsCheckerWebpackPlugin({
|
||||||
|
typescript: {
|
||||||
|
configFile: 'tsconfig.json',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]),
|
||||||
].concat(
|
].concat(
|
||||||
params.copy
|
params.copy
|
||||||
? new CopyPlugin({
|
? new CopyPlugin({
|
||||||
|
|
|
@ -9,6 +9,14 @@ module.exports = {
|
||||||
project: ['./tsconfig.json'],
|
project: ['./tsconfig.json'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
files: ['demo/*.ts', 'demo/*.tsx'],
|
||||||
|
extends: '../../eslintrc.ts.react.base.json',
|
||||||
|
parserOptions: {
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
project: ['./tsconfig.demo.json'],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
files: ['test/*.ts', 'test/*.tsx'],
|
files: ['test/*.ts', 'test/*.tsx'],
|
||||||
extends: '../../eslintrc.ts.react.jest.base.json',
|
extends: '../../eslintrc.ts.react.jest.base.json',
|
||||||
|
|
4
packages/redux-devtools-app/tsconfig.demo.json
Normal file
4
packages/redux-devtools-app/tsconfig.demo.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.react.base.json",
|
||||||
|
"include": ["demo", "src"]
|
||||||
|
}
|
|
@ -3,5 +3,5 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"include": ["demo", "src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ module.exports = (env: { development?: boolean; platform?: string } = {}) => ({
|
||||||
}),
|
}),
|
||||||
new ForkTsCheckerWebpackPlugin({
|
new ForkTsCheckerWebpackPlugin({
|
||||||
typescript: {
|
typescript: {
|
||||||
configFile: 'tsconfig.json',
|
configFile: 'tsconfig.demo.json',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@redux-devtools/core": "^3.9.0",
|
"@redux-devtools/core": "^3.9.0",
|
||||||
"@redux-devtools/serialize": "^0.3.0",
|
"@redux-devtools/serialize": "^0.3.0",
|
||||||
|
"@types/get-params": "^0.1.0",
|
||||||
"get-params": "^0.1.2",
|
"get-params": "^0.1.2",
|
||||||
"immutable": "^4.0.0-rc.14",
|
"immutable": "^4.0.0-rc.14",
|
||||||
"jsan": "^3.1.13",
|
"jsan": "^3.1.13",
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
declare module 'get-params' {
|
|
||||||
function getParams(func: (...args: any[]) => unknown): string[];
|
|
||||||
export default getParams;
|
|
||||||
}
|
|
|
@ -5254,6 +5254,7 @@ __metadata:
|
||||||
dependencies:
|
dependencies:
|
||||||
"@redux-devtools/core": ^3.9.0
|
"@redux-devtools/core": ^3.9.0
|
||||||
"@redux-devtools/serialize": ^0.3.0
|
"@redux-devtools/serialize": ^0.3.0
|
||||||
|
"@types/get-params": ^0.1.0
|
||||||
get-params: ^0.1.2
|
get-params: ^0.1.2
|
||||||
immutable: ^4.0.0-rc.14
|
immutable: ^4.0.0-rc.14
|
||||||
jsan: ^3.1.13
|
jsan: ^3.1.13
|
||||||
|
@ -6894,6 +6895,13 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@types/get-params@npm:^0.1.0":
|
||||||
|
version: 0.1.0
|
||||||
|
resolution: "@types/get-params@npm:0.1.0"
|
||||||
|
checksum: be378a08606c975c05faa1a64e73bfec3e98a924bda282109e4a6fe222cffab087ee47277aadf3dbe77e999b4bb5153553e073f008d6b9518862dc924c85ccff
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@types/glob-base@npm:^0.3.0":
|
"@types/glob-base@npm:^0.3.0":
|
||||||
version: 0.3.0
|
version: 0.3.0
|
||||||
resolution: "@types/glob-base@npm:0.3.0"
|
resolution: "@types/glob-base@npm:0.3.0"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user