mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 14:09:46 +03:00
stash
This commit is contained in:
parent
fa25234d36
commit
2cc9122a24
|
@ -16,6 +16,7 @@
|
||||||
"index.js",
|
"index.js",
|
||||||
"defaultDbOptions.json"
|
"defaultDbOptions.json"
|
||||||
],
|
],
|
||||||
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -52,7 +53,7 @@
|
||||||
"getport": "^0.1.0",
|
"getport": "^0.1.0",
|
||||||
"graphql": "^16.6.0",
|
"graphql": "^16.6.0",
|
||||||
"knex": "^2.3.0",
|
"knex": "^2.3.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"minimist": "^1.2.7",
|
"minimist": "^1.2.7",
|
||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
"open": "^8.4.0",
|
"open": "^8.4.0",
|
||||||
|
@ -71,7 +72,7 @@
|
||||||
"@types/cross-spawn": "^6.0.2",
|
"@types/cross-spawn": "^6.0.2",
|
||||||
"@types/express": "^4.17.15",
|
"@types/express": "^4.17.15",
|
||||||
"@types/jest": "^29.2.4",
|
"@types/jest": "^29.2.4",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash-es": "^4.17.6",
|
||||||
"@types/minimist": "^1.2.2",
|
"@types/minimist": "^1.2.2",
|
||||||
"@types/morgan": "^1.9.3",
|
"@types/morgan": "^1.9.3",
|
||||||
"@types/node": "^18.11.17",
|
"@types/node": "^18.11.17",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { Store } from '../store';
|
import type { Store } from '../store.js';
|
||||||
|
|
||||||
export const schema = fs
|
export const schema = fs
|
||||||
.readFileSync(require.resolve('./schema_def.graphql'))
|
.readFileSync(require.resolve('./schema_def.graphql'))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import { Options } from '../options';
|
import type { Options } from '../options.js';
|
||||||
|
|
||||||
const name = '@redux-devtools/cli';
|
const name = '@redux-devtools/cli';
|
||||||
const startFlag = '/* ' + name + ' start */';
|
const startFlag = '/* ' + name + ' start */';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import open from 'open';
|
import open from 'open';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import spawn from 'cross-spawn';
|
import spawn from 'cross-spawn';
|
||||||
import { Options } from '../options';
|
import type { Options } from '../options.js';
|
||||||
|
|
||||||
export default async function openApp(app: true | string, options: Options) {
|
export default async function openApp(app: true | string, options: Options) {
|
||||||
if (app === true || app === 'electron') {
|
if (app === true || app === 'electron') {
|
||||||
|
|
|
@ -3,10 +3,10 @@ import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import parseArgs from 'minimist';
|
import parseArgs from 'minimist';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import * as injectServer from './injectServer';
|
import * as injectServer from './injectServer.js';
|
||||||
import getOptions from '../options';
|
import getOptions from '../options.js';
|
||||||
import server from '../index';
|
import server from '../index.js';
|
||||||
import openApp from './openApp';
|
import openApp from './openApp.js';
|
||||||
|
|
||||||
const argv = parseArgs(process.argv.slice(2));
|
const argv = parseArgs(process.argv.slice(2));
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import knexModule, { Knex } from 'knex';
|
import { Knex, knex } from 'knex';
|
||||||
import { AGServer } from 'socketcluster-server';
|
import { AGServer } from 'socketcluster-server';
|
||||||
|
|
||||||
export default function connector(options: AGServer.AGServerOptions) {
|
export default function connector(options: AGServer.AGServerOptions) {
|
||||||
const dbOptions = options.dbOptions as Knex.Config;
|
const dbOptions = options.dbOptions as Knex.Config;
|
||||||
dbOptions.useNullAsDefault = true;
|
dbOptions.useNullAsDefault = true;
|
||||||
if (!(dbOptions as any).migrate) {
|
if (!(dbOptions as any).migrate) {
|
||||||
return knexModule(dbOptions);
|
return knex(dbOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
dbOptions.migrations = { directory: path.resolve(__dirname, 'migrations') };
|
dbOptions.migrations = { directory: path.resolve(__dirname, 'migrations') };
|
||||||
dbOptions.seeds = { directory: path.resolve(__dirname, 'seeds') };
|
dbOptions.seeds = { directory: path.resolve(__dirname, 'seeds') };
|
||||||
const knex = knexModule(dbOptions);
|
const knexInstance = knex(dbOptions);
|
||||||
|
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
knex.migrate
|
knexInstance.migrate
|
||||||
.latest({ loadExtensions: ['.js'] })
|
.latest({ loadExtensions: ['.js'] })
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return knex.seed.run({ loadExtensions: ['.js'] });
|
return knexInstance.seed.run({ loadExtensions: ['.js'] });
|
||||||
})
|
})
|
||||||
.then(function () {
|
.then(function () {
|
||||||
console.log(' \x1b[0;32m[Done]\x1b[0m Migrations are finished\n');
|
console.log(' \x1b[0;32m[Done]\x1b[0m Migrations are finished\n');
|
||||||
|
@ -27,5 +27,5 @@ export default function connector(options: AGServer.AGServerOptions) {
|
||||||
});
|
});
|
||||||
/* eslint-enable no-console */
|
/* eslint-enable no-console */
|
||||||
|
|
||||||
return knex;
|
return knexInstance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@ import express from 'express';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import getPort from 'getport';
|
import getPort from 'getport';
|
||||||
import socketClusterServer from 'socketcluster-server';
|
import socketClusterServer from 'socketcluster-server';
|
||||||
import getOptions, { Options } from './options';
|
import getOptions, { Options } from './options.js';
|
||||||
import routes from './routes';
|
import routes from './routes.js';
|
||||||
import createStore from './store';
|
import createStore from './store.js';
|
||||||
|
|
||||||
// var LOG_LEVEL_NONE = 0;
|
// var LOG_LEVEL_NONE = 0;
|
||||||
const LOG_LEVEL_ERROR = 1;
|
const LOG_LEVEL_ERROR = 1;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ApolloServer } from 'apollo-server-express';
|
import { ApolloServer } from 'apollo-server-express';
|
||||||
import { schema, resolvers } from '../api/schema';
|
import { schema, resolvers } from '../api/schema.js';
|
||||||
import { Store } from '../store';
|
import type { Store } from '../store.js';
|
||||||
|
|
||||||
export default function (store: Store) {
|
export default function (store: Store) {
|
||||||
return new ApolloServer({
|
return new ApolloServer({
|
||||||
|
|
|
@ -7,8 +7,8 @@ import bodyParser from 'body-parser';
|
||||||
import cors from 'cors';
|
import cors from 'cors';
|
||||||
import { AGServer } from 'socketcluster-server';
|
import { AGServer } from 'socketcluster-server';
|
||||||
import { ApolloServer } from 'apollo-server-express';
|
import { ApolloServer } from 'apollo-server-express';
|
||||||
import { AddData, ReportBaseFields, Store } from './store';
|
import type { AddData, ReportBaseFields, Store } from './store.js';
|
||||||
import { resolvers, schema } from './api/schema';
|
import { resolvers, schema } from './api/schema.js';
|
||||||
|
|
||||||
const app = express.Router();
|
const app = express.Router();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { v4 as uuidV4 } from 'uuid';
|
import { v4 as uuidV4 } from 'uuid';
|
||||||
import pick from 'lodash/pick';
|
import { pick } from 'lodash-es';
|
||||||
import { AGServer } from 'socketcluster-server';
|
import { AGServer } from 'socketcluster-server';
|
||||||
import { Knex } from 'knex';
|
import { Knex } from 'knex';
|
||||||
import connector from './db/connector';
|
import connector from './db/connector.js';
|
||||||
|
|
||||||
const reports = 'remotedev_reports';
|
const reports = 'remotedev_reports';
|
||||||
// var payloads = 'remotedev_payloads';
|
// var payloads = 'remotedev_payloads';
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "CommonJS",
|
"module": "NodeNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
|
|
|
@ -928,7 +928,7 @@ importers:
|
||||||
'@types/cross-spawn': ^6.0.2
|
'@types/cross-spawn': ^6.0.2
|
||||||
'@types/express': ^4.17.15
|
'@types/express': ^4.17.15
|
||||||
'@types/jest': ^29.2.4
|
'@types/jest': ^29.2.4
|
||||||
'@types/lodash': ^4.14.191
|
'@types/lodash-es': ^4.17.6
|
||||||
'@types/minimist': ^1.2.2
|
'@types/minimist': ^1.2.2
|
||||||
'@types/morgan': ^1.9.3
|
'@types/morgan': ^1.9.3
|
||||||
'@types/node': ^18.11.17
|
'@types/node': ^18.11.17
|
||||||
|
@ -955,7 +955,7 @@ importers:
|
||||||
graphql: ^16.6.0
|
graphql: ^16.6.0
|
||||||
jest: ^29.3.1
|
jest: ^29.3.1
|
||||||
knex: ^2.3.0
|
knex: ^2.3.0
|
||||||
lodash: ^4.17.21
|
lodash-es: ^4.17.21
|
||||||
minimist: ^1.2.7
|
minimist: ^1.2.7
|
||||||
morgan: ^1.10.0
|
morgan: ^1.10.0
|
||||||
ncp: ^2.0.0
|
ncp: ^2.0.0
|
||||||
|
@ -986,7 +986,7 @@ importers:
|
||||||
getport: 0.1.0
|
getport: 0.1.0
|
||||||
graphql: 16.6.0
|
graphql: 16.6.0
|
||||||
knex: 2.3.0_sqlite3@5.1.4
|
knex: 2.3.0_sqlite3@5.1.4
|
||||||
lodash: 4.17.21
|
lodash-es: 4.17.21
|
||||||
minimist: 1.2.7
|
minimist: 1.2.7
|
||||||
morgan: 1.10.0
|
morgan: 1.10.0
|
||||||
open: 8.4.0
|
open: 8.4.0
|
||||||
|
@ -1004,7 +1004,7 @@ importers:
|
||||||
'@types/cross-spawn': 6.0.2
|
'@types/cross-spawn': 6.0.2
|
||||||
'@types/express': 4.17.15
|
'@types/express': 4.17.15
|
||||||
'@types/jest': 29.2.4
|
'@types/jest': 29.2.4
|
||||||
'@types/lodash': 4.14.191
|
'@types/lodash-es': 4.17.6
|
||||||
'@types/minimist': 1.2.2
|
'@types/minimist': 1.2.2
|
||||||
'@types/morgan': 1.9.3
|
'@types/morgan': 1.9.3
|
||||||
'@types/node': 18.11.17
|
'@types/node': 18.11.17
|
||||||
|
@ -8532,6 +8532,12 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 16.18.10
|
'@types/node': 16.18.10
|
||||||
|
|
||||||
|
/@types/lodash-es/4.17.6:
|
||||||
|
resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==}
|
||||||
|
dependencies:
|
||||||
|
'@types/lodash': 4.14.191
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/lodash.curry/4.1.7:
|
/@types/lodash.curry/4.1.7:
|
||||||
resolution: {integrity: sha512-R+IkSvh7CI8klh7FkQuTAiAR+aPFqYrNEjw/hMxjCSO7TsAqBAxpR99PxxJN1lgE6YuvpHEoktqbh6V5VLzxZA==}
|
resolution: {integrity: sha512-R+IkSvh7CI8klh7FkQuTAiAR+aPFqYrNEjw/hMxjCSO7TsAqBAxpR99PxxJN1lgE6YuvpHEoktqbh6V5VLzxZA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user